-
-
Notifications
You must be signed in to change notification settings - Fork 39
Multiple backport attempts #35
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
Comments
We received several PR "labeled" events from GitHub for adding the labels: It shouldn't have tried to do the backport when |
think the issue is in these lines: pr_labels = await gh.getitem(gh_issue['labels_url'])
branches = [label['name'].split()[-1]
for label in pr_labels
if label['name'].startswith("needs backport to")] The reason is that each time the webhook is triggered, we go to the issue and grab the labels, disregarding of the label that triggered the webhook is one of the ones we care about. If we label the PR very fast with 3 labels, the webhook will be fired 3 times and we will go the the issue three times, we will find three times that two of the labels in the issue should trigger a backport and therefore the backport will be triggered three times for each of the relevant labels. I can make a PR trying to fix this if that's ok :) |
Yep, that is right. I have started working on the fix, and will have a PR later today. Thanks :) |
I tried to [Merge] this PR whereas @serhiy-storchaka already merged it while I tried to merge it. Then GitHub proposed me to [Try Again], I tried again, before seeing the small notification that the PR was already merged. It can explain why the bot was called 3 times (x 2, since two backports were requested, total: 6 times) instead of only once (twice if we count both Python versions). |
In python/cpython#4003, miss-islington made multiple backport attempts. It should only be done once.
The text was updated successfully, but these errors were encountered: