Skip to content

Replace action to append summary with GitHub script#195

Merged
svengo merged 3 commits into
mainfrom
feature/use-github-script
May 10, 2026
Merged

Replace action to append summary with GitHub script#195
svengo merged 3 commits into
mainfrom
feature/use-github-script

Conversation

@svengo

@svengo svengo commented May 10, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Chores
    • Optimized Docker release workflow automation.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 10, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@svengo has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 37 minutes and 58 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 06d8aaac-e253-49dd-8e71-46396d68e6e3

📥 Commits

Reviewing files that changed from the base of the PR and between f060ca3 and c500e11.

📒 Files selected for processing (1)
  • .github/workflows/publish-docker.yml

Walkthrough

The workflow now appends Docker build summary to an existing GitHub Release's body using the GitHub REST API via actions/github-script, replacing the external djn24/add-comment-to-release action that previously posted a separate comment.

Changes

Release Publishing Automation

Layer / File(s) Summary
Release API Integration
.github/workflows/publish-docker.yml
Replaces the djn24/add-comment-to-release action with actions/github-script that reads the current release body, appends the generated Docker summary, and updates the release via github.rest.repos.updateRelease when release action is published.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • svengo/docker-tor#193: Both PRs modify the release notes publishing mechanism in .github/workflows/publish-docker.yml to append the Docker summary to releases, with this PR replacing an external action with the GitHub REST API approach.

Poem

🐰 A rabbit hops through workflows true,
Release notes glide on API's dew,
No comment-cards, just bodies updated,
Scripts do the work, cleanly stated!
Summaries blend where releases shine,
GitHub's endpoints dance in line. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: replacing a GitHub Actions action with a GitHub script approach to append Docker build summaries to releases.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/use-github-script

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.

@codacy-production

codacy-production Bot commented May 10, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/publish-docker.yml:
- Around line 112-131: The script block currently interpolates `${{
steps.job-summary.outputs.summary }}` directly into the actions/github-script@v7
`script`, creating a potential script-injection risk; instead, pass that output
via the action's `env` (e.g. set SUMMARY: ${{ steps.job-summary.outputs.summary
}}) and inside the `script` read it from `process.env.SUMMARY`, then trim and
use that value when building `body`; update the job step that uses
`actions/github-script@v7` (the step named "Append job summary to release
notes") to add an `env` mapping for the summary and replace the direct
interpolation in the `script` with `process.env.SUMMARY` usage.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 34ca4109-aef2-4820-af55-26457ef84511

📥 Commits

Reviewing files that changed from the base of the PR and between 74d9d1e and f060ca3.

📒 Files selected for processing (1)
  • .github/workflows/publish-docker.yml

Comment thread .github/workflows/publish-docker.yml
svengo and others added 2 commits May 10, 2026 17:55
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Removed redundant summary output to GITHUB_OUTPUT.
@svengo
svengo merged commit 58cb1e2 into main May 10, 2026
3 checks passed
@svengo
svengo deleted the feature/use-github-script branch May 10, 2026 16:16
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