Skip to content

Reconcile each PR CI annotation from its base branch - #14911

Closed
cttsai-stripe wants to merge 2 commits into
masterfrom
cttsai/pr-base-ci-gate
Closed

cttsai-stripe wants to merge 2 commits into
masterfrom
cttsai/pr-base-ci-gate

Conversation

@cttsai-stripe

@cttsai-stripe cttsai-stripe commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Reconcile the CI annotation on only the PR that triggered this workflow. Same-repository PRs targeting a branch other than master receive an action-owned Bitrise skip block. When the PR targets master, the workflow removes its own block.

Motivation

Make child PRs skip Bitrise by default and restore CI when they become standalone or the first PR targeting master. Each run fetches the current PR before editing; it does not inspect or modify other PRs and does not depend on GitHub stack metadata.

Authors can add <!-- pr-base-ci:run --> on its own line in the description to run CI while targeting another branch. Removing the managed skip marker also records that override, so later pushes do not re-add it. Remove the override to resume automatic gating. Manual skip annotations outside the managed block are preserved, including on PRs targeting master.

Testing

  • All 11 Node tests passed locally, executing the actual inline workflow script with fake GitHub responses. Coverage includes base-branch gating, retargeting, manual run/skip choices, queued events, repeated reconciliation, and editing only the triggering PR.
  • YAML parsing and static permission-configuration checks passed; static diff check passed.
  • A read-only test job runs the same tests on PR events. Reconciliation requests only PR-write permission and executes inline metadata logic without checkout.
  • No local Gradle tasks. Pre-push hook bypassed because these .github changes map to full Gradle checks.
  • The initial pull_request run passed both test and reconciliation jobs on this master-targeting draft and left its description unchanged. The standalone-override follow-up also passed the workflow in GitHub. Live annotation writes, initial Bitrise build suppression, and marker-removal triggering remain unverified.

Notes

This policy also skips ordinary feature-branch PRs by default unless overridden. Fork PRs and Dependabot PRs are excluded from annotation because their PR workflows normally have read-only tokens. This alternative uses the PR workflow version, so it can be exercised from a draft branch for same-repository PRs. An action cannot prevent a build already started by Bitrise's initial webhook or cancel an in-flight build. A concurrent description edit can race the final read/update.

Screenshots

Not applicable. CI automation.

Changelog

Not needed. No SDK or public API behavior changes.

Committed and created by Codex.

cttsai-stripe and others added 2 commits October 7, 2026 21:54
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
@cttsai-stripe
cttsai-stripe added this pull request to stack #14914 October 8, 2026 04:59
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.

1 participant