Skip to content

Conversation

@cmeesters
Copy link
Member

@cmeesters cmeesters commented Nov 7, 2025

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

  • Chores
    • Added automated release announcement workflow for internal distribution channels.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 7, 2025

📝 Walkthrough

Walkthrough

Adds 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

Cohort / File(s) Summary
GitHub Actions Workflow
\.github/workflows/announce-release\.yml
New workflow named "Announce Release on Mastodon" that posts release announcements to Mastodon on main branch updates to CHANGELOG.md when commit message matches 'chore(main): release' pattern

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify the workflow trigger conditions and path filters are appropriate
  • Confirm secure handling of the Mastodon access token (ensure it's stored as a repository secret)
  • Check that template variables ({{ version }}, {{ issue_url }}, {{ changelog }}) are properly populated by upstream steps
  • Validate that the action used (mastodon-release-post-action) is from a trusted source and pinned to a specific version

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is minimal and doesn't follow the required template structure; it lacks QC checklist items, contribution guidelines confirmation, and detailed explanation of the implementation. Complete the required template sections including QC checklist confirmation, documentation updates, meta.yaml information, and detailed explanation of the Mastodon bot implementation and design decisions.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: announcement robot message and image' directly describes the main change: adding a new feature for announcing releases with a message and image on Mastodon.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/announcement_bot

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/announce-release.yml (1)

10-12: Remove unused pull-requests permission.

The pull-requests: read permission 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

📥 Commits

Reviewing files that changed from the base of the PR and between cc3bf0e and 14d0c60.

⛔ Files ignored due to path filters (1)
  • pr-logo/logo_dark.png is 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 the mastodon-release-post-action correctly 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 by mastodon-release-post-action@v1 and are processed by the action—no pre-processing is needed.

The maintainer mention at line 35 remains hardcoded. Decide whether @[email protected] should stay as-is or be made configurable (e.g., via environment variable or config file) to support multiple maintainers in future releases.

Comment on lines +38 to +41

See {{ changelog }} for details. Here is the header of the changelog:

${{ steps.extract-release-notes.outputs.release_notes }}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 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_OUTPUT

Alternatively, 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 f

Length 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'
fi

Length 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 2

Length 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 1

Length of output: 0


🏁 Script executed:

#!/bin/bash
# List all yaml files in .github/workflows/ to see all workflows
fd '\.ya?ml$' '.github/workflows/' --type f

Length of output: 225


🏁 Script executed:

#!/bin/bash
# Search for any step named extract-release-notes across all files
rg -n 'extract-release-notes' '.' --type yaml

Length 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_OUTPUT

Define 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.

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.

2 participants