-
Notifications
You must be signed in to change notification settings - Fork 29
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
Workflow should not trigger on own comments #244
Conversation
The backport-action bot added comments to PRs contain "/backport". This could result in the backport workflow being triggered again, causing an infinite loop of backport messages. By checking the user id of the comment we can prevent comments from backport-action triggering the workflow.
Let me know if you'd rather have the check be |
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.
Interesting point. So this PR had /backport
in the title or in the branch? So once the new PR was opened, the bot user commented on the original PR and the workflow ran once more. Do I have that right?
This example uses the default GITHUB_TOKEN
as the github_token
so the github-action
user opens the PR. I'm not sure what the id of that user is. In any case, the user depends on the defined value of the github_token
option, which makes this more complex.
I'm not sure we should complicate this example even further. It's already rather confusing IMO. I'd rather push for replacing the issue_comment section with a dedicated action like https://github.com/peter-evans/slash-command-dispatch. This dispatching will have the added benefit that the backport-action itself is not triggered for every comment, cleaning up the Actions overview.
WDYT?
In Zeebe we don't use the
Not using the I do think it is worth avoiding this risk by adding this simple check, or at the very least notifying users of this risk. |
Only merged pull requests can be backported. |
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.
You've convinced me that this doc can be an easy win.
However, I believe we should look towards better slash command handling using a dedicated action in the future.
Thanks for your proposal. Please consider these suggestions to clarify things in more detail.
Co-authored-by: Nico Korthout <[email protected]>
Co-authored-by: Nico Korthout <[email protected]>
I've applied your suggestions. Please squash the commits when merging, or let me know and I'll squash them myself :D |
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.
Thanks @remcowesterhoud LGTM 📘
The backport-action bot added comments to PRs contain "/backport". This could result in the backport workflow being triggered again, causing an infinite loop of backport messages. By checking the user id of the comment we can prevent comments from backport-action triggering the workflow.