Skip to content
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

[FEAT]: force-cancel #100

Open
1 task done
mikebollandajw opened this issue Jul 18, 2024 · 3 comments
Open
1 task done

[FEAT]: force-cancel #100

mikebollandajw opened this issue Jul 18, 2024 · 3 comments
Labels
Status: Triage This is being looked at and prioritized Type: Feature New feature or request

Comments

@mikebollandajw
Copy link

mikebollandajw commented Jul 18, 2024

Describe the need

Workflow Cancel is not working from the API despite returning an ACCEPT

Apparently you can force cancel it but we appear to be missing the ability to cancel in the Oktokit library

API Version is: 2022-11-28

https://docs.github.com/rest/actions/workflow-runs#force-cancel-a-workflow-run

  -X POST \
  -H "Accept: application/vnd.github+json" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID/force-cancel

See:

actions/runner#1846

https://stackoverflow.com/questions/77799456/workflow-stuck-and-not-cancellable

SDK Version

octokit/dotnet-sdk v13.0.1

API Version

2022-11-28

Code of Conduct

  • I agree to follow this project's Code of Conduct
@mikebollandajw mikebollandajw added Status: Triage This is being looked at and prioritized Type: Feature New feature or request labels Jul 18, 2024
Copy link

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@mikebollandajw
Copy link
Author

Appears to be in this branch:

/// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\actions\runs\{run_id}\force-cancel

@nickfloyd
Copy link
Contributor

Hey @mikebollandajw Thanks for reaching out.

There might be a little confusion around which SDK you're using that I'd like to clear up. This issue was created in the dotnet-sdk repository which is for our generated SDK - and the branch you reference has been shipped as part of the change sets. The generated SDK dotnet-sdk, is currently in pre-release and is on v.0.0.23

The version number that you are referencing actually belongs to Octokit.net - that is our older, manually written SDK - v13.0.1 being the latest version there.

Please consider using the newer SDK; as you have discovered our generative SDK (dotnet-sdk - available on nuget) is updated with the latest from the GitHub REST API nightly.

Otherwise, we can transfer this issue to the classic Octokit.net repo and label it as "Up for Grabs" so that you or the community can pick it up and add the APIs to the older SDK.

@nickfloyd nickfloyd moved this from 🆕 Triage to 🛑 Blocked/Awaiting Response in 🧰 Octokit Active Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage This is being looked at and prioritized Type: Feature New feature or request
Projects
Status: 🛑 Blocked/Awaiting Response
Development

No branches or pull requests

2 participants