Skip to content

Grant profile_contributors the issues:read scope gh-profiler needs - #2040

Merged
mscuthbert merged 1 commit into
masterfrom
fix-profiler-issues-permission
Sep 21, 2026
Merged

mscuthbert merged 1 commit into
masterfrom
fix-profiler-issues-permission

Conversation

@mscuthbert

Copy link
Copy Markdown
Member

The workflow's permissions block granted only pull-requests: write, and a permissions block caps the Actions token rather than adding to it. An Actions token is a GitHub App installation token, so with no issues scope it cannot resolve Issue objects: gh-profiler's issue-activity search came back as a list of empty nodes and it died on KeyError: 'repository'. PR parsing succeeded one function earlier because PullRequests: write was granted.

Also stop a gh-profiler crash from failing the job.

AI-Assisted (Claude)

The workflow's permissions block granted only pull-requests: write, and a
permissions block caps the Actions token rather than adding to it. An Actions
token is a GitHub App installation token, so with no issues scope it cannot
resolve Issue objects: gh-profiler's issue-activity search came back as a list
of empty nodes and it died on KeyError: 'repository'. PR parsing succeeded one
function earlier because PullRequests: write was granted.

The step had never actually run before -- every earlier trigger skipped it
because the author already had a merged PR -- so this broke on first use, in
run 35530668612.

Also stop a gh-profiler crash from failing the job. Note that GitHub returns the
unreadable nodes as {} with exit 0 and no errors array, so simply skipping bad
nodes would report a spam account as having zero external issues and give it two
green flags. Reporting that profiling could not run keeps the author visible
instead of passing them as clean; the comment on the PR says so, and the
traceback stays in the log.
@mscuthbert
mscuthbert merged commit 2b884f6 into master Sep 21, 2026
7 checks passed
@mscuthbert
mscuthbert deleted the fix-profiler-issues-permission branch September 21, 2026 19:03
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 93.349%. remained the same — fix-profiler-issues-permission into master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants