Skip to content

Commit 982aa24

Browse files
ci: grant pull-requests:read so lint-pr-title workflow starts (#385)
**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** - Root cause: [launchdarkly/gh-actions#86](launchdarkly/gh-actions#86) added `permissions: pull-requests: read` at the job level inside the reusable lint-pr-title workflow - Same fix as [launchdarkly/sdk-meta#429](launchdarkly/sdk-meta#429) **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 `pull-requests: read` request could not be satisfied, causing every run to hit `startup_failure`. **Describe alternatives you've considered** Reverting the permission change in the reusable workflow, but that would remove a security improvement (least-privilege scoping) across all consumers. **Additional context** No product code is changed. The `Lint PR title` check on this PR itself should exit `success` rather than `startup_failure`, confirming the fix. Link to Devin session: https://app.devin.ai/sessions/c7b96da5c9074500aa684bc9a9ba1c31 Requested by: @kinyoklion <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk CI-only change that adjusts GitHub Actions permissions; it could only affect whether the PR title lint workflow is able to start/run. > > **Overview** > Fixes the `Lint PR title` GitHub Actions workflow failing to start by explicitly granting `pull-requests: read` at the workflow level, ensuring the called reusable workflow can request PR read access. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 9f914f0. 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 7e40541 commit 982aa24

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)