Fix #6: add stale assignee manager#16
Conversation
|
@Luffy-D-Zoro is attempting to deploy a commit to the lightcreator1007's projects Team on Vercel. A member of the Team first needs to authorize it. |
…er activity checks)
There was a problem hiding this comment.
Pull request overview
Adds a new scheduled GitHub Actions workflow that detects inactivity on issues labeled contribution in progress, warns assigned contributors after a configurable inactivity window, and unassigns them after a grace period if no activity resumes. This implements the “stale assignee” automation requested in Issue #6 using a hidden HTML marker in issue comments as persistent state.
Changes:
- Introduces
.github/workflows/stale-assignee.ymlwith a daily cron trigger plusworkflow_dispatchinputs (includingdry_run) for safe/manual testing. - Implements assignee inactivity detection using issue assignment timeline events, issue comments, and linked PR activity derived from PR body references.
- Performs warning → grace period → unassign flow, and removes the in-progress label when no assignees remain.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const allPullRequests = await listAllPullRequests(); | ||
| console.log(`Fetched ${allPullRequests.length} PullRequest for linked Pr`); | ||
|
|
||
| const targetIsssueNUmbers = buildTargetIssueNumbers(issues); | ||
|
|
There was a problem hiding this comment.
Good point. I agree scanning all PRs can become expensive as the repo grows. I’m keeping the current implementation in this PR because it is functionally correct and the repo size is small, but I can move linked PR discovery to an issue-scoped search/query in a follow-up if preferred.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
Sorry for the delayed response, I missed this review earlier. I’ve pushed a follow-up commit addressing the actionable state-handling feedback: added concurrency, preserved warning state for UNKNOWN/SKIP PR activity, and cleaned up invalid pre-assignment warning comments. I’ve also replied separately on the PR-scan scalability point. |
Summary
Fix #6 .Adds a scheduled GitHub Actions workflow to detect inactive contributors on issues labeled contribution in progress.
The workflow checks The Assignee Activity on an issue ,and then warn after configured Inactivity Window If they are inactive ,and then unassigns them after the grace period if no issue or linked PR activity resumes.It uses issue comments, assignment timeline events, and linked PR activity to avoid unassigning contributors who are actively working.
Reviewer Guidance
Start with .github/workflows/stale-assignee.yml.
The core logic is inside the github-script step, especially:
issue assignment age tracking
warning marker detection
linked PR detection from PR body references
PR activity classification for commits, reviews, comments, draft PRs, closed PRs, and merged PRs
A hidden warning marker is used instead of a database so the workflow can remember whether an assignee has already been warned.
Essential Checklist
Fix #bugnum:, followed by a short, clear summary of the changes. (If this PR fixes part of an issue, prefix the title withFix part of #bugnum: ....)mainormaster.Proof of Work
Used
node --checkfor syntax checking .And Checked Cases By Making a fake repo and then running the workflow .Some of the general one like :
Issue comment activity:
contribution in progresslabel and assigned myself.PR review activity:
PR review comment activity:
PR conversation comment activity:
Warning and unassignment flow:
AI Usage Disclosure
Used AI For Adding Comments , logs in the Code. Used To Dry Run Some of The Edge Cases .