Skip to content

chore(.github): add stale PR workflow - #1170

Open
andrewdennis117 wants to merge 1 commit into
mainfrom
reg-126-stale-pr-workflow
Open

andrewdennis117 wants to merge 1 commit into
mainfrom
reg-126-stale-pr-workflow

Conversation

@andrewdennis117

@andrewdennis117 andrewdennis117 commented Oct 7, 2026 •

Copy link
Copy Markdown

Description

Adds a daily workflow that marks and closes PRs that are waiting on their author.

  • A PR is "waiting on the author" when the latest comment or review from someone else is newer than the author's latest comment, review, or push. Bots and approvals don't count, and PRs with no feedback yet are never marked.
  • After 7 days waiting on the author, the PR gets the stale label. If there's still no response 3 days later, it's closed. Stale and close messages are empty, matching coder/coder.
  • Any comment, review, or push from the author removes the label.
  • PRs are processed oldest first, with at most 60 label or close actions per run.
  • Creates the stale label if it doesn't exist. Issues aren't affected.
  • Manual runs have a dry_run option that only logs what would change.

Plain actions/stale only tracks last-updated time, so the "waiting on the author" check lives in .github/scripts/stale-prs.js, run through actions/github-script.

Type of Change

  • Other

Testing & Validation

  • Code formatted (bun fmt)
  • After merge: run manually with dry_run and review the logs

@linear-code

linear-code Bot commented Oct 7, 2026

Copy link
Copy Markdown

REG-126

matifali commented Oct 8, 2026

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T20:11:21.704889Z 40a75ad Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 40a75ad6b8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if (commit.author?.login === author || commit.committer?.login === author) {
activity.lastAuthorAt = Math.max(
activity.lastAuthorAt,
toTime(commit.commit?.committer?.date),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Use the actual push time for author activity

When an author responds to review by pushing a commit that was created earlier—for example, an old local commit—commit.commit.committer.date remains earlier than the review because it is commit metadata, not the time the branch was pushed. lastAuthorAt therefore is not advanced, so the workflow can leave the stale label in place and automatically close an actively updated PR. Track the branch update time rather than the embedded commit timestamp.

Useful? React with 👍 / 👎.

@35C4n0r 35C4n0r left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@andrewdennis117 let's handle the case for

  • /command cases, for example /scorecard should not start the timer.
  • Bot PRs opened by @blink or Dependabot

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.

4 participants