-
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
GH should not require git repository to exist where operation does not affect one #9072
Comments
Doing |
Unfortunately the REST API does require the repo ID which is why the CLI needs to know the repo to which the run belongs. However, instead of initialising a git repo I would suggest you use |
let me try that, thanks! |
While I'm trying it, |
https://github.com/karellen/karellen-llvm/actions/runs/9049315253/job/24863292405#step:2:25 This worked, thank you! I still think that in the presence of |
Describe the bug
I've attempted to use
gh run cancel <id>
from a directory that was not a repository.While the cancel operation would've proceeded normally due to having GH_TOKEN in the env, gh started balking at not being in a git repository. When I initialized the directory with
git init
as a workaround,gh run cancel
further complained there were no remotes in the repository.Case 1 (empty dir):
https://github.com/karellen/karellen-llvm/actions/runs/9047154513/job/24858809382#step:2:26
Case 2 (git init with no remotes):
https://github.com/karellen/karellen-llvm/actions/runs/9047223038/job/24858879136#step:2:39
Version is 2.49.0.
Steps to reproduce the behavior
The exact code is linked above in the publicly accessible workflows.
Expected vs actual behavior
Expected: GH CLI has no git repository requirements for operations not affecting git repositories.
Actual: GH CLI performs git repository validation for operations not affecting git repositories.
Logs
Linked above in the action runs.
The text was updated successfully, but these errors were encountered: