[PR #4268] [MERGED] fix(ci): verify trusted contributor membership #6310

Closed
opened 2026-10-23 04:09:11 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: staging ← Head: agent/fix-internal-approval-gate-4267


📝 Commits (5)

  • 95bed38 fix(ci): verify trusted contributor membership
  • 18b10d2 fix(ci): exempt repository owner without token
  • ae6eb6c Merge branch 'staging' into agent/fix-internal-approval-gate-4267
  • 25689d2 fix(ci): trust active organization members
  • ed2ac4e fix(ci): remove redundant owner membership probe

📊 Changes

4 files changed (+63 additions, -10 deletions)

View changed files

📝 .github/agents/chai-workflow.md (+1 -1)
📝 .github/workflows/pull-request-triage.yml (+60 -7)
📝 AGENTS.md (+1 -1)
📝 CONTRIBUTING.md (+1 -1)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Authors outside the Pasta-Devs organization require an approving review from SpicyMarinara.

Linked issue

Closes #4267

Why this change

  • The owner-approval gate relies on author_association, which rejected active Pasta-Devs organization members and owners while also treating branch location as an internal-contributor signal.
  • Every active user shown in the Pasta-Devs organization People roster with role Member or Owner should pass automatically. Everyone outside the organization—including outside collaborators, first-time contributors, and ordinary external contributors—must receive approval from SpicyMarinara for the current head commit.

What changed

  • Exempt SpicyMarinara explicitly so the repository owner does not depend on a membership credential.
  • Classify other PR authors through the authoritative Pasta-Devs organization membership API and trust only active Member or Owner roles.
  • Remove the same-repository and author_association bypasses from the owner-approval gate.
  • Preserve the existing current-head review requirement for every external author.
  • Align AGENTS.md, CONTRIBUTING.md, and the AI workflow overlay with the corrected organization-role policy.
  • Fail closed with an explicit configuration error when organization membership cannot be verified.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

Automated validation performed while preparing this draft:

  • pnpm check
  • Prettier check for .github/workflows/pull-request-triage.yml
  • Actionlint v1.7.12
  • YAML parser validation
  • Mock policy matrix covering the explicit owner without a token, active organization Member, active organization Owner, outside collaborator, first-time contributor, ordinary external contributor, inactive membership, untrusted organization role, and missing-token fail-closed behavior

Before private organization membership can be recognized, configure the repository secret PASTA_DEVS_MEMBERS_TOKEN with a fine-grained PAT or GitHub App token that has Pasta-Devs organization Members: read permission. Because this workflow uses pull_request_target, the updated gate takes effect only after the workflow reaches the default branch (main).

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] <paths> follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

Not applicable; this change affects GitHub Actions policy only.

Summary by CodeRabbit

  • Workflow Improvements

    • Updated pull request checks to more accurately distinguish internal contributors from outside contributors.
    • Outside and first-time contributions continue to require owner approval before staging merges.
    • Required checks and automated review must complete before merges.
  • Documentation

    • Clarified staging merge permissions for active organization members and owners.
    • Updated contribution and workflow guidance to reflect current approval requirements.
    • Retained restricted promotion of staging changes to the main branch.

🔄 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-Engine/pull/4268 **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/fix-internal-approval-gate-4267` --- ### 📝 Commits (5) - [`95bed38`](https://github.com/Pasta-Devs/Marinara-Engine/commit/95bed388e790649d3bd8efff25ce4dca4413411f) fix(ci): verify trusted contributor membership - [`18b10d2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/18b10d226819a6c60b714df71815ffa722e86f9d) fix(ci): exempt repository owner without token - [`ae6eb6c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ae6eb6c84487dbfe4edd9f8382914657c56d717a) Merge branch 'staging' into agent/fix-internal-approval-gate-4267 - [`25689d2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/25689d2f8518f44ff5ee0b4ae1b53b2283732935) fix(ci): trust active organization members - [`ed2ac4e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ed2ac4eb532129710a87404969f3b06b3bb3ba9b) fix(ci): remove redundant owner membership probe ### 📊 Changes **4 files changed** (+63 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `.github/agents/chai-workflow.md` (+1 -1) 📝 `.github/workflows/pull-request-triage.yml` (+60 -7) 📝 `AGENTS.md` (+1 -1) 📝 `CONTRIBUTING.md` (+1 -1) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Authors outside the Pasta-Devs organization require an approving review from `SpicyMarinara`. ## Linked issue Closes #4267 ## Why this change - The owner-approval gate relies on `author_association`, which rejected active Pasta-Devs organization members and owners while also treating branch location as an internal-contributor signal. - Every active user shown in the Pasta-Devs organization People roster with role `Member` or `Owner` should pass automatically. Everyone outside the organization—including outside collaborators, first-time contributors, and ordinary external contributors—must receive approval from `SpicyMarinara` for the current head commit. ## What changed - Exempt `SpicyMarinara` explicitly so the repository owner does not depend on a membership credential. - Classify other PR authors through the authoritative Pasta-Devs organization membership API and trust only active `Member` or `Owner` roles. - Remove the same-repository and `author_association` bypasses from the owner-approval gate. - Preserve the existing current-head review requirement for every external author. - Align `AGENTS.md`, `CONTRIBUTING.md`, and the AI workflow overlay with the corrected organization-role policy. - Fail closed with an explicit configuration error when organization membership cannot be verified. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes Automated validation performed while preparing this draft: - `pnpm check` - Prettier check for `.github/workflows/pull-request-triage.yml` - Actionlint v1.7.12 - YAML parser validation - Mock policy matrix covering the explicit owner without a token, active organization Member, active organization Owner, outside collaborator, first-time contributor, ordinary external contributor, inactive membership, untrusted organization role, and missing-token fail-closed behavior Before private organization membership can be recognized, configure the repository secret `PASTA_DEVS_MEMBERS_TOKEN` with a fine-grained PAT or GitHub App token that has Pasta-Devs organization **Members: read** permission. Because this workflow uses `pull_request_target`, the updated gate takes effect only after the workflow reaches the default branch (`main`). ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n] <paths>` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) Not applicable; this change affects GitHub Actions policy only. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Workflow Improvements** * Updated pull request checks to more accurately distinguish internal contributors from outside contributors. * Outside and first-time contributions continue to require owner approval before staging merges. * Required checks and automated review must complete before merges. * **Documentation** * Clarified staging merge permissions for active organization members and owners. * Updated contribution and workflow guidance to reflect current approval requirements. * Retained restricted promotion of staging changes to the main branch. <!-- 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-23 04:09:11 +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-Engine#6310
No description provided.