Skip to content

feat: implement issue #234 — Phase 3: Stale Manager and Release Notes gh-aw workflows - #299

Merged
don-petry merged 27 commits into
mainfrom
dev-lead/issue-234-20260520-0234
May 20, 2026
Merged

don-petry merged 27 commits into
mainfrom
dev-lead/issue-234-20260520-0234

Conversation

@don-petry

Copy link
Copy Markdown
Collaborator

Closes #234

Implemented by dev-lead agent. Please review.

Copilot AI review requested due to automatic review settings May 20, 2026 02:45
@coderabbitai

coderabbitai Bot commented May 20, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@don-petry has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 19 minutes and 47 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 680fa4df-2e9d-4a3e-b119-a661c7048d28

📥 Commits

Reviewing files that changed from the base of the PR and between 6dcc2bc and 0f47bce.

📒 Files selected for processing (12)
  • .github/workflows/release-notes.md
  • .github/workflows/release-notes.yml
  • .github/workflows/stale-manager.md
  • .github/workflows/stale-manager.yml
  • docs/aw/release-notes.md
  • docs/aw/stale-manager.md
  • prompts/aw/release-notes.md
  • prompts/aw/stale-manager.md
  • scripts/release-notes.sh
  • scripts/stale-manager.sh
  • tests/aw/release-notes/scenarios.md
  • tests/aw/stale-manager/scenarios.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev-lead/issue-234-20260520-0234

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment thread scripts/release-notes.sh Outdated
Comment thread scripts/release-notes.sh Outdated
Comment thread scripts/stale-manager.sh Outdated
coderabbitai[bot]
coderabbitai Bot previously approved these changes May 20, 2026
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-reviews (applied)

Changes committed and pushed.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — human-pr (no-changes)

No changes were needed for this PR.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread scripts/stale-manager.sh
Comment thread .github/workflows/stale-manager.md
Comment thread .github/workflows/release-notes.md
Comment thread scripts/release-notes.sh Outdated
Comment thread scripts/stale-manager.sh Outdated
Comment thread scripts/stale-manager.sh
Comment thread scripts/release-notes.sh Outdated
Comment thread scripts/release-notes.sh
Comment thread scripts/release-notes.sh
Comment thread .github/workflows/stale-manager.md

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread scripts/stale-manager.sh Outdated
Comment thread scripts/stale-manager.sh Outdated
Comment thread scripts/release-notes.sh Outdated
Comment thread scripts/release-notes.sh Outdated
Comment thread prompts/aw/stale-manager.md Outdated
Comment thread scripts/stale-manager.sh Outdated
Comment thread scripts/release-notes.sh Outdated
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-bot-comment (applied)

Changes committed and pushed.

coderabbitai[bot]
coderabbitai Bot previously approved these changes May 20, 2026
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-reviews (applied)

Changes committed and pushed.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — human-pr (no-changes)

No changes were needed for this PR.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread scripts/release-notes.sh Outdated
Comment thread scripts/stale-manager.sh Outdated
Comment thread .github/workflows/release-notes.yml Outdated
Comment thread .github/workflows/stale-manager.yml Outdated
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-bot-comment (applied)

Changes committed and pushed.

coderabbitai[bot]
coderabbitai Bot previously approved these changes May 20, 2026
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — human-pr (applied)

Changes committed and pushed.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread scripts/stale-manager.sh
Comment on lines +85 to +87
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Comment thread scripts/release-notes.sh
Comment on lines +50 to +52
2>/dev/null \
| jq -r --arg m "$marker" '.[] | select(.body != null and (.body | contains($m))) | .html_url' \
|| echo "")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread scripts/stale-manager.sh
Comment on lines +284 to +285
process_item "$repo" "$issue" "issue"
done < <(echo "$issues" | jq -c '.')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Comment thread scripts/stale-manager.sh
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' \

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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`)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@don-petry

Copy link
Copy Markdown
Collaborator Author

@dev-lead please fix the Lint CI failure — yamllint errors in .github/workflows/ci-failure-analyst.lock.yml (trailing spaces and lines > 250 chars). Fix the file directly.

@don-petry
don-petry enabled auto-merge (squash) May 20, 2026 11:47
@sonarqubecloud

Copy link
Copy Markdown

@don-petry
don-petry merged commit e3fd27d into main May 20, 2026
21 of 22 checks passed
@don-petry
don-petry deleted the dev-lead/issue-234-20260520-0234 branch May 20, 2026 12:30
don-petry added a commit that referenced this pull request Jun 7, 2026
… 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>
don-petry added a commit that referenced this pull request Jun 7, 2026
… 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>
don-petry added a commit that referenced this pull request Jun 8, 2026
… 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>
don-petry added a commit that referenced this pull request Jun 12, 2026
… 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>
don-petry added a commit that referenced this pull request Jun 14, 2026
… 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>
don-petry added a commit that referenced this pull request Jun 18, 2026
… 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>
don-petry added a commit that referenced this pull request Jun 25, 2026
… 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>
don-petry added a commit that referenced this pull request Jun 25, 2026
… 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>
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.

Phase 3: Stale Manager and Release Notes gh-aw workflows

3 participants