Skip to content

fix(ci): use ignore-pr-updates for stale PR detection, disable issues - #800

Merged
CatherineSue merged 1 commit into
mainfrom
fix/stale-workflow-ignore-updates
Mar 18, 2026
Merged

CatherineSue merged 1 commit into
mainfrom
fix/stale-workflow-ignore-updates

Conversation

@CatherineSue

@CatherineSue CatherineSue commented Mar 18, 2026 •

Copy link
Copy Markdown
Member

Description

Problem

Follow-up to #798. The actions/stale workflow uses updated_at by default to determine staleness. GitHub silently bumps updated_at for invisible events like merge conflict recalculation when main changes. Manual testing confirmed old PRs like #463 and #253 (inactive since Jan/Feb) were marked "not stale" because updated_at showed yesterday.

Solution

  • Set ignore-pr-updates: true so staleness is tracked from the stale label creation date, not updated_at. Only real activity (comments, commits) that removes the stale label resets the timer.
  • Disable issue processing (days-before-issue-stale: -1) to focus on PRs only for now.
  • Remove issues: write permission since we no longer process issues.

Changes

  • .github/workflows/stale.yml: Add ignore-pr-updates, disable issues, simplify permissions

Test Plan

After merge, trigger manually via Actions tab and verify old inactive PRs receive the stale label.

Summary by CodeRabbit

  • Chores
    • Refined pull request automation by refocusing the stale detection workflow to handle pull requests exclusively with improved staleness tracking based on PR activity and creation dates.

actions/stale uses updated_at by default, which GitHub silently bumps
for invisible events like merge conflict recalculation when main
changes. This prevents stale detection from ever triggering on old PRs.

Set ignore-pr-updates: true so staleness is tracked from the stale
label creation date instead of updated_at. Only real activity (comments,
commits) that removes the stale label resets the timer.

Also disable issue processing (days-before-issue-stale: -1) to focus
on PRs only for now.

Signed-off-by: Chang Su <chang.s.su@oracle.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@coderabbitai

coderabbitai Bot commented Mar 18, 2026 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 99596b45-fea5-435e-910a-c40d2cee21e7

📥 Commits

Reviewing files that changed from the base of the PR and between 3cf406d and 0d36374.

📒 Files selected for processing (1)
  • .github/workflows/stale.yml

📝 Walkthrough

Walkthrough

This pull request refocuses the stale workflow automation to target pull requests exclusively. The workflow is reconfigured to disable issue staleness processing, set PR staleness thresholds to 14 days for stale marking and 16 days for closure, and adds improved staleness tracking by ignoring routine PR updates.

Changes

Cohort / File(s) Summary
Workflow Configuration
.github/workflows/stale.yml
Renamed job to focus on PR automation only. Disabled issue staleness by setting issue thresholds to -1, configured PR staleness (14-day stale, 16-day close), removed issue-related messages, and added ignore-pr-updates: true for more accurate staleness tracking.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested labels

ci

Suggested reviewers

  • key4ng
  • slin1237
  • XinyueZhang369

Poem

🐰 A hop, a skip, a workflow refined,
Pull requests stale in fourteen days we'll find,
No more issues cluttering our way,
Sixteen days to close, no delay!
The workflow now sees—updates won't play! ✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/stale-workflow-ignore-updates
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@CatherineSue
CatherineSue merged commit 1c99e5f into main Mar 18, 2026
9 of 11 checks passed
@CatherineSue
CatherineSue deleted the fix/stale-workflow-ignore-updates branch March 18, 2026 03:56

@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: 0d3637465d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

# Use creation/update of stale label to track staleness instead of
# updated_at, which GitHub silently bumps for invisible events like
# merge conflict recalculation when main changes.
ignore-pr-updates: true

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 Remove ignore-pr-updates from stale PR detection

actions/stale does not interpret ignore-pr-updates: true as “start counting from when the stale label was applied”; its docs say this switches the stale threshold to the PR’s created_at. In this workflow, any PR that was opened more than 14 days ago will be marked stale even if it got a real commit or comment yesterday. Because remove-pr-stale-when-updated is still at its default true, active long-lived PRs will have the stale label removed on activity and then re-added on the very next daily run, causing repeated stale comments and incorrect stale status.

Useful? React with 👍 / 👎.

@github-actions github-actions Bot added the ci CI/CD configuration changes label Mar 18, 2026
smfirmin pushed a commit to smfirmin/smg that referenced this pull request Mar 20, 2026
smfirmin pushed a commit to smfirmin/smg that referenced this pull request Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI/CD configuration changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant