fix(issue create): use IssueRepoInfo to avoid requiring Contents:Read permission
Switch issue create from GitHubRepo to IssueRepoInfo so that gh issue create works with fine-grained PATs that only have Issues:Write and Metadata:Read permissions. Fixes cli/cli#12798 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
11e5be7842
commit
1d95b633e3
1 changed files with 1 additions and 1 deletions
|
|
@ -239,7 +239,7 @@ func createRun(opts *CreateOptions) (err error) {
|
|||
fmt.Fprintf(opts.IO.ErrOut, "\nCreating issue in %s\n\n", ghrepo.FullName(baseRepo))
|
||||
}
|
||||
|
||||
repo, err := api.GitHubRepo(apiClient, baseRepo)
|
||||
repo, err := api.IssueRepoInfo(apiClient, baseRepo)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue