Skip to content

refactor(github): simplify validation logic and remove nolint annotat…#4065

Open
pillatipriyanka wants to merge 2 commits into
argoproj:masterfrom
pillatipriyanka:pillatipriyanka_github-validate-remove-nolint
Open

refactor(github): simplify validation logic and remove nolint annotat…#4065
pillatipriyanka wants to merge 2 commits into
argoproj:masterfrom
pillatipriyanka:pillatipriyanka_github-validate-remove-nolint

Conversation

@pillatipriyanka
Copy link
Copy Markdown

This PR simplifies validation logic in the GitHub EventSource validator by replacing negated/or conditions and removing //nolint:staticcheck annotations. The change preserves behavior but improves clarity and satisfies static analysis.

Files changed:

pkg/eventsources/sources/github/validate.go
No functional changes expected.

@pillatipriyanka pillatipriyanka requested a review from whynowy as a code owner May 27, 2026 01:35
@pillatipriyanka pillatipriyanka force-pushed the pillatipriyanka_github-validate-remove-nolint branch from d0fba34 to cfe4a57 Compare May 27, 2026 01:38
…ions

Signed-off-by: pillati lakshmi priyanka <pillatilakshmi@gmail.com>
@pillatipriyanka pillatipriyanka force-pushed the pillatipriyanka_github-validate-remove-nolint branch from cfe4a57 to 06e42cf Compare May 27, 2026 01:54
@whynowy whynowy requested a review from Copilot May 30, 2026 18:27
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors GitHub EventSource validation logic for readability while preserving existing behavior.

Changes:

  • Simplifies ContentType validation by using a local variable and positive comparisons.
  • Replaces paired base/upload URL validation with boolean presence checks.
  • Removes obsolete //nolint:staticcheck annotations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants