From 1d95b633e39d3f86238eac55229e1b520c0edffa Mon Sep 17 00:00:00 2001 From: "Babak K. Shandiz" Date: Mon, 9 Mar 2026 11:33:12 +0000 Subject: [PATCH] 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> --- pkg/cmd/issue/create/create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cmd/issue/create/create.go b/pkg/cmd/issue/create/create.go index da3648c31..2544698cb 100644 --- a/pkg/cmd/issue/create/create.go +++ b/pkg/cmd/issue/create/create.go @@ -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 }