-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Support canceling workflow runs #3775
Comments
This would be a valuable addition, thanks for opening. I'd like to see this implemented as |
I'd like to work on this ✋🏾 |
@cristiand391: please do. You're going to want to add a directory for You should be able to copy one of the existing directories and adjust the code to call the cancel method. You'd of course add the function to: |
Note: this would be really useful if it could cancel many runs at the same time. Like |
Based on #3775 (comment), I suspect that would make more sense to do that as I'm not opposed, but I don't want too much scope creep. If you don't mind, could you file a request for it separately? (Feel free to reference this so people can find it) This initial request is based on a public endpoint that is currently not reflected in the CLI. It also has a PR that has been sitting in @vilmibm 's review queue for 20 days. |
Describe the feature or problem you’d like to solve
There is a REST api for canceling workflows, but https://cli.github.com/manual/gh_workflow doesn't support it.
Proposed solution
add
gh run cancel $GITHUB_RUN_ID
How will it benefit CLI and its users?
Users won't have to write their own code to construct the URL and a curl request with credentials.
Additional context
I ended up implementing this myself, but I think a lot of what I'm doing would be nicer if I wasn't hand-rolling code.
The text was updated successfully, but these errors were encountered: