Skip to content

ci: grant write permissions for changelog preview workflow#3722

Merged
peter-matkovski merged 1 commit into
developfrom
fix/changelog-preview-permissions
Jul 9, 2026
Merged

ci: grant write permissions for changelog preview workflow#3722
peter-matkovski merged 1 commit into
developfrom
fix/changelog-preview-permissions

Conversation

@peter-matkovski

Copy link
Copy Markdown
Contributor

Summary

Fixes generate_changelog_preview job failure on release PRs (e.g. #3721) caused by least-privilege workflow permissions.

yarn extract-changelog runs semantic-release in dry-run mode, which still executes git push --dry-run against develop. With only contents: read, github-actions[bot] is denied:

remote: Permission to GetStream/stream-chat-react-native.git denied to github-actions[bot].
SemanticReleaseError: Cannot push to the Git repository. (EGITNOPERMISSION)

Also grants pull-requests: write for marocchino/sticky-pull-request-comment@v3.

Changes

Add job-level permissions on generate_changelog_preview:

  • contents: write β€” semantic-release git push verification
  • pull-requests: write β€” sticky PR changelog comment

Workflow-level contents: read / pull-requests: read remain as the default for any future jobs.

Test plan

  • Changelog preview workflow passes on develop β†’ main release PR
  • Changelog comment is posted on the PR when changes exist

Made with Cursor

semantic-release dry-run verifies git push to develop; sticky PR comments
need pull-requests write. Job-level scopes avoid widening other workflows.

Co-authored-by: Cursor <cursoragent@cursor.com>
@peter-matkovski peter-matkovski merged commit 7d083d0 into develop Jul 9, 2026
8 checks passed
@peter-matkovski peter-matkovski deleted the fix/changelog-preview-permissions branch July 9, 2026 15:45
@stream-ci-bot

Copy link
Copy Markdown
Contributor

πŸŽ‰ This PR is included in version 9.6.1 πŸŽ‰

The release is available on:

Your semantic-release bot πŸ“¦πŸš€

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants