Skip to content

ci(lint): grant pull-requests: read for prettier_changed_only mode#2

Merged
topcoder1 merged 1 commit into
mainfrom
claude/lint-pull-requests-read
May 4, 2026
Merged

ci(lint): grant pull-requests: read for prettier_changed_only mode#2
topcoder1 merged 1 commit into
mainfrom
claude/lint-pull-requests-read

Conversation

@topcoder1
Copy link
Copy Markdown
Owner

Summary

Adds pull-requests: read to this repo's .github/workflows/lint.yml caller permissions block. Single-line read-scope grant, no privilege escalation.

Why

Required by topcoder1/ci-workflows#29 (merged 2026-05-03), which adds a prettier_changed_only mode (default true) that lists PR-changed files via gh api .../pulls/N/files. Without this permission the reusable workflow falls back to full-glob mode and emits a ::warning:: on every PR — functional but noisy. Granting the permission silences the warning and enables the intended diff-only behavior.

The fleet-wide motivation is that pre-existing markdown drift on main poisons every subsequent docs PR's lint check; PR-changed-only mode fixes the root cause.

Auto-merge rationale

Workflow-permission change → in the high-risk surface list (.github/workflows/**), so manual click-merge per fleet policy. The change itself is one line of additional pull-requests: read scope; no auth, no secrets, no destructive ops.

Codex pre-review

Skipping — workflow-only change, 1 functional line (plus 2 comment lines), not in src/**.

Test plan

  • CI passes
  • First post-merge PR shows the prettier job logs Mode: files (...) instead of ::warning::Could not list PR files

🤖 Generated with Claude Code

Required by topcoder1/ci-workflows#29 (merged 2026-05-03), which
adds a prettier_changed_only mode that lists PR-changed files via
`gh api .../pulls/N/files`. Without this permission the reusable
workflow falls back to full-glob mode and emits a ::warning:: on
every PR — functional but noisy.

Strictly grants an additional read scope, no privilege escalation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@topcoder1 topcoder1 merged commit 9741d53 into main May 4, 2026
3 checks passed
@topcoder1 topcoder1 deleted the claude/lint-pull-requests-read branch May 4, 2026 00:55
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.

1 participant