chore: add contribution gate workflows
Summary
- add a scoped
.github/APPROVED_CONTRIBUTORSallowlist for PR, issue, and all-access entries - add PR and issue gate workflows that default to dry-run / comment-only mode, with
CONTRIBUTION_GATE_MODE: enforceas the explicit close switch - add a maintainer approval workflow that opens an allowlist update PR from exact
/lgtm//lgtmicommands and avoids duplicate pending allowlist PRs across paginated open PRs - document the contribution gate, dry-run rollout, active-contributor seeding expectation, and mistaken-gate restoration flow in
CONTRIBUTING.md
Closes #2086 Closes #688
Testing
- [x] Parsed
.github/workflows/pr-gate.yml,.github/workflows/issue-gate.yml, and.github/workflows/approve-contributor.ymlwith PyYAML - [x] Ran
node --checkon each embeddedactions/github-scriptblock after wrapping it the way GitHub Script executes async code - [x]
git diff --check - [x]
git diff --cached --check - [x]
cargo fmt --all -- --check - [x] PR CI
Lint - [x] PR CI
Test (ubuntu-latest) - [x] PR CI
Test (macos-latest) - [x] PR CI
Test (windows-latest) - [x] PR CI
Mobile runtime smoke - [x] PR CI
Version drift - [x] PR CI
npm wrapper smoke (ubuntu-latest) - [x] PR CI
GitGuardian Security Checks - [x] PR CI
Greptile Review
Note: actionlint and Ruby were not installed on this Windows checkout, so local workflow validation used PyYAML plus Node syntax checks. The broader Rust validation is covered by the green PR CI jobs above.
Checklist
- [x] Updated docs or comments as needed
- [x] Added or updated tests where relevant
- Covered by local workflow YAML parsing, embedded GitHub Script syntax checks, and green PR CI.
- [x] Verified TUI behavior manually if UI changes
- No TUI behavior changes.
[!WARNING] You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!
Follow-up review fixes are now in 0ebfcb7b and c70c350c:
- Removed the branch-prefix-only PR gate bypass; legitimate approval PRs are covered by the
github-actions[bot]exemption. - Added the reciprocal
/lgtmiguard so issue approval commands used on pull requests produce a corrective hint instead of silently granting issue-only access. - Removed undocumented bare-username allowlist checks from both gates.
- Aligned
pr-gate.ymlwithissue-gate.ymlby reading.github/APPROVED_CONTRIBUTORSfrom the repository default branch, matching whereapprove-contributor.ymlwrites updates.
Re-ran workflow YAML parsing, embedded GitHub Script node --check, git diff --check, staged diff check, and cargo fmt --all -- --check after the fixes.
Thanks @nightt5879. There is real effort here, and the /lgtm / /lgtmi approval flow is a thoughtful way to turn drive-by contribution control into a maintainable process instead of a hard-coded blocklist.
I am not pulling this into v0.8.50 because it changes community policy and can automatically close contributor work. For the next review pass, the path I would like to see is:
- Add a dry-run/comment-only mode first, so maintainers can observe the gate before it closes PRs/issues.
- Seed the allowlist broadly enough for existing active contributors before enabling enforcement.
- Keep reading the allowlist from the default branch, as the latest commit now does.
- Document exactly how a good external contributor gets restored if the gate fires incorrectly.
CI is green now, so this is not being skipped for code quality; it is being held for rollout safety.
Thanks, I adjusted the PR along that rollout-safety path.
Follow-up changes are now in 433a8eae and 22f602d0:
- The PR/issue gates now default to
CONTRIBUTION_GATE_MODE: dry-run, so merge-time behavior is comment-only and does not close contributor work. Switching toenforceis now an explicit workflow change after maintainers are ready. - The allowlist header and
CONTRIBUTING.mdnow call out the active-contributor seeding step before enforcement is enabled. - The gates continue reading
.github/APPROVED_CONTRIBUTORSfrom the repository default branch. CONTRIBUTING.mdnow documents the mistaken-gate recovery path: approve with/lgtmor/lgtmi, merge the generated allowlist PR, then reopen or ask the contributor to resubmit if reopening is not available.- I also handled the latest Greptile follow-up by paginating the pending allowlist PR lookup, so duplicate-PR suppression is not capped at the first 100 open PRs.
Validation after the changes:
- local workflow YAML parsing passed
- embedded GitHub Script
node --checkpassed git diff --checkand staged diff check passedcargo fmt --all -- --checkpassed- PR CI is green across Lint, ubuntu/macos/windows tests, mobile smoke, version drift, npm wrapper smoke, GitGuardian, and Greptile
Hey @nightt5879 — the contribution gate workflows have been harvested into v0.8.50 (#2504)! The dry-run mode is a nice touch for testing without blocking real contributors. Thanks for building this — CI infrastructure is the kind of invisible work that keeps the project healthy. 🐋🔒
This was harvested into the v0.8.50 release — thank you for the contribution!