fix: support emeritus lists in CONTRIBUTING.md - #3656
immanuwell wants to merge 1 commit into
Conversation
d2008d2 to
3389cd8
Compare
3389cd8 to
0088abc
Compare
There was a problem hiding this comment.
Pull request overview
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Adds support for repos that keep active role lists in CONTRIBUTING.md (rather than README.md) when generating monthly “move to emeritus” PRs, and avoids creating misleading Emeritus entries when the script can’t find a user in an active list.
Changes:
- Add membership-document selection logic that falls back from README to root
CONTRIBUTING.mdwhen active role entries aren’t found in README. - Refactor emeritus update logic to return both applied changes and “missing” users (skipping those users instead of adding incorrect Emeritus entries).
- Add unit tests + CI job to run the script test suite; update docs and link-check exclusions accordingly.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/move-to-emeritus.py | Adds generic repo file fetch + document selection; refactors emeritus application logic to skip missing users |
| scripts/tests/test_move_to_emeritus.py | Adds focused unit tests for document selection and emeritus application behavior |
| .github/workflows/table-check.yml | Runs the new unit tests in CI |
| move-to-emeritus.md | Documents README/CONTRIBUTING fallback behavior and updated terminology (“membership document”) |
| projects/completed-projects/ci-cd.md | Updates Ansible callback plugin link |
| .lychee.toml | Excludes the Ansible link from automated link checking due to rate limiting |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| break | ||
| result = _find_membership_document(repo, user_info) | ||
| if result is None: | ||
| print(f" Could not fetch README for {ORG}/{repo}, skipping.") |
| return any( | ||
| _section_has_member(document, ROLE_SECTIONS[role], user) | ||
| for user, info in user_info.items() | ||
| for role in info["roles"] | ||
| if role in ROLE_SECTIONS | ||
| ) | ||
|
|
||
|
|
| section = _find_section(document, section_name) | ||
| if section: | ||
| start, end, header_level = section | ||
| section_text = document[start:end] | ||
| for member in _parse_members(section_text): | ||
| if member["username"].lower() == user.lower(): | ||
| display_name = member["name"] | ||
| marker = _detect_list_marker(section_text) | ||
| break | ||
| if display_name: | ||
| break |
| - name: test move-to-emeritus script | ||
| run: python -m unittest discover -s scripts/tests |
The monthly emeritus job only checks
README.mdfor role lists.Some repos keep them in
CONTRIBUTING.md, which community policy allows.open-telemetry/opentelemetry-go-instrumentation#3475 added four Emeritus entries to README while leaving the same people active in CONTRIBUTING
The fix falls back to root
CONTRIBUTING.mdwhen README has no matching active member.It also skips missing users instead of creating a misleading Emeritus entry.
Existing README and follow-up issue behavior stays the same
Repro:
MaintainersorApproversonly inCONTRIBUTING.mdpython scripts/move-to-emeritus.py --create-prsTests:
python -m unittest discover -s scripts/tests