Skip to content

ci: smart PR nudge for stale PRs#827

Merged
diberry merged 2 commits intodevfrom
repo-health/pr-nudge
Apr 5, 2026
Merged

ci: smart PR nudge for stale PRs#827
diberry merged 2 commits intodevfrom
repo-health/pr-nudge

Conversation

@diberry
Copy link
Copy Markdown
Collaborator

@diberry diberry commented Apr 4, 2026

Adds a nightly workflow that nudges open PRs stale for 7+ days with ACTIONABLE guidance:

  • 🔴 Lists failing CI checks by name
  • 💬 Counts unresolved review threads (Copilot vs human)
  • 🔄 Identifies who requested changes
  • ⬇️ Warns when behind base branch
  • 📝 Gives drafts 14 days grace period
  • ✅ Tells authors when PR is actually ready to merge

Anti-spam: max 1 nudge per PR per week. Runs weekdays 2pm UTC.

Repo-health PR — no product code changes.

Copilot AI review requested due to automatic review settings April 4, 2026 18:54
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 4, 2026

🔒 Security Review

🔒 Security review: 1 info.

Severity Category Finding Location
ℹ️ info workflow-permissions Workflow grants write permission — verify this is the minimum required scope. .github/workflows/squad-pr-nudge.yml:9

Automated security review — informational only.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 4, 2026

🛫 PR Readiness Check

ℹ️ This comment updates on each push. Last checked: commit 4271d14

PR Scope: 🔧 Infrastructure

⚠️ 3 item(s) to address before review

Status Check Details
Single commit 2 commits — consider squashing before review
Not in draft Ready for review
Branch up to date Up to date with dev
Copilot review No Copilot review yet — it may still be processing
Changeset present Changeset file found
Scope clean No .squad/ or docs/proposals/ files
No merge conflicts No merge conflicts
Copilot threads resolved 3 active Copilot thread(s) resolved (6 outdated skipped)
CI passing 7 check(s) still running

Files Changed (3 files, +196 −0)

File +/−
.changeset/smart-pr-nudge.md +8 −0
.github/copilot-instructions.md +4 −0
.github/workflows/squad-pr-nudge.yml +184 −0

Total: +196 −0


This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 4, 2026

🟡 Impact Analysis — PR #827

Risk tier: 🟡 MEDIUM

📊 Summary

Metric Count
Files changed 3
Files added 2
Files modified 1
Files deleted 0
Modules touched 2

🎯 Risk Factors

  • 3 files changed (≤5 → LOW)
  • 2 modules touched (2-4 → MEDIUM)

📦 Modules Affected

ci-workflows (2 files)
  • .github/copilot-instructions.md
  • .github/workflows/squad-pr-nudge.yml
root (1 file)
  • .changeset/smart-pr-nudge.md

This report is generated automatically for every PR. See #733 for details.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 4, 2026

🏗️ Architectural Review

⚠️ Architectural review: 1 info.

Severity Category Finding Files
ℹ️ info template-sync Template files changed in .github/workflows/ but not in other template locations. If these templates should stay in sync, consider updating the others too. Changed: .github/workflows/, Unchanged: templates/, .squad-templates/, packages/squad-cli/templates/

Automated architectural review — informational only.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 scheduled GitHub Actions workflow to automatically comment on stale pull requests with actionable status guidance, and documents the workflow behavior in the repo’s Copilot instructions.

Changes:

  • Introduces a weekday cron workflow that scans stale open PRs and posts a “nudge” comment with detected blockers.
  • Adds documentation in .github/copilot-instructions.md describing the PR nudge workflow’s intent and behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
.github/workflows/squad-pr-nudge.yml New scheduled workflow to diagnose stale PR status and post automated nudge comments.
.github/copilot-instructions.md Documents the new PR nudge workflow behavior and schedule.

Comment thread .github/workflows/squad-pr-nudge.yml
Comment thread .github/workflows/squad-pr-nudge.yml
Comment thread .github/workflows/squad-pr-nudge.yml
Comment thread .github/workflows/squad-pr-nudge.yml
Comment thread .github/workflows/squad-pr-nudge.yml
Comment thread .github/workflows/squad-pr-nudge.yml
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

Comment thread .github/workflows/squad-pr-nudge.yml
Comment thread .github/workflows/squad-pr-nudge.yml Outdated
Comment thread .github/workflows/squad-pr-nudge.yml
@diberry diberry force-pushed the repo-health/pr-nudge branch from c74abab to e2bcdc9 Compare April 4, 2026 23:41
Copy link
Copy Markdown
Collaborator

@tamirdresher tamirdresher left a comment

Choose a reason for hiding this comment

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

✅ LGTM — Excellent nightly nudge: actionable diagnostics, anti-spam marker, draft grace period, GraphQL thread analysis.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@diberry diberry force-pushed the repo-health/pr-nudge branch from 61884e5 to 6580866 Compare April 5, 2026 19:56
@diberry diberry merged commit f6f37c1 into dev Apr 5, 2026
19 checks passed
tamirdresher added a commit that referenced this pull request Apr 8, 2026
)

* feat(ci): add file list with line stats, scope badge, and check subtitles to PR readiness (#813)

- Add file list table with per-file +additions/-deletions stats
- Add PR scope classification (Product/Infrastructure/Mixed)
- Rename Architectural Review and Security Review checks with descriptive subtitles

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

* ci: scope boundary enforcement for repo-health PRs (#826)

Add CI check that fails when repo-health PRs include product source
code changes under packages/*/src/. Prevents scope creep where
infrastructure PRs accidentally touch product code.

- Add squad-scope-check.yml workflow
- Document PR scope rules in copilot-instructions.md
- Fail loudly on git diff errors instead of silently passing

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

* ci: smart PR nudge for stale PRs (#827)

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

* test: add cross-package export smoke test to catch missing imports

Validates every value import squad-cli uses from squad-sdk resolves to
a defined export at runtime.  Covers 15 SDK subpaths and 50+ named
exports including FSStorageProvider, SquadClient, CastingEngine,
RalphMonitor, and all resolution/config/platform helpers.

Also verifies that every entry in the SDK package.json exports map
points to a file that actually exists on disk.

Motivation: v0.9.3-insider.1 shipped with FSStorageProvider missing
from the SDK barrel — broke users at runtime while all TS-level tests
passed (TypeScript resolves from source, not compiled output).

Refs: #836

---------

Co-authored-by: Dina Berry (MSFT) <diberry@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
tamirdresher added a commit that referenced this pull request Apr 21, 2026
)

* feat(ci): add file list with line stats, scope badge, and check subtitles to PR readiness (#813)

- Add file list table with per-file +additions/-deletions stats
- Add PR scope classification (Product/Infrastructure/Mixed)
- Rename Architectural Review and Security Review checks with descriptive subtitles

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

* ci: scope boundary enforcement for repo-health PRs (#826)

Add CI check that fails when repo-health PRs include product source
code changes under packages/*/src/. Prevents scope creep where
infrastructure PRs accidentally touch product code.

- Add squad-scope-check.yml workflow
- Document PR scope rules in copilot-instructions.md
- Fail loudly on git diff errors instead of silently passing

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

* ci: smart PR nudge for stale PRs (#827)

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

* test: add cross-package export smoke test to catch missing imports

Validates every value import squad-cli uses from squad-sdk resolves to
a defined export at runtime.  Covers 15 SDK subpaths and 50+ named
exports including FSStorageProvider, SquadClient, CastingEngine,
RalphMonitor, and all resolution/config/platform helpers.

Also verifies that every entry in the SDK package.json exports map
points to a file that actually exists on disk.

Motivation: v0.9.3-insider.1 shipped with FSStorageProvider missing
from the SDK barrel — broke users at runtime while all TS-level tests
passed (TypeScript resolves from source, not compiled output).

Refs: #836

---------

Co-authored-by: Dina Berry (MSFT) <diberry@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
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.

3 participants