Skip to content

Add PR Needs-Author-Feedback lifecycle to fabricbot configuration#49151

Open
MuyuanMS wants to merge 1 commit into
mainfrom
issue/5074-pr-needs-author-feedback-fabricbot
Open

Add PR Needs-Author-Feedback lifecycle to fabricbot configuration#49151
MuyuanMS wants to merge 1 commit into
mainfrom
issue/5074-pr-needs-author-feedback-fabricbot

Conversation

@MuyuanMS

@MuyuanMS MuyuanMS commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds fabricbot rules to manage the Needs-Author-Feedback label lifecycle for pull requests, complementing the existing issue management rules in resourceManagement.yml.

This is a simpler alternative to the GitHub Actions workflow approach (PR #48812), trading advanced features (draft conversion, author-specific activity tracking) for zero-maintenance fabricbot automation.

Behavior

Flow diagram

┌──────────────────────────────────────────────────────────────────────┐
│  Maintainer adds "Needs-Author-Feedback" label to a PR              │
└──────────────────────────────────────────────────────────────────────┘
         │
         ▼
┌─────────────────────────────────────┐     ┌──────────────────────────────────┐
│  7 days, no activity                │────►│  Add "Status-No recent activity" │
│                                     │     │  + post warning comment          │
└─────────────────────────────────────┘     └──────────────────────────────────┘
         │                                               │
         ▼                                               ▼
┌─────────────────────────────────────┐     ┌──────────────────────────────────┐
│  7 more days (14 total), no activity│────►│  Close PR + post closing comment │
└─────────────────────────────────────┘     └──────────────────────────────────┘

┌──────────────────────────────────────────────────────────────────────┐
│  Author pushes commits OR comments on PR (at any point)              │
└──────────────────────────────────────────────────────────────────────┘
         │
         ▼
    Remove "Needs-Author-Feedback" → Add "Needs-Triage"
    Remove "Status-No recent activity" (if present)

Scheduled searches (every 6 hours)

Condition Action
PR + Needs-Author-Feedback + 7 days inactive + no Status-No recent activity Add Status-No recent activity label + warning comment
PR + Needs-Author-Feedback + Status-No recent activity + 7 more days inactive Post closing comment + close PR

Event responders

Trigger Action
Author comments on PR (Issue_Comment + issueAuthor) Remove Needs-Author-Feedback, add Needs-Triage + Needs-Team-Response
Author pushes commits (Pull_Request + Synchronize + issueAuthor) Remove Needs-Author-Feedback, add Needs-Triage
Any PR update activity Remove Status-No recent activity

Bot messages

Warning (at 7 days):

This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment. To keep this PR active, please push your changes or leave a comment.

Closing (at 14 days):

This pull request has been automatically closed because it has been marked as requiring author feedback but has not had any activity for 14 days. If you would like to continue working on this, please reopen the PR and push your changes.

Comparison with GitHub Actions workflow (PR #48812)

Feature This PR (fabricbot) PR #48812 (Actions)
Convert to draft at 7 days ❌ Not supported ✅ Via GraphQL
Close at 14 days
Author-specific activity tracking ❌ Any activity resets timer ✅ Only author activity counts
Bot comment resets timer ⚠️ Yes (fabricbot limitation) ✅ No (filtered out)
Maintenance burden None (fabricbot managed) Low (workflow file)
Testing before merge ❌ No local testing workflow_dispatch + dry-run
Review comment detection ❌ Only issue comments ✅ Reviews + inline comments

Trade-offs

Pros:

  • Zero maintenance — fabricbot is a managed service
  • Consistent with existing issue management patterns in the same file
  • No workflow YAML to debug or maintain

Cons:

  • No draft conversion (fabricbot cannot call GraphQL)
  • noActivitySince counts all activity — bot comments, maintainer comments, and label changes all reset the inactivity timer
  • Cannot distinguish author activity from other activity
  • No way to test locally or with dry-run before merge

Relationship to existing automation

Mirrors the existing issue rules (lines 11-43) which use the same pattern:

  • Issues: 5 days → warning, 5 more days → close
  • PRs (this change): 7 days → warning, 7 more days → close

Adds fabricbot rules to handle Needs-Author-Feedback on PRs:
- After 7 days of no activity: add Status-No recent activity + warning
- After 7 more days (14 total): close PR with explanation comment
- When author pushes commits: remove Needs-Author-Feedback, add Needs-Triage
- When PR has any activity: remove Status-No recent activity

This is a simpler alternative to the GitHub Actions workflow approach,
trading the draft-conversion feature for zero-maintenance fabricbot
automation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the existing FabricBot (GitOps.PullRequestIssueManagement) policy to manage the Needs-Author-Feedback label lifecycle for pull requests, mirroring the existing stale/close automation already in place for issues.

Changes:

  • Add scheduled searches for PRs to warn after 7 days of inactivity and close after an additional 7 days (using Status-No recent activity).
  • Add an event responder for PR Synchronize (new commits) by the PR author to remove Needs-Author-Feedback and re-queue with Needs-Triage.
  • Add an event responder to remove Status-No recent activity on any PR update activity.

@MuyuanMS MuyuanMS marked this pull request as ready for review July 7, 2026 09:41
@MuyuanMS MuyuanMS requested a review from a team as a code owner July 7, 2026 09:41
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