Skip to content

[chore]: auto-approve release PRs via automation#1433

Merged
sf-tyler-jeong merged 2 commits into
mainfrom
chore/auto-approve-release-pr
May 27, 2026
Merged

[chore]: auto-approve release PRs via automation#1433
sf-tyler-jeong merged 2 commits into
mainfrom
chore/auto-approve-release-pr

Conversation

@sf-tyler-jeong
Copy link
Copy Markdown
Contributor

Summary

Adds approve-by-automation.yml to auto-approve release PRs (head branch release/v*) so the automated release can merge to main after the Jira EM approval, without a manual GitHub review.

Without this, the release workflow's Merge release branch to main step fails branch protection — At least 1 approving review is required by reviewers with write access (hit on the v3.18.0 attempt).

Scoping & safety

  • Approves only PRs whose head branch starts with release/v — feature PRs are untouched and still need normal human review.
  • permissions: pull-requests: write (minimum needed to approve).
  • Triggers on opened / reopened / synchronize so the approval is re-applied if branch protection dismisses it when the release workflow pushes the CHANGELOG finalize commit.

Context

  • Ported (and scoped) from the uikit-react-release-test repo, which had this workflow but it was never carried over to production. (Same class of gap as the missing is_test dispatch input.)
  • The release gate of record remains the Jira EM approval (SDKRLSD ticket); this only handles the mechanical GitHub review gate.

Note

This relies on the github-actions bot approval counting toward branch protection's required review (works in the test repo). If production branch protection rejects bot approvals, we'll need a PAT or GitHub App instead.

🤖 Generated with Claude Code

Port approve-by-automation from the release-test repo, scoped to release/v* PRs only (the test version approved all PRs). Without this, the release workflow Merge step fails branch protection (At least 1 approving review is required), as seen on the v3.18.0 attempt. The Jira EM approval remains the real release gate.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 27, 2026

Deploy Preview for sendbird-uikit-react ready!

Name Link
🔨 Latest commit 219d61b
🔍 Latest deploy log https://app.netlify.com/projects/sendbird-uikit-react/deploys/6a16b506e6f05e000855f2c2
😎 Deploy Preview https://deploy-preview-1433--sendbird-uikit-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 86ffb5a122

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".


jobs:
approve-release-pr:
if: startsWith(github.head_ref, 'release/v')
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restrict auto-approval to real release branches

In a same-repository PR whose source branch merely starts with release/v, this job submits an approving review without checking the base branch, actor, or the semver release-branch pattern used by .github/workflows/release-workflow.yml (^release/v[0-9]+\.[0-9]+\.[0-9]+$). That lets any write-access user create something like release/v-anything targeting main and have the one required GitHub approval satisfied by automation, bypassing the human review gate for non-release changes that pass required checks. Please tighten this condition to the exact release branch format and intended target/actor before approving.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Address Codex P1: the startsWith(release/v) check alone allowed any release/v-prefixed branch targeting main to be auto-approved, bypassing human review. Now require base==main plus the exact semver release-branch pattern (same as release-workflow.yml), and read branch/PR/repo via env vars to avoid expression injection.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sf-tyler-jeong sf-tyler-jeong merged commit 63886e1 into main May 27, 2026
8 checks passed
@sf-tyler-jeong sf-tyler-jeong deleted the chore/auto-approve-release-pr branch May 27, 2026 09:13
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