Conversation
📝 WalkthroughWalkthroughAdds a new GitHub Actions workflow that automatically announces releases on Mastodon. The workflow triggers when CHANGELOG.md changes on the main branch, validates that the commit message contains 'chore(main): release', and posts a release announcement using the mastodon-release-post-action with version information and changelog details. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ 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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/announce-release.yml (1)
10-12: Remove unused pull-requests permission.The
pull-requests: readpermission is unnecessary for a push-triggered workflow and violates least-privilege.permissions: contents: read - pull-requests: read
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pr-logo/logo_dark.pngis excluded by!**/*.png
📒 Files selected for processing (1)
.github/workflows/announce-release.yml(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.8)
.github/workflows/announce-release.yml
28-28: property "extract-release-notes" is not defined in object type {}
(expression)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: testing
- GitHub Check: Summary
🔇 Additional comments (2)
.github/workflows/announce-release.yml (2)
21-25: Verify parameter semantics for non-PR context.The workflow passes the commit message to a parameter named
pr-title, but this is a push-triggered workflow, not a pull request context. Verify that themastodon-release-post-actioncorrectly handles this parameter or consider clarifying the intent.
28-41: Remove template variable concern; keep maintainer decision for developer to address.The template variables
{{ version }},{{ issue_url }}, and{{ changelog }}are natively supported bymastodon-release-post-action@v1and are processed by the action—no pre-processing is needed.The maintainer mention at line 35 remains hardcoded. Decide whether
@johanneskoester@fosstodon.orgshould stay as-is or be made configurable (e.g., via environment variable or config file) to support multiple maintainers in future releases.
|
|
||
| See {{ changelog }} for details. Here is the header of the changelog: | ||
|
|
||
| ${{ steps.extract-release-notes.outputs.release_notes }} |
There was a problem hiding this comment.
🧩 Analysis chain
Missing step definition causes workflow failure.
The workflow references steps.extract-release-notes.outputs.release_notes on line 41, but this step is not defined in the workflow. This will cause a runtime error.
Add the missing step before the "Post to Mastodon" step (e.g., after checkout):
- name: Extract Release Notes
id: extract-release-notes
run: |
# TODO: Implement extraction logic
# Should parse CHANGELOG.md and extract the latest release notes
echo "release_notes=..." >> $GITHUB_OUTPUTAlternatively, if this step is defined in a reusable workflow or should be computed differently, clarify the intent.
🏁 Script executed:
#!/bin/bash
# Find and display the announce-release.yml workflow file
fd 'announce-release.yml' --type fLength of output: 0
🏁 Script executed:
#!/bin/bash
# Display the full content of the announce-release.yml file to verify the claim
if [ -f '.github/workflows/announce-release.yml' ]; then
cat '.github/workflows/announce-release.yml'
fiLength of output: 1331
🏁 Script executed:
#!/bin/bash
# Search across all workflow files for extract-release-notes step definition
rg -n 'extract-release-notes' '.github/workflows/' --type yaml -A 2 -B 2Length of output: 344
🏁 Script executed:
#!/bin/bash
# Search all workflow files for any reference to announce-release workflow
rg -n 'announce-release' '.github/workflows/' --type yaml -A 1 -B 1Length of output: 0
🏁 Script executed:
#!/bin/bash
# List all yaml files in .github/workflows/ to see all workflows
fd '\.ya?ml$' '.github/workflows/' --type fLength of output: 225
🏁 Script executed:
#!/bin/bash
# Search for any step named extract-release-notes across all files
rg -n 'extract-release-notes' '.' --type yamlLength of output: 0
Missing step extract-release-notes causes workflow failure.
The workflow references ${{ steps.extract-release-notes.outputs.release_notes }} on line 41, but this step is not defined anywhere in the workflow. This will cause a GitHub Actions runtime error when the workflow attempts to interpolate this undefined output.
Add the missing step before the "Post to Mastodon" step:
- name: Extract Release Notes
id: extract-release-notes
run: |
# Extract the latest release notes from CHANGELOG.md
# This should capture the header/summary section of the latest release
echo "release_notes=..." >> $GITHUB_OUTPUTDefine the extraction logic to parse CHANGELOG.md and output the latest release notes header.
🤖 Prompt for AI Agents
.github/workflows/announce-release.yml lines 38-41: the workflow references
steps.extract-release-notes.outputs.release_notes but no step with id
extract-release-notes exists, causing a runtime error; add a step immediately
before the "Post to Mastodon" step named "Extract Release Notes" with id:
extract-release-notes that reads CHANGELOG.md, parses/extracts the
header/summary for the latest release (e.g., first section under the most recent
version heading), and writes it to GITHUB_OUTPUT as release_notes (echo
"release_notes=... >> $GITHUB_OUTPUT") so the subsequent interpolation of ${{
steps.extract-release-notes.outputs.release_notes }} resolves correctly.
This PR should create a Mastodon bot message upon every new release. So far, it mentions one maintainer, only. Should there be more?
Summary by CodeRabbit