[PR #118] [MERGED] Enforce the staging-only pull request target policy #816

Closed
opened 2026-10-20 17:31:15 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/118
Author: @SpicyMarinara
Created: 7/29/2026
Status: ✅ Merged
Merged: 7/29/2026
Merged by: @SpicyMarinara

Base: staging ← Head: agent/branch-policy-check


📝 Commits (5)

  • 07b56c7 ci: enforce pull request target policy
  • 7fc0233 ci: bind main PRs to trusted staging
  • 396a70b ci: reconcile promoted issue labels
  • 0103906 ci: reserve outside PR approval for owner
  • 304a0eb ci: fix review event filtering

📊 Changes

9 files changed (+114 additions, -24 deletions)

View changed files

📝 .github/CODEOWNERS (+11 -10)
📝 .github/agents/chai-workflow.md (+1 -1)
📝 .github/pull_request_template.md (+5 -1)
📝 .github/workflows/issue-status-from-prs.yml (+22 -4)
📝 .github/workflows/pull-request-triage.yml (+67 -0)
📝 AGENTS.md (+2 -2)
📝 CONTRIBUTING.md (+3 -3)
📝 README.md (+1 -1)
📝 SECURITY.md (+2 -2)

📄 Description

Closes #115

Why this change

Branch rules prevent unauthorized merges, but GitHub still allows contributors to open a pull request against the wrong base. A required, visible policy check should reject those PRs immediately.

What changed

  • Accept pull requests targeting staging.
  • Accept main only when SpicyMarinara promotes this repository's staging branch.
  • Reject forks, alternate head branches, other actors, and other bases with a clear instruction.\n- Require a current-head approval from SpicyMarinara for every outside or first-time staging contribution; approvals from other developers do not count.
  • Document the trusted promotion source in contributor guidance and the pull request template.

Package and security impact

  • Affected package IDs: none
  • Engine compatibility impact: none
  • New or changed permissions/entrypoints: none
  • Restart, storage, update, or uninstall impact: none

Validation

  • node scripts/validate-catalog.mjs passes locally
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Catalog validation completed locally.
  • Branch-policy promotion, fork-rejection, actor-rejection, and wrong-base paths were exercised locally.\n- Owner-approval behavior was exercised across internal, outside, other-reviewer, stale-approval, and current-owner-approval cases.
  • GitHub CI and CodeRabbit review are required before merge.

Documentation impact

  • No documentation changes needed
  • Updated this README catalog and package guidance
  • Updated linked Marinara Engine documentation

Summary by CodeRabbit

  • Documentation

    • Clarified contribution, review, merge, and branch-promotion requirements.
    • Updated security and ownership guidance for sensitive repository areas.
    • Added clearer approval rules for outside and first-time contributors.
  • Workflow Improvements

    • Added automated validation for pull-request branches and contribution policies.
    • Added approval checks for eligible external contributions.
    • Improved issue label cleanup after approved staging-to-main promotions.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Agents/pull/118 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/29/2026 **Status:** ✅ Merged **Merged:** 7/29/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/branch-policy-check` --- ### 📝 Commits (5) - [`07b56c7`](https://github.com/Pasta-Devs/Marinara-Agents/commit/07b56c7831512c05d946209b76172920a504e11a) ci: enforce pull request target policy - [`7fc0233`](https://github.com/Pasta-Devs/Marinara-Agents/commit/7fc02331c88cf8b1ec0241212be70d6f69a67f5d) ci: bind main PRs to trusted staging - [`396a70b`](https://github.com/Pasta-Devs/Marinara-Agents/commit/396a70b8cf84df1e65613e70e8f9f5a1db8f7bd3) ci: reconcile promoted issue labels - [`0103906`](https://github.com/Pasta-Devs/Marinara-Agents/commit/010390620b0c24d85b8005369bcecb4c1add9abe) ci: reserve outside PR approval for owner - [`304a0eb`](https://github.com/Pasta-Devs/Marinara-Agents/commit/304a0eb1e0fec7fecdd544f798571f2965c637cf) ci: fix review event filtering ### 📊 Changes **9 files changed** (+114 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `.github/CODEOWNERS` (+11 -10) 📝 `.github/agents/chai-workflow.md` (+1 -1) 📝 `.github/pull_request_template.md` (+5 -1) 📝 `.github/workflows/issue-status-from-prs.yml` (+22 -4) 📝 `.github/workflows/pull-request-triage.yml` (+67 -0) 📝 `AGENTS.md` (+2 -2) 📝 `CONTRIBUTING.md` (+3 -3) 📝 `README.md` (+1 -1) 📝 `SECURITY.md` (+2 -2) </details> ### 📄 Description Closes #115 ## Why this change Branch rules prevent unauthorized merges, but GitHub still allows contributors to open a pull request against the wrong base. A required, visible policy check should reject those PRs immediately. ## What changed - Accept pull requests targeting staging. - Accept main only when SpicyMarinara promotes this repository's staging branch. - Reject forks, alternate head branches, other actors, and other bases with a clear instruction.\n- Require a current-head approval from SpicyMarinara for every outside or first-time staging contribution; approvals from other developers do not count. - Document the trusted promotion source in contributor guidance and the pull request template. ## Package and security impact - Affected package IDs: none - Engine compatibility impact: none - New or changed permissions/entrypoints: none - Restart, storage, update, or uninstall impact: none ## Validation - [ ] `node scripts/validate-catalog.mjs` passes locally - [ ] `git diff --check` passes locally - [ ] Rebuilt every affected manifest, payload, artifact, and catalog entry - [ ] Installed or updated the affected package through Marinara Engine - [ ] Checked supported modes, restart behavior, and uninstall cleanup - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Catalog validation completed locally. - Branch-policy promotion, fork-rejection, actor-rejection, and wrong-base paths were exercised locally.\n- Owner-approval behavior was exercised across internal, outside, other-reviewer, stale-approval, and current-owner-approval cases. - GitHub CI and CodeRabbit review are required before merge. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Clarified contribution, review, merge, and branch-promotion requirements. * Updated security and ownership guidance for sensitive repository areas. * Added clearer approval rules for outside and first-time contributors. * **Workflow Improvements** * Added automated validation for pull-request branches and contribution policies. * Added approval checks for eligible external contributions. * Improved issue label cleanup after approved staging-to-main promotions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-20 17:31:15 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#816
No description provided.