400Ping opened a new pull request, #1494: URL: https://github.com/apache/mahout/pull/1494
## Summary Enforces the "at least one committer approves" rule from our [PR Policy](https://mahout.apache.org/docs/master/community/pr-policy-and-review-guidelines) with a required status check on `main`, and sends GitHub Discussions notifications to `dev@` instead of `commits@`. ### Committer approval check - **`.github/workflows/pr-approval-check.yml`** – job `Committer approval`. Runs on `pull_request_target` (opened / synchronize / reopened / ready_for_review) and `pull_request_review` (submitted / edited / dismissed). The script and PMC list are always checked out from the PR's base branch, so a PR cannot change the rule it is checked against; no code from the PR head is executed. Only `contents: read` and `pull-requests: read` are needed, so it works for fork PRs. - **`.github/scripts/check_pr_approval.py`** – stdlib-only. Rules: - PR opened by a PMC member (`.github/pmc-members.txt`) → pass. - Otherwise at least one reviewer whose *latest* review is `APPROVED` must have write access to the repo (per ASF policy every committer has write access). Approvals from non-committers are reported but do not count. - Follows GitHub semantics: a comment-only review keeps an earlier approval; `CHANGES_REQUESTED` or a dismissal removes it. - Fails closed on API errors. Prints a job summary. Can be run locally: `GITHUB_TOKEN=$(gh auth token) python .github/scripts/check_pr_approval.py --repo apache/mahout --pr <n>`. - **`.github/pmc-members.txt`** – GitHub usernames of current PMC members, taken from the Whimsy PMC roster (10 with a GitHub account; jmannix, pranjan, robinanil have none on record and are noted in a comment). Needs updating when the roster changes. - **`.asf.yaml`** – adds `required_status_checks` with the `Committer approval` context (GitHub Actions app id 15368) under `protected_branches.main`. - **`docs/community/pr-policy-and-review-guidelines.md`** – documents the enforced check and the PMC exemption. The two-approval expectation for high-impact changes stays a committer responsibility (not enforced). ### Discussions notifications - **`.asf.yaml`** – `notifications.discussions` changed from `[email protected]` to `[email protected]`. ## Verification Ran the script locally against real PRs: | PR | Situation | Result | |---|---|---| | #1493 | author is PMC (400Ping) | PASS (exempt) | | #1492 | approved by 400Ping and ryankert01 | PASS | | #1487 | no approving review | FAIL | | #1491 | dependabot, no approving review | FAIL | Both YAML files parse; the workflow uses the same SHA-pinned `actions/checkout` as the other workflows. ## Notes for reviewers - The required check only takes effect once this lands on `main` (`.asf.yaml` is read from the default branch, and `pull_request_review` needs the workflow to exist on the default branch). - After merge, PRs already open will need a new push or a review event to get a first run of the check. - Dependabot PRs will also need a committer approval before merging. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
