Skip to content

fix(.asf.yaml): discussions notification target + real check names in branch protection#3404

Open
deacon-mp wants to merge 1 commit into
masterfrom
fix/asf-yaml-discussions-and-protection
Open

fix(.asf.yaml): discussions notification target + real check names in branch protection#3404
deacon-mp wants to merge 1 commit into
masterfrom
fix/asf-yaml-discussions-and-protection

Conversation

@deacon-mp

Copy link
Copy Markdown
Contributor

Summary

Fixes the ASF Infra processing error emitted since #3400 merged:

An error occurred while processing the github feature in .asf.yaml: GitHub discussions can only be enabled if a mailing list target exists for it.

Changes

  1. notifications.discussions: dev@caldera.apache.org — per the asf.yaml spec, github.features.discussions: true requires a discussions notification target. Routed to dev@ alongside issues and pullrequests traffic.
  2. protected_branches contexts corrected to real check-run names. The previous contexts named workflows (Code Quality, Security Checks); GitHub required status checks match check-run (job) names, so those contexts would never be reported and — combined with strict: true — would have wedged every merge the moment the block applied. Replaced with the six job names, verified byte-exact against the check runs recorded on master's head commit (46af343a): the four build (3.x, ...coverage-ci) legs plus build (3.13, safety) and build (3.13, bandit). sonar_fork_pr is deliberately excluded (only materializes on fork PRs).

Effect when this lands

The discussions error has been aborting the entire github: block, so none of it is currently applied. Once this merges and Infra processes it, the full block takes effect, including branch protection on master: 1 approving review required (stale reviews dismissed), the six CI contexts required, branches must be up to date, conversations must be resolved. This is a deliberate policy activation — from then on, PRs (including Dependabot's, whose six required contexts all still report) need a review before merge.

…ames in branch protection

ASF Infra rejects the github feature block with 'GitHub discussions can
only be enabled if a mailing list target exists for it' — features.discussions
requires a notifications.discussions target. Route it to dev@, alongside
issues and pullrequests.

Because that error aborted the whole github block, protected_branches has
never actually applied. Its required_status_checks contexts named workflows
(Code Quality, Security Checks) rather than check runs, which would never be
reported and would wedge every merge once active. Replace them with the six
real job names as recorded on GitHub check runs. Review requirement (1
approving review, stale-review dismissal) and strict up-to-date checks now
take effect deliberately.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the repository’s Apache Infra self-service configuration (.asf.yaml) to (1) satisfy ASF’s requirement for enabling GitHub Discussions and (2) correctly enforce branch protection on master using real GitHub Actions check-run (job) names so merges aren’t inadvertently blocked.

Changes:

  • Add a notifications.discussions email target required for github.features.discussions: true.
  • Replace branch protection required-status-check contexts from workflow names to the concrete job/check-run names emitted by GitHub Actions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .asf.yaml
Comment on lines 54 to 56
protected_branches:
master:
required_pull_request_reviews:
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.

2 participants