ignore webhook events for repos outside SYNC_REPOS_LIST - #492
Open
oldgiova wants to merge 3 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Contributor
Author
|
@olehermanse FYI |
oldgiova
force-pushed
the
QA-1742-misplaced-comments
branch
from
August 31, 2026 16:00
b7c5387 to
88835f8
Compare
strings.Split("", ",") returns a one-element slice containing the empty string,
so SYNC_REPOS_LIST="" did not mean "all repositories", it meant a list matching
nothing, which silently disabled all syncing. The ConfigMaps already use "" as
the leave-at-default convention for two other keys.
Trim entries and drop empty ones, and add isRepoInSyncList as the single place
that decides whether this deployment acts on a repository. An empty list still
means all repositories, which the mendersoftware deployment relies on. Nothing
calls the predicate yet; wiring it into the webhook handlers is the next commit.
Ticket: QA-1742
Signed-off-by: Roberto Giovanardi <roberto.giovanardi@northern.tech>
SYNC_REPOS_LIST was only consulted on push events, so the CFEngine and NorthernTechHQ deployments ran the full pull request path on every repository in their organizations. On an opted-out repo the bot force-pushed a pr_N branch to GitLab, tried to start a pipeline, and commented "There was an error running your pipeline" on an unrelated review. On PR close it also deleted a GitLab branch and removed its protection. Gate every event type in processGitHubWebhook, which also collapses the duplicate check in processGitHubPush. The gate runs before conf.githubOrganization is set, so an ignored event does not mutate shared state. An empty list still means all repositories, so the mendersoftware deployment is unaffected. Ticket: QA-1742 Signed-off-by: Roberto Giovanardi <roberto.giovanardi@northern.tech>
The acceptance harness never set SYNC_REPOS_LIST, so the opt-in path had no coverage and the gate could regress silently. Configure the runner the way the CFEngine and NorthernTechHQ deployments are, listing every repository the existing payloads use, and add push and pull request payloads for a repository outside that list. Both new tests assert a single ignore line and no side effects. The existing tests are the positive control: they all run against listed repositories and their golden files are unchanged. Ticket: QA-1742 Signed-off-by: Roberto Giovanardi <roberto.giovanardi@northern.tech>
oldgiova
force-pushed
the
QA-1742-misplaced-comments
branch
from
August 31, 2026 16:21
88835f8 to
f0259ca
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This to ignore noisy errors like

for repositories outside Gitlab CICD
Co-authored-with: Claude
Ticket: QA-1742
Companion PR: