Skip to content

ci: harden trunk gating - #97

Merged
kjgbot merged 1 commit into
mainfrom
trunk
Oct 8, 2026
Merged

kjgbot merged 1 commit into
mainfrom
trunk

Conversation

@kjgbot

@kjgbot kjgbot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Hardens the trunk-only CI gating per review on AgentWorkforce/relay#1932: head repo + base branch checks in every gate; guard via pull_request_target with edited; closed-only workflows ungated.

🤖 Generated with Claude Code


Note

Medium Risk
Changes CI enforcement and branch-merge policy; mistakes could block legitimate merges or leave a bypass, but scope is limited to workflow conditions.

Overview
Tightens trunk → main CI so build, test, and contract jobs only run on pull requests that use this repo’s trunk branch targeting main, not forks or other head branches.

The trunk guard now runs on pull_request_target (with opened / synchronize / reopened / edited) so the check uses the workflow on the base branch and PRs can’t weaken the guard by changing workflow files. It fails when the head isn’t trunk or the PR comes from a fork (head.repo.full_name ≠ github.repository), with empty job permissions and updated comments/error text.

Reviewed by Cursor Bugbot for commit c9c7b00. Bugbot is set up for automated code reviews on this repo. Configure here.

- CI gates also require the head repo to be this repository and the base to
  be main (a fork branch named trunk, or trunk into another branch, no
  longer runs CI).
- Trunk guard runs via pull_request_target (loaded from the base branch, so
  a PR cannot edit it to pass), re-runs on base edits, and checks head repo.
- Workflows that only react to a PR closing are no longer gated.
@kjgbot
kjgbot merged commit 817fd37 into main Oct 8, 2026
@coderabbitai

coderabbitai Bot commented Oct 8, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f62ca613-19cb-4eef-9e43-c3cde585a420
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔍 Devin Review: 1 flag

Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

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