gh issue create fails with Resource not accessible by personal access token (repository.defaultBranchRef) when using a fine-grained PAT that has:
- Metadata: Read
- Issues: Read and write
The underlying GraphQL query fetches defaultBranchRef, which requires Contents: Read. Creating an issue shouldn't need repository content access.
The REST API equivalent (POST /repos/{owner}/{repo}/issues) works fine with the same token.
Workaround: Grant Contents: Read on the token.
Expected: gh issue create should work with only Issues: Read and write + Metadata: Read permissions.