Skip to content

Commit 0edb808

Browse files
chore: add explicit permissions to release-please workflow (#513)
## Summary Adds explicit `contents: write` and `pull-requests: write` permissions to the `release-please` job. These are required for the release-please action to create release PRs and GitHub releases. Without explicit permissions, the job relies on the repository/org default `GITHUB_TOKEN` permissions, which may be insufficient if defaults are tightened to read-only. Downstream jobs (release-client, release-server, provenance, etc.) already have their own explicit permissions blocks and are unaffected by this change. ## Review & Testing Checklist for Human - [ ] **Verify no other implicit permissions are needed by the `release-please` job.** Adding an explicit job-level `permissions` block restricts the token to *only* the listed permissions, revoking any previously inherited defaults. If the release-please action in this repo needs anything beyond `contents` and `pull-requests` (e.g., `id-token: write`), it will break. - [ ] After merging, monitor the next `release-please` workflow run (triggered by a push to `main`) to confirm it still creates/updates release PRs successfully. ### Notes This is part of a batch update across all `launchdarkly-sdk`-tagged repositories whose release-please workflows were missing explicit permissions on their default branch. Link to Devin session: https://app.devin.ai/sessions/a83b6e4f4fa14b96b859cfb50755a2c1 Requested by: @kinyoklion <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk configuration change, but it can break releases if `release-please` requires additional permissions beyond `contents` and `pull-requests` under restricted tokens. > > **Overview** > **Hardens the `release-please` GitHub Actions workflow** by adding an explicit job-level `permissions` block for `release-please` (`contents: write` and `pull-requests: write`). > > This removes reliance on repository/org default `GITHUB_TOKEN` permissions and ensures the job can create/update release PRs and GitHub releases when defaults are tightened. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 16f70bb. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent 853c26d commit 0edb808

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.github/workflows/release-please.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ name: release-please
77
jobs:
88
release-please:
99
runs-on: ubuntu-22.04
10+
permissions:
11+
contents: write
12+
pull-requests: write
1013
outputs:
1114
package-client-released: ${{ steps.release.outputs['libs/client-sdk--release_created'] }}
1215
package-client-tag: ${{ steps.release.outputs['libs/client-sdk--tag_name'] }}

0 commit comments

Comments
 (0)