Skip to content

Commit 7cc3d9b

Browse files
ci: grant pull-requests:read so lint-pr-title workflow starts (#181)
**Requirements** - [x] I have added test coverage for new or changed functionality — N/A (CI workflow change only) - [x] I have followed the repository's [pull request submission guidelines](../blob/main/CONTRIBUTING.md#submitting-pull-requests) - [x] I have validated my changes against all supported platform versions — N/A (CI workflow change only) **Related issues** - Same fix as [launchdarkly/sdk-meta#429](launchdarkly/sdk-meta#429) - Root cause: [launchdarkly/gh-actions#86](launchdarkly/gh-actions#86) added `permissions: pull-requests: read` at the job level inside the reusable workflow **Describe the solution you've provided** Adds `permissions: pull-requests: read` at the workflow level in `.github/workflows/lint-pr-title.yml`. A reusable workflow can only request a subset of the permissions the caller has granted. Since this caller had no `permissions` block, the reusable workflow's permission request could not be satisfied, causing every run to hit `startup_failure`. **Describe alternatives you've considered** The permission could be reverted in the reusable workflow instead, but that would remove a security improvement (least-privilege scoping) across all consumers. **Additional context** No product code is changed. The only verification needed is that the `Lint PR title` check on this PR itself passes rather than hitting `startup_failure`. Link to Devin session: https://app.devin.ai/sessions/c7b96da5c9074500aa684bc9a9ba1c31 Requested by: @kinyoklion <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk CI-only change that only adjusts workflow permissions to fix a startup failure; no product code or data handling is affected. > > **Overview** > Fixes `Lint PR title` workflow startup failures by adding an explicit workflow-level `permissions: pull-requests: read`, allowing the called reusable workflow to request PR read access. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 1e52be0. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent cc7a0fe commit 7cc3d9b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.github/workflows/lint-pr-title.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
- edited
88
- synchronize
99

10+
permissions:
11+
pull-requests: read
12+
1013
jobs:
1114
lint-pr-title:
1215
uses: launchdarkly/gh-actions/.github/workflows/lint-pr-title.yml@main

0 commit comments

Comments
 (0)