Skip to content

CI: base draft PR staleness on real activity, not pr.updated_at#6472

Merged
brtnfld merged 1 commit into
HDFGroup:developfrom
brtnfld:fix/draft-pr-policy-real-activity
Jun 19, 2026
Merged

CI: base draft PR staleness on real activity, not pr.updated_at#6472
brtnfld merged 1 commit into
HDFGroup:developfrom
brtnfld:fix/draft-pr-policy-real-activity

Conversation

@brtnfld

@brtnfld brtnfld commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • draft-pr-policy.js decided whether a draft PR is stale by checking daysSince(pr.updated_at), but GitHub bumps updated_at on metadata-only changes (reviewer requested/removed, labels, milestone, assignee) with no real work happening.
  • Found via PR DNM Filters: Demonstrate failures in can_apply and set_local #6162: it dodged the 60-day draft-stale window because a reviewer request was removed 8 days ago, even though the last real commit was ~143 days ago.
  • Adds lastRealActivityAt(), which takes the max timestamp across the PR's commits, issue comments, reviews, and review comments, and uses that instead of pr.updated_at for the staleness gate.

pr.updated_at is bumped by metadata-only changes (reviewer
requested/removed, labels, milestone, assignee), letting an
abandoned draft dodge the staleness check indefinitely. Use the
latest commit/comment/review/review-comment timestamp instead.
@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Review Checklist

This PR touches the following areas. Each needs a sign-off
from its listed owners before merging.

✅ All areas have been signed off.

@brtnfld brtnfld merged commit e251b34 into HDFGroup:develop Jun 19, 2026
133 of 136 checks passed
@github-project-automation github-project-automation Bot moved this from To be triaged to Done in HDF5 - TRIAGE & TRACK Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants