Skip to content

Auto-sync track GitHub maintained/unmaintained topic - #9289

Open
iHiD wants to merge 2 commits into
mainfrom
track-auto-maintenance-topic
Open

Auto-sync track GitHub maintained/unmaintained topic#9289
iHiD wants to merge 2 commits into
mainfrom
track-auto-maintenance-topic

Conversation

@iHiD

@iHiD iHiD commented Jul 24, 2026

Copy link
Copy Markdown
Member

Problem

Track repos carry a maintained / unmaintained GitHub topic. That topic (not team membership) is what drives the automated PR comments from the ping-cross-track-maintainers-team workflow, 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 plain maintainedunmaintained pair based on whether the track has any members on its GitHub team:
    • has a maintainer + currently unmaintained → set maintained
    • no maintainers + currently maintained → set unmaintained
    • Leaves nuanced categories (wip-track, maintained-autonomous, maintained-solitary) and all other topics (e.g. community-contributions-paused) untouched. No-ops in development.
  • Deferred from Github::TeamMember::Create / Destroy whenever a track-team membership actually changes (guarded on previously_new_record?), so it fires on both the real-time webhook and the SyncTeamMembersJob safety net, but not on no-op resyncs.

Notes

  • This is promote-and-demote: if a track's last maintainer leaves the GitHub team, the repo flips back to unmaintained automatically.
  • It triggers on the next membership change, so it does not retroactively fix repos that already have maintainers (e.g. Fortran needs a one-off manual topic fix).

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

iHiD and others added 2 commits July 24, 2026 15:34
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
@iHiD
iHiD requested a review from ErikSchierboom July 24, 2026 13:41
@ErikSchierboom

Copy link
Copy Markdown
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?

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