Skip to content

feat(closure-comment): reusable workflow, reopen closures without a comment - #9

Merged
pbember merged 2 commits into
mainfrom
feat/closure-comment
Nov 21, 2026
Merged

pbember merged 2 commits into
mainfrom
feat/closure-comment

Conversation

@pbember

@pbember pbember commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Adds .github/workflows/closure-comment.yml (workflow_call) and one row in docs/USAGE.md.

Behavior: reopen an issue, or an unmerged PR, that its closer closed without a comment of 10 or more characters. Skips bots, issues closed by a merged PR or a commit, and a tracker-sync close within 5 minutes after a merged PR that mentions the issue.

  • Script inlined in the run step. No checkout, API calls only (safe on fork events).
  • Inputs: runner (falls back to vars.LIGHT_RUNNER, then instabox-small), contributing-link (default CONTRIBUTING.md), timeout-minutes.
  • Dropped the DRY_RUN switch of the source script (not needed in a workflow).
  • Checks: actionlint 1.7.12 with shellcheck 0.11.0 clean.

Callers pin the merged commit SHA.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added a reusable workflow that reopens issues and unmerged pull requests closed without a qualifying comment, and posts guidance on adding one.
    • Bot closures, closures linked to a commit or merged pull request, and certain tracker-synchronized closures are excluded.
  • Documentation
    • Documented the workflow’s behavior, trigger setup, and required permissions.

…thout a comment

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

Walkthrough

Adds a reusable workflow that checks issue and unmerged pull-request closures for a qualifying comment by the closer. If none exists, the workflow reopens the item and posts guidance. The usage documentation lists the workflow, its exclusions, triggers, permissions, and inputs.

Changes: Closure comment handling

Layer / File(s) Summary
Reusable workflow entry and inputs
.github/workflows/closure-comment.yml
Adds inputs for the runner, contributing guide link, and timeout. Defines permissions, runner selection, and job conditions for issue closures and unmerged pull-request closures.
Closure checks and response
.github/workflows/closure-comment.yml, docs/USAGE.md
Skips bot closures and specified issue closures. If the closer has no comment posted from 30 minutes before closure onward with at least 10 non-whitespace characters, the workflow reopens the item and posts guidance. The usage table documents the workflow and its requirements.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant ClosureCommentWorkflow
  participant GitHubAPI
  Caller->>ClosureCommentWorkflow: Calls the reusable workflow for a closure
  ClosureCommentWorkflow->>GitHubAPI: Reads closure details and comments
  GitHubAPI-->>ClosureCommentWorkflow: Returns closure details and comments
  ClosureCommentWorkflow->>GitHubAPI: Reopens the item and posts guidance when no qualifying comment exists
Loading

Suggested labels: github_actions

Merge Risk: Moderate · up to fd508

The closure-comment workflow will not enforce comments on closed fork pull requests under the documented trigger, so those PRs stay closed. A few edge cases in the comment check can also wrongly reopen or exempt some closures. Fix the fork trigger before merging; the rest can follow.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Public repositories need pull_request_target so a fork PR's closure gets a
write token. The job gate checked event_name == pull_request and skipped
those callers. Gate on merged == false, as the intersects original does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pbember
pbember merged commit 398e622 into main Nov 21, 2026
1 check passed
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.

1 participant