Commit graph

11 commits

Author SHA1 Message Date
Max Beizer
dde46dc424
Add "Resource not accessible" to ProjectsV2IgnorableError
When a token (GitHub App, fine-grained PAT, or GITHUB_TOKEN) lacks the
project permission, querying projectItems on a PR or issue fails with
"Resource not accessible by integration" or "Resource not accessible by
personal access token". ProjectsV2IgnorableError did not match these
errors, causing commands like pr view, pr edit, and issue view to fail
entirely instead of gracefully omitting project data.

Add "Resource not accessible by" as an ignorable error prefix. This is
safe because ProjectsV2IgnorableError is only called in project-specific
code paths.

Closes #13280

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-24 17:16:00 -05:00
cuiweixie
b9c85fff68
typo: dont to don't 2026-01-26 22:25:00 +08:00
Chris Henzie
4a106c1acf fix: prevent panic when processing null project items
The GraphQL API can return `null` nodes in the `projectItems`
connection, causing a runtime panic (nil pointer dereference) when the
CLI attempted to access fields on these nil nodes. This crash occurs
even with personal access tokens with full read access.

Adds a check to safely skip `nil` nodes in `ProjectsV2ItemsForIssue` and
`ProjectsV2ItemsForPullRequest`.

Signed-off-by: Chris Henzie <chrishenzie@google.com>
2025-12-16 11:14:55 -08:00
Andy Feller
72f5fbbec0 Base changes for PR project items 2025-08-12 20:59:50 -04:00
Andy Feller
7851c9c664 Update gh issue view to show v2 projects
These changes enhance the existing `gh issue view` experience by listing v2 projects in interactive and non-interactive forms.

Additionally, the tests have been enhanced to use a more standard `httpStubs` approach from other tests.
2025-08-12 16:18:45 -04:00
Babak K. Shandiz
b294f6b3e1
Include URL in ProjectV2 type
Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
2024-04-26 21:06:33 +01:00
William Martin
e775bc64b8 Fix PR and Issue list
Separate the GQL and JSON decoded types that we use for queries.
2023-11-27 17:00:10 +01:00
Sam Coe
dbc2f05124
Update go-gh to v2 (#7299)
* Update go-gh

* Update code for go-gh v2
2023-04-16 15:34:23 +10:00
Sam Coe
08a1231178
Allow retrieving projectItems in JSON and allow adding/removing user owned projects (#7007) 2023-02-15 22:14:59 +00:00
Mislav Marohnić
d2f3e89ad3
Fix ignoring ProjectsV2-specific errors for GHES 2023-01-27 18:08:56 +01:00
Ilya Yatsishin
179e9c256d
Add projectsV2 support to issue create, issue edit, pr create, and pr edit (#6735)
Co-authored-by: pshevche <pavel.shevchenko.95@gmail.com>
Co-authored-by: Sam Coe <samcoe@users.noreply.github.com>
2023-01-19 22:13:09 +00:00