Skip to content

Use pull_request for release automation - #26301

Open
Eduardo Villalpando Mello (edvilme) wants to merge 2 commits into
mainfrom
release-pr-safe-trigger
Open

Eduardo Villalpando Mello (edvilme) wants to merge 2 commits into
mainfrom
release-pr-safe-trigger

Conversation

@edvilme

@edvilme Eduardo Villalpando Mello (edvilme) commented Nov 17, 2026 •

Copy link
Copy Markdown

Summary

  • Replace pull_request_target with pull_request in .github/workflows/release-pr-release.yml, retaining the main branch filter and closed activity type.
  • Run the release job only when the PR is merged and its head/base repository IDs match.
  • Preserve the read-only workflow permissions, release job's contents: write, pinned shared action, release mode, and existing version-only/author-authorization safeguards. The read-only Release PR / Plan workflow is unchanged.

Same-repository release PRs retain the intended release-branch creation behavior. Fork-originated PRs now explicitly skip the release job, including forks opened by maintainers. No new secrets or shared-action changes are needed.

This removes the privileged event rather than requiring a pull_request_target policy exception.

Validation

  • Compared workflow changes across all eight affected repositories: identical workflow patches, changing only the event and job guard.
  • Parsed YAML comparison verifies all other workflow settings are unchanged.
  • Prettier, Actionlint 1.7.12, and git diff --check passed.
  • GitHub's @actions/expressions evaluator passed five condition cases per repository (40 total): merged/unmerged same-repository PRs, merged/unmerged forks, and a deleted fork repository.
  • Independent security review found no new security blocker.

GitHub-hosted closed-event behavior, the effective write token, and actual release-branch creation still require a controlled post-merge same-repository release PR. No release or publishing pipeline was manually triggered.

Release documentation

Updated .github/release_plan.md: release PRs must originate from a branch in the upstream repository, not a fork. Head and base repositories must match; fork-originated PRs are skipped even when opened by a maintainer. Release-agent trigger references now use pull_request where applicable.

Documentation validation: whitespace, exact scoped-diff checks, and Prettier on the added paragraph passed. Full-file Prettier also fails on the original release plan in HEAD; unrelated legacy formatting is unchanged. The release workflow is unchanged by this documentation follow-up.

Require merged same-repository PRs while preserving existing release safeguards.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 956d3afd-ae0b-486c-a60c-3a6276c23213
@StellaHuang95

Stella Huang (StellaHuang95) commented Nov 17, 2026 •

Copy link
Copy Markdown

🔒 Automated review in progress — Stella Huang (@StellaHuang95) is auto-reviewing this PR.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 956d3afd-ae0b-486c-a60c-3a6276c23213
@StellaHuang95

Copy link
Copy Markdown

Reviewed commit: 8786c5a4c597a74531227db294ed421b88aeaa68

Result: 🔴 could-not-verify

Verification details

Verification: Automated verification is best effort. The PR author remains responsible for testing.

Summary: [unavailable] Container verification could not start and local execution was not authorized for this PR HEAD: Podman CLI is not installed or is not on PATH.

Test runs: none recorded.

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

Labels

debt Code quality issues skip-issue-check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants