-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fix the commit email filters to exclude personal branches #7
Conversation
I don't know how to test this. |
cc: @tstellar |
In order to test this, I need to get a webhook event from a commit to one of the personal branches. Maybe someone could create a test stacked PR that demonstrates the bug. |
IIUC any commit to a personal branch would trigger it. This stack triggers it every time I do |
if event['ref'].startswith('refs/heads/users/'): | ||
break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check should be moved to the beginning of the function and should cause an early exit with a status code like we do here: https://github.com/llvm/llvm-admin/blob/main/AWS/Lambda/PREmailer/pr_emailer.py#L268
You can use this patch and input for debugging: |
Mind pasting the contents of that json blob? I'm getting a permissions error. |
|
Thanks for the test case! 9cdc63d seems to work. |
This has been deployed, thanks! |
Fixes: llvm/llvm-project#71185