Skip to content

Fix #6: add stale assignee manager#16

Open
Luffy-D-Zoro wants to merge 4 commits into
bsoc-bitbyte:mainfrom
Luffy-D-Zoro:ci/stale-assignee-workflow
Open

Fix #6: add stale assignee manager#16
Luffy-D-Zoro wants to merge 4 commits into
bsoc-bitbyte:mainfrom
Luffy-D-Zoro:ci/stale-assignee-workflow

Conversation

@Luffy-D-Zoro

Copy link
Copy Markdown

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

  • The PR title starts with Fix #bugnum: , followed by a short, clear summary of the changes. (If this PR fixes part of an issue, prefix the title with Fix part of #bugnum: ....)
  • "Allow edits from maintainers" is checked. (Instructions)
  • The PR is made from a branch that's not called main or master.

Proof of Work

Used node --check for syntax checking .

And Checked Cases By Making a fake repo and then running the workflow .Some of the general one like :

  • Issue comment activity:

    • Created an issue with the contribution in progress label and assigned myself.
    • Ran the workflow with no assignee activity and confirmed it detected the assignee as inactive.
    • Added an issue comment as the assignee and confirmed the workflow treated the assignee as active and skipped stale action.
  • PR review activity:

    • Opened a linked PR from the assignee using an issue reference in the PR body.
    • Added maintainer review feedback.
    • Confirmed the workflow waited for contributor activity after the review instead of treating the assignee as inactive immediately.
    • Added a contributor commit after the review and confirmed the PR counted as active.
  • PR review comment activity:

    • Added an inline review comment on the linked PR.
    • Confirmed the workflow used the inline review comment as an action-required signal.
    • Added an assignee review comment after that and confirmed it counted as activity.
  • PR conversation comment activity:

    • Added a normal PR conversation comment from a non-assignee.
    • Confirmed the workflow treated it as maintainer feedback requiring assignee response.
    • Added a PR conversation comment from the assignee and confirmed the PR counted as active.
  • Warning and unassignment flow:

    • Verified that inactive assignees receive a warning first.
    • Verified that the workflow only unassigns after the warning grace period if no activity resumes.
    • Verified that recent assignee activity removes/skips the stale warning path.
workflowtest1 wf20 wf14 wf2

AI Usage Disclosure

Used AI For Adding Comments , logs in the Code. Used To Dry Run Some of The Edge Cases .

@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

@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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.yml with a daily cron trigger plus workflow_dispatch inputs (including dry_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.

Comment thread .github/workflows/stale-assignee.yml
Comment thread .github/workflows/stale-assignee.yml
Comment thread .github/workflows/stale-assignee.yml Outdated
Comment thread .github/workflows/stale-assignee.yml Outdated
Comment on lines +871 to +875
const allPullRequests = await listAllPullRequests();
console.log(`Fetched ${allPullRequests.length} PullRequest for linked Pr`);

const targetIsssueNUmbers = buildTargetIssueNumbers(issues);

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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.

Luffy-D-Zoro and others added 2 commits July 6, 2026 17:11
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Luffy-D-Zoro

Copy link
Copy Markdown
Author

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.

@LightCreator1007 LightCreator1007 added lgtm looks good to me BSoC'26 labels Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BSoC'26 hard hard level issue lgtm looks good to me

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WORKFLOWS: Add workflow to unassign inactive contributors

3 participants