#git (2020-08)
All things git (except gitops)
2020-08-05

@Matt Gowie has joined the channel
2020-08-27

I’m trying to add labels to PRs with github CLI. Docs state that PR is an issue https://developer.github.com/v3/pulls/#labels-assignees-and-milestones And docs for issue state how to update issue with label https://developer.github.com/v3/issues/#update-an-issue But not yet sure how to do it for PR.
Anyone done it?

Every pull request is an issue, but not every issue is a pull request. For this reason, “shared” actions for both features, like manipulating assignees, labels and milestones, are provided within the Issues API.

Got it
echo '{"labels":["test"]}' | gh api -X PATCH repos/:owner/:repo/issues/3 --input -
issues
doesn’t take :pull_number
so PR number must be known to use it.