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
Close issue if action cancelled #4
Close issue if action cancelled #4
Conversation
…ture/close-issue-if-workflow-cancelled
git diff is having a tough time with this branch so I'll add some comments to highlight the main review areas |
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 so much for the effort that you're putting into this! This is really great. Just some architectural and design changes to be made so that this project can scale from here. Thanks!
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.
Sorry for the delay! Single small request for changes, then we can get this merged in. Thanks!
Thank you for your contribution! |
If the workflow is cancelled due to user intervention or job timeout, this will ensure that the associated GitHub issue is closed, before the action exits.
This is achieved by intercepting the kill signal that the Docker container receives on job cancellation, and moving the main comment loop into a separate goroutine.
This should prevent issues being left behind when pipeline runs are cancelled.
I am using this in conjunction with the
timeout-minutes
parameter, to prevent approvals from running for excessive amounts of time.