-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Closed
Labels
bugSomething isn't workingSomething isn't workinghelp wantedContributions welcomeContributions welcomep3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic
Description
Describe the bug
gh run cancel doesn't validate the run_id passed in, which can result in some weird error messages.
$ gh --version
gh version 2.30.0 (2023-05-30)
https://github.com/cli/cli/releases/tag/v2.30.0
Steps to reproduce the behavior
Pass in a multiline string as the run_id to gh run cancel, e.g.
$ gh run cancel -R barrettj12/juju '5000
> 5000'
parse "https://api.github.com/repos/barrettj12/juju/actions/runs/5000\n5000?exclude_pull_requests=true": net/url: invalid control character in URL
Expected vs actual behavior
Return a reasonable error such as invalid run_id "5000\n5000".
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedContributions welcomeContributions welcomep3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic