Repository navigation
feat: implement issue #234 — Phase 3: Stale Manager and Release Notes gh-aw workflows - #299
Conversation
… gh-aw workflows
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (12)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces two new GitHub Action workflows: a Release Notes Generator and a Stale Manager. The Release Notes Generator automates CHANGELOG updates by identifying merged PRs and using Claude to generate structured entries, while the Stale Manager identifies inactive issues and PRs across an organization to apply labels and post AI-generated comments. The review feedback focuses on improving the efficiency of the Bash scripts, specifically by optimizing JSON processing with jq to avoid O(N^2) complexity and mitigating potential ARG_MAX limit issues when passing large JSON payloads through environment variables.
Dev-Lead — fix-reviews (applied)Changes committed and pushed. |
Dev-Lead — human-pr (no-changes)No changes were needed for this PR. |
There was a problem hiding this comment.
Pull request overview
Implements Phase 3 of issue #234 by introducing two GitHub Agentic Workflows: an org-wide scheduled stale manager for issues/PRs, and a push-triggered release notes generator that opens CHANGELOG PRs, with associated prompts, scenario specs, and documentation.
Changes:
- Added Stale Manager workflow, script, prompt, docs, and scenario spec.
- Added Release Notes Generator workflow, script, prompt, docs, and scenario spec.
- Introduced staged (DRY_RUN) behavior and idempotency markers for both workflows.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
tests/aw/stale-manager/scenarios.md |
Defines expected stale-manager behavior scenarios and DRY_RUN semantics. |
tests/aw/release-notes/scenarios.md |
Defines expected release-notes behavior scenarios and DRY_RUN semantics. |
scripts/stale-manager.sh |
Implements org-wide scanning and stale warn/close/unstale actions. |
scripts/release-notes.sh |
Implements PR discovery for a push range and CHANGELOG PR creation. |
prompts/aw/stale-manager.md |
Claude prompt template for warning/closing comments. |
prompts/aw/release-notes.md |
Claude prompt template for Keep-a-Changelog block generation. |
docs/aw/stale-manager.md |
User-facing documentation for the stale-manager workflow. |
docs/aw/release-notes.md |
User-facing documentation for the release-notes generator workflow. |
.github/workflows/stale-manager.yml |
Scheduled + dispatch workflow wiring for stale manager (staged by default). |
.github/workflows/stale-manager.md |
Workflow spec/design doc for stale manager. |
.github/workflows/release-notes.yml |
Push + dispatch workflow wiring for release notes (staged by default). |
.github/workflows/release-notes.md |
Workflow spec/design doc for release notes generator. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 21016c3775
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Dev-Lead — fix-bot-comment (applied)Changes committed and pushed. |
Dev-Lead — fix-reviews (applied)Changes committed and pushed. |
Dev-Lead — human-pr (no-changes)No changes were needed for this PR. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1ea7af411f
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Dev-Lead — fix-bot-comment (applied)Changes committed and pushed. |
Dev-Lead — human-pr (applied)Changes committed and pushed. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 389e4ee565
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if [ ! -f "$prompt_template" ]; then | ||
| echo "This ${item_type} has been inactive for ${days} days and will be closed in ${GRACE_DAYS} days if there is no activity. <!-- stale-manager: warned -->" | ||
| return |
There was a problem hiding this comment.
Preserve close fallback marker when stale prompt is missing
When prompts/aw/stale-manager.md is missing (or PROMPTS_DIR is misconfigured), this early fallback always returns a warn message and <!-- stale-manager: warned --> marker, even for action=close. In live runs, close actions would post misleading warning text/marker on items that are actually being closed, which breaks the comment contract and downstream marker semantics.
Useful? React with 👍 / 👎.
| 2>/dev/null \ | ||
| | jq -r --arg m "$marker" '.[] | select(.body != null and (.body | contains($m))) | .html_url' \ | ||
| || echo "") |
There was a problem hiding this comment.
Fail idempotency check closed when PR lookup errors
This idempotency lookup suppresses API/jq failures by falling back to an empty string, so transient errors (rate limit, auth scope issues, network/API failures) are treated as “no existing PR.” In those cases the workflow can create a duplicate CHANGELOG PR for the same HEAD_SHA instead of stopping safely when it cannot verify prior runs.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ad49decae2
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| process_item "$repo" "$issue" "issue" | ||
| done < <(echo "$issues" | jq -c '.') |
There was a problem hiding this comment.
Continue repo scan when processing a single item fails
Because the script runs with set -e, any non-zero exit from process_item (for example, a failed label/comment/close API call on one issue) aborts process_repo, and the caller only logs a warning and moves on to the next repository. That means one problematic item can prevent all remaining open issues/PRs in the same repo from being evaluated, creating silent coverage gaps in stale enforcement for that run.
Useful? React with 👍 / 👎.
| local repo="$1" number="$2" | ||
| gh api "repos/$repo/issues/$number/events" \ | ||
| --paginate \ | ||
| --jq '[.[] | select(.event == "labeled" and .label.name == "stale")] | last | .created_at // empty' \ |
There was a problem hiding this comment.
Aggregate paginated stale events before selecting latest label
get_stale_label_ts uses --paginate with a --jq filter that computes last per page, not across the full event stream, so items with many events can produce multiple timestamps. That multi-line value is then passed to iso_to_ts, which falls back to 0 on parse failure; with stale_label_ts=0, the last_updated_ts > stale_label_ts branch incorrectly unstales items instead of honoring grace/close behavior. This can systematically mis-handle stale items once issue/PR event history exceeds one page.
Useful? React with 👍 / 👎.
| ## Going live | ||
|
|
||
| 1. Verify staged step summaries look correct across multiple Monday runs | ||
| 2. Set repo variable `DRY_RUN=false` (or `STALE_LIVE_MODE=true`) |
There was a problem hiding this comment.
Correct stale-manager go-live variable in workflow spec
The go-live instructions say to set DRY_RUN=false (or STALE_LIVE_MODE=true), but this workflow derives DRY_RUN only from vars.LIVE_MODE in .github/workflows/stale-manager.yml. Following the current spec leaves the job in dry-run mode, so operators can believe they enabled live enforcement while no labels/comments/closures are actually written.
Useful? React with 👍 / 👎.
| ## Going live | ||
|
|
||
| 1. Verify staged step summaries produce correctly formatted CHANGELOG entries | ||
| 2. Set repo variable `DRY_RUN=false` |
There was a problem hiding this comment.
Correct release-notes go-live variable in workflow spec
The release-notes spec instructs setting DRY_RUN=false, but .github/workflows/release-notes.yml computes DRY_RUN from vars.LIVE_MODE instead. If operators follow this document, manual/config changes to DRY_RUN have no effect and the workflow can remain staged unexpectedly, preventing expected changelog PR creation in production runs.
Useful? React with 👍 / 👎.
|
@dev-lead please fix the Lint CI failure — yamllint errors in |
|
… gh-aw workflows (#299) * feat: implement issue #234 — Phase 3: Stale Manager and Release Notes gh-aw workflows * fix(reviews): address review comments [skip ci-relay] * fix(bot): address bot feedback [skip ci-relay] * fix(reviews): address review comments [skip ci-relay] * fix(bot): address bot feedback [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * fix(ci): escape <sha> inline HTML in scenarios.md to fix markdownlint --------- Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
… gh-aw workflows (#299) * feat: implement issue #234 — Phase 3: Stale Manager and Release Notes gh-aw workflows * fix(reviews): address review comments [skip ci-relay] * fix(bot): address bot feedback [skip ci-relay] * fix(reviews): address review comments [skip ci-relay] * fix(bot): address bot feedback [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * fix(ci): escape <sha> inline HTML in scenarios.md to fix markdownlint --------- Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
… gh-aw workflows (#299) * feat: implement issue #234 — Phase 3: Stale Manager and Release Notes gh-aw workflows * fix(reviews): address review comments [skip ci-relay] * fix(bot): address bot feedback [skip ci-relay] * fix(reviews): address review comments [skip ci-relay] * fix(bot): address bot feedback [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * fix(ci): escape <sha> inline HTML in scenarios.md to fix markdownlint --------- Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
… gh-aw workflows (#299) * feat: implement issue #234 — Phase 3: Stale Manager and Release Notes gh-aw workflows * fix(reviews): address review comments [skip ci-relay] * fix(bot): address bot feedback [skip ci-relay] * fix(reviews): address review comments [skip ci-relay] * fix(bot): address bot feedback [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * fix(ci): escape <sha> inline HTML in scenarios.md to fix markdownlint --------- Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
… gh-aw workflows (#299) * feat: implement issue #234 — Phase 3: Stale Manager and Release Notes gh-aw workflows * fix(reviews): address review comments [skip ci-relay] * fix(bot): address bot feedback [skip ci-relay] * fix(reviews): address review comments [skip ci-relay] * fix(bot): address bot feedback [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * fix(ci): escape <sha> inline HTML in scenarios.md to fix markdownlint --------- Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
… gh-aw workflows (#299) * feat: implement issue #234 — Phase 3: Stale Manager and Release Notes gh-aw workflows * fix(reviews): address review comments [skip ci-relay] * fix(bot): address bot feedback [skip ci-relay] * fix(reviews): address review comments [skip ci-relay] * fix(bot): address bot feedback [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * fix(ci): escape <sha> inline HTML in scenarios.md to fix markdownlint --------- Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
… gh-aw workflows (#299) * feat: implement issue #234 — Phase 3: Stale Manager and Release Notes gh-aw workflows * fix(reviews): address review comments [skip ci-relay] * fix(bot): address bot feedback [skip ci-relay] * fix(reviews): address review comments [skip ci-relay] * fix(bot): address bot feedback [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * fix(ci): escape <sha> inline HTML in scenarios.md to fix markdownlint --------- Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>
… gh-aw workflows (#299) * feat: implement issue #234 — Phase 3: Stale Manager and Release Notes gh-aw workflows * fix(reviews): address review comments [skip ci-relay] * fix(bot): address bot feedback [skip ci-relay] * fix(reviews): address review comments [skip ci-relay] * fix(bot): address bot feedback [skip ci-relay] * chore: apply manual instructions [skip ci-relay] * fix(ci): escape <sha> inline HTML in scenarios.md to fix markdownlint --------- Co-authored-by: donpetry-bot <donpetry-bot@users.noreply.github.com>



Closes #234
Implemented by dev-lead agent. Please review.