Skip to content

ci: grant pull-requests:read on lint-pr-title caller#270

Merged
kinyoklion merged 1 commit intomainfrom
rlamb/fix-lint-pr-title-permissions
May 7, 2026
Merged

ci: grant pull-requests:read on lint-pr-title caller#270
kinyoklion merged 1 commit intomainfrom
rlamb/fix-lint-pr-title-permissions

Conversation

@kinyoklion
Copy link
Copy Markdown
Member

@kinyoklion kinyoklion commented May 7, 2026

The reusable workflow at `launchdarkly/gh-actions/.github/workflows/lint-pr-title.yml@main` requests `pull-requests: read`. The caller workflow in this repo (`.github/workflows/lint-pr-title.yml`) has no `permissions:` block, so it inherits the default scope which on this repo is `pull-requests: none`. GitHub rejects every run of the caller with:

Invalid workflow file: .github/workflows/lint-pr-title.yml#L11
Error calling workflow 'launchdarkly/gh-actions/.github/workflows/lint-pr-title.yml@main'.
The nested job 'main' is requesting 'pull-requests: read', but is only allowed 'pull-requests: none'.

The fix is a three-line addition declaring the minimum scope the reusable workflow needs:

```yaml
permissions:
pull-requests: read
```

Test plan

  • Workflow no longer reports a startup_failure on PRs.

Note

Low Risk
Low risk because it only narrows/sets GitHub Actions permissions for a single workflow and doesn’t affect application runtime behavior.

Overview
Fixes the Lint PR title GitHub Actions workflow failing to start by explicitly granting minimum required permissions (permissions: pull-requests: read) to the caller workflow when invoking the reusable launchdarkly/gh-actions lint workflow.

Reviewed by Cursor Bugbot for commit 314693c. Bugbot is set up for automated code reviews on this repo. Configure here.

Without an explicit `permissions:` block the caller workflow
inherits the default scope, which on this repo is `pull-requests:
none`. The nested reusable workflow at
launchdarkly/gh-actions/.github/workflows/lint-pr-title.yml@main
requests `pull-requests: read`, so GitHub rejects the workflow with
"is requesting 'pull-requests: read', but is only allowed
'pull-requests: none'".

Granting the read permission at the caller is the minimal scope the
reusable workflow needs to inspect the PR title.
@kinyoklion kinyoklion requested a review from a team as a code owner May 7, 2026 21:08
@kinyoklion kinyoklion merged commit 74ee884 into main May 7, 2026
6 checks passed
@kinyoklion kinyoklion deleted the rlamb/fix-lint-pr-title-permissions branch May 7, 2026 21:37
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