Auto-sync track GitHub maintained/unmaintained topic - #9289
Open
iHiD wants to merge 2 commits into
Open
Conversation
Track repos carry a `maintained`/`unmaintained` GitHub topic that drives the automated "this repo is unmaintained" PR comments (via the ping-cross-track-maintainers-team workflow). Until now that topic was a purely manual label, decoupled from team membership, so a track could gain a maintainer yet still get bots telling contributors it was unmaintained. Add Track::UpdateGithubMaintenanceStatus, which toggles the plain maintained <-> unmaintained topic based on whether the track has any members on its GitHub team, and defer it from Github::TeamMember::Create/Destroy whenever a track-team membership actually changes. Nuanced categories (wip-track, maintained-autonomous, maintained-solitary) and other topics are left untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017JuZhHz4ktPDqXMLRpnAgu
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017JuZhHz4ktPDqXMLRpnAgu
Member
|
Before I review this, isn't this what the maintenance script is for that I've written? The main downside being that that doesn't run automatically, but it does cover all cases. Maybe that could be adapted into this script? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Track repos carry a
maintained/unmaintainedGitHub topic. That topic (not team membership) is what drives the automated PR comments from theping-cross-track-maintainers-teamworkflow, including "This is an unmaintained repository." Until now the topic was a purely manual label, fully decoupled from who's on the track's GitHub team. So a track could gain a maintainer and still greet every contributor with bots saying it's unmaintained (this is currently happening on Fortran).Change
Track::UpdateGithubMaintenanceStatus— reads the track repo's topics and toggles the plainmaintained↔unmaintainedpair based on whether the track has any members on its GitHub team:unmaintained→ setmaintainedmaintained→ setunmaintainedwip-track,maintained-autonomous,maintained-solitary) and all other topics (e.g.community-contributions-paused) untouched. No-ops in development.Github::TeamMember::Create/Destroywhenever a track-team membership actually changes (guarded onpreviously_new_record?), so it fires on both the real-time webhook and theSyncTeamMembersJobsafety net, but not on no-op resyncs.Notes
unmaintainedautomatically.Tests
New
update_github_maintenance_status_test.rb(promote / demote / both no-op cases / nuanced-category protection / dev guard) plus updated Create/Destroy tests. All green.🤖 Generated with Claude Code