[PR #26] [MERGED] feat(stale): reusable stale-PR workflow + name the repo in the Slack digest (BE-2776) #36

Closed
opened 2026-10-26 22:35:37 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/github-workflows/pull/26
Author: @mattmillerai
Created: 7/9/2026
Status: ✅ Merged
Merged: 7/21/2026
Merged by: @mattmillerai

Base: main ← Head: matt/be-2776-stale-reusable


📝 Commits (3)

  • 36f24ca feat(stale): add reusable stale-PR workflow + name the repo in the Slack digest (BE-2776)
  • a56f3a8 Merge remote-tracking branch 'origin/main' into matt/be-2776-stale-reusable
  • e75e2f2 fix(stale): harden Slack digest step per review panel (BE-2776)

📊 Changes

2 files changed (+219 additions, -0 deletions)

View changed files

➕ .github/workflows/stale.yml (+218 -0)
📝 README.md (+1 -0)

📄 Description

ELI-5

Two repos (cloud and comfy-infra) each had their own copy of the same "stale PR bot" workflow, and both post to the same Slack channel. Their digests looked identical — a bare #158 doesn't say which repo it's from, so the two batches were impossible to tell apart. This adds one shared reusable version of that workflow to this repo (so there's no more copy-paste drift), and makes the Slack header name the source repo so each batch is unambiguous.

What this PR does

  • Adds .github/workflows/stale.yml as a reusable (on: workflow_call). It ports the existing actions/stale + Slack chat.postMessage logic verbatim, parameterizing what differs per repo:
    • slack_channel (default C08V9NDB3B4), days_before_pr_stale/days_before_pr_close, stale_pr_message/close_pr_message, stale_pr_label, exempt_pr_labels, and a dry_run pass-through. SLACK_BOT_TOKEN is passed via secrets: (optional — the sweep still runs without it).
    • The caller owns the schedule + workflow_dispatch dry-run toggle (a reusable can't declare those triggers); the header documents the caller pattern.
  • Names the repo in the digest header (*Stale PR bot — <owner/repo>*) so two repos' batches in the same channel are distinguishable. Per-PR link lines are unchanged — they already resolve via github.repository.
  • Updates the README workflows table.

actionlint (+ shellcheck on the inline script) is clean.

Follow-ups (must land after this merges)

Per the "land the reusable first, then flip callers" sequencing (a caller referencing a not-yet-merged path fails), these are separate PRs in their own repos, pinned to this PR's merge SHA:

  1. Replace Comfy-Org/cloud/.github/workflows/stale.yml with a thin caller.
  2. Replace Comfy-Org/comfy-infra/.github/workflows/stale.yml with a thin caller.
  3. Optionally add a bump-stale-callers.yml dispatcher (mirroring bump-cursor-review-callers.yml) to keep those callers pinned — deferred because the callers don't exist yet.
  4. Confirm whether any other repo carries the same PR+Slack-digest stale bot (org search shows only cloud + comfy-infra match; the various stale-issues.yml are a different issue-triage bot, out of scope).

Judgment calls

  • exempt_pr_labels default is cloud's superset (includes do-not-merge); comfy-infra's current copy omits it. Broadening to exempt do-not-merge is arguably an improvement (don't nag/close a deliberately-held PR), but the comfy-infra caller can override the input to its exact prior set if desired.
  • The "auto-closes in N days" text now interpolates days_before_pr_close instead of a hardcoded "14"; the closed-digest line drops the "(~4 weeks inactive)" parenthetical since it was only accurate at the default 14/14 thresholds.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/github-workflows/pull/26 **Author:** [@mattmillerai](https://github.com/mattmillerai) **Created:** 7/9/2026 **Status:** ✅ Merged **Merged:** 7/21/2026 **Merged by:** [@mattmillerai](https://github.com/mattmillerai) **Base:** `main` ← **Head:** `matt/be-2776-stale-reusable` --- ### 📝 Commits (3) - [`36f24ca`](https://github.com/Comfy-Org/github-workflows/commit/36f24ca6a8a41cb780809fa40e0c995f022dcb6b) feat(stale): add reusable stale-PR workflow + name the repo in the Slack digest (BE-2776) - [`a56f3a8`](https://github.com/Comfy-Org/github-workflows/commit/a56f3a817c274d5f83149c87c0433d2c5b5c903d) Merge remote-tracking branch 'origin/main' into matt/be-2776-stale-reusable - [`e75e2f2`](https://github.com/Comfy-Org/github-workflows/commit/e75e2f2214c3d6d71d637f9094e18693368856ed) fix(stale): harden Slack digest step per review panel (BE-2776) ### 📊 Changes **2 files changed** (+219 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `.github/workflows/stale.yml` (+218 -0) 📝 `README.md` (+1 -0) </details> ### 📄 Description ## ELI-5 Two repos (cloud and comfy-infra) each had their **own copy** of the same "stale PR bot" workflow, and both post to the same Slack channel. Their digests looked identical — a bare `#158` doesn't say _which_ repo it's from, so the two batches were impossible to tell apart. This adds **one shared reusable** version of that workflow to this repo (so there's no more copy-paste drift), and makes the Slack header **name the source repo** so each batch is unambiguous. ## What this PR does - Adds `.github/workflows/stale.yml` as a **reusable** (`on: workflow_call`). It ports the existing `actions/stale` + Slack `chat.postMessage` logic verbatim, parameterizing what differs per repo: - `slack_channel` (default `C08V9NDB3B4`), `days_before_pr_stale`/`days_before_pr_close`, `stale_pr_message`/`close_pr_message`, `stale_pr_label`, `exempt_pr_labels`, and a `dry_run` pass-through. `SLACK_BOT_TOKEN` is passed via `secrets:` (optional — the sweep still runs without it). - The caller owns the `schedule` + `workflow_dispatch` dry-run toggle (a reusable can't declare those triggers); the header documents the caller pattern. - **Names the repo in the digest header** (`*Stale PR bot — <owner/repo>*`) so two repos' batches in the same channel are distinguishable. Per-PR link lines are unchanged — they already resolve via `github.repository`. - Updates the README workflows table. `actionlint` (+ `shellcheck` on the inline script) is clean. ## Follow-ups (must land after this merges) Per the "land the reusable first, then flip callers" sequencing (a caller referencing a not-yet-merged path fails), these are separate PRs in their own repos, pinned to **this PR's merge SHA**: 1. Replace `Comfy-Org/cloud/.github/workflows/stale.yml` with a thin caller. 2. Replace `Comfy-Org/comfy-infra/.github/workflows/stale.yml` with a thin caller. 3. Optionally add a `bump-stale-callers.yml` dispatcher (mirroring `bump-cursor-review-callers.yml`) to keep those callers pinned — deferred because the callers don't exist yet. 4. Confirm whether any other repo carries the same PR+Slack-digest stale bot (org search shows only cloud + comfy-infra match; the various `stale-issues.yml` are a different issue-triage bot, out of scope). ## Judgment calls - `exempt_pr_labels` default is cloud's superset (includes `do-not-merge`); comfy-infra's current copy omits it. Broadening to exempt `do-not-merge` is arguably an improvement (don't nag/close a deliberately-held PR), but the comfy-infra caller can override the input to its exact prior set if desired. - The "auto-closes in N days" text now interpolates `days_before_pr_close` instead of a hardcoded "14"; the closed-digest line drops the "(~4 weeks inactive)" parenthetical since it was only accurate at the default 14/14 thresholds. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-26 22:35:37 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/github-workflows#36
No description provided.