Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webhooks from non-master commits must be ignored #537

Open
yegor256 opened this issue Jan 11, 2024 · 2 comments
Open

webhooks from non-master commits must be ignored #537

yegor256 opened this issue Jan 11, 2024 · 2 comments
Labels

Comments

@yegor256
Copy link
Owner

Currently, we respond to all webhook-arrived commits. Instead, let's react only if the commit is in the default branch.

@yegor256 yegor256 added the bug label Jan 11, 2024
@pnatashap
Copy link
Contributor

pnatashap commented Jan 28, 2024

For Github request we can see default_branch and master_branch parameters (and ref for destination branch):
{ "ref": "refs/heads/master", ... "repository": { ... "default_branch": "master", "master_branch": "main", }, ... }
so we must select which one should be used.
May be also a new parameter can be introduced to config, which branch should be used: master, default, all (for backward capability if anybody needed)

For GitLab we can see only default_branch (https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#push-events)
{ ... "ref": "refs/heads/master", "project":{ ... "default_branch":"master", }, }

@pnatashap
Copy link
Contributor

Looks like it is better to use master only, in case of merge conflicts with master will be problems in pull logic

pnatashap added a commit to pnatashap/0pdd that referenced this issue Jan 29, 2024
pnatashap added a commit to pnatashap/0pdd that referenced this issue Jan 29, 2024
pnatashap added a commit to pnatashap/0pdd that referenced this issue Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants