Skip to content

feat: mastodon announcement#13

Open
cmeesters wants to merge 2 commits intomainfrom
feat/mastodon-announcement
Open

feat: mastodon announcement#13
cmeesters wants to merge 2 commits intomainfrom
feat/mastodon-announcement

Conversation

@cmeesters
Copy link
Member

@cmeesters cmeesters commented Feb 27, 2026

adding Mastodon announcement workflow.

Please check message and logo file.

Summary by CodeRabbit

  • Chores
    • Added automated release announcement posting to Mastodon when new releases are published.

@coderabbitai
Copy link

coderabbitai bot commented Feb 27, 2026

📝 Walkthrough

Walkthrough

Adds a GitHub Actions workflow that automatically announces releases on Mastodon when the CHANGELOG.md is updated on the main branch. The workflow verifies a logo file exists, then posts release details to Mastodon using an external action, but only when the commit message contains "chore(main): release".

Changes

Cohort / File(s) Summary
Release Announcement Workflow
.github/workflows/announce-release.yml
New GitHub Actions workflow that automates Mastodon release announcements. Triggers on CHANGELOG.md changes, verifies logo file existence, and posts release information using the snakemake/mastodon-release-post-action external action.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: mastodon announcement' is specific and clearly describes the main change: adding a Mastodon announcement feature/workflow to the project.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/mastodon-announcement

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

@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: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/announce-release.yml:
- Line 50: Add a new workflow step with id "extract-release-notes" before the
"Post to Mastodon" step to populate
steps.extract-release-notes.outputs.release_notes; implement it using a
changelog parser action (e.g., stefanzweifel/changelog-parser-action) or a small
script that reads your changelog/release body and sets the output
"release_notes", then reference that output in the existing Post to Mastodon
step so steps.extract-release-notes.outputs.release_notes is defined.
- Line 35: The workflow references a mismatched image name: the verification
step checks for "long_logo_env_modules.png" but the usage line sets image:
"long_logo_conda.png"; update the usage to image: "long_logo_env_modules.png"
(or alternatively change the verification to check for "long_logo_conda.png") so
the filename used by the image key matches the file validated earlier.
- Line 31: Replace the unpinned GitHub Action reference to
snakemake/mastodon-release-post-action@main with a pinned release tag to avoid
accidental or malicious changes; edit the workflow step that currently uses
"snakemake/mastodon-release-post-action@main" and change it to a specific
version such as "snakemake/mastodon-release-post-action@v1.7.6" (or use the
minor-series pin "snakemake/mastodon-release-post-action@v1.7" if you want
automatic patch updates) so the action code is stable and auditable.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9f41d83 and 3b9a143.

⛔ Files ignored due to path filters (1)
  • pr_logo/logo_logo_env_modules.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • .github/workflows/announce-release.yml

echo "Logo file found at: ${{ github.workspace }}/pr_logo/long_logo_env_modules.png"

- name: Post to Mastodon
uses: snakemake/mastodon-release-post-action@main # == latest
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check available tags/releases for the mastodon-release-post-action
gh api repos/snakemake/mastodon-release-post-action/tags --jq '.[].name' 2>/dev/null || echo "No tags found or repo not accessible via gh CLI"
gh api repos/snakemake/mastodon-release-post-action/releases --jq '.[].tag_name' 2>/dev/null || echo "No releases found or repo not accessible via gh CLI"

Repository: snakemake/snakemake-software-deployment-plugin-envmodules

Length of output: 424


🌐 Web query:

snakemake mastodon-release-post-action releases versions github

💡 Result:

In the snakemake/snakemake repository there is a GitHub Actions workflow named “Announce Release on Mastodon”, which is intended to post to Mastodon when a GitHub Release is made/published. [1]

To figure out which mastodon-release-post-action repo and which versions/tags it uses:

  1. Open the workflow definition YAML for that workflow in the Snakemake repo (the file under .github/workflows/ corresponding to “Announce Release on Mastodon”).
  2. In that YAML, find the step like uses: <owner>/mastodon-release-post-action@....
    • The part after @ is the version selector (typically a tag like v1 or a full tag like v1.2.3).
  3. Go to that action’s GitHub repo Releases/Tags page and confirm what the referenced tag points to (best practice is pinning to a major tag like @v1 so you get non-breaking updates).

Separately, Snakemake itself is actively released (e.g., the repo shows v9.16.3 as a “Latest” release on Feb 5, 2026), which is the kind of event that workflow is meant to announce. [2]

Sources: [1] [2]


🏁 Script executed:

#!/bin/bash
# Try using curl to access GitHub API without authentication for public repos
# Check releases and tags for the mastodon-release-post-action
echo "=== Checking releases via public API ==="
curl -s https://api.github.com/repos/snakemake/mastodon-release-post-action/releases | jq -r '.[].tag_name' | head -20

echo ""
echo "=== Checking tags via public API ==="
curl -s https://api.github.com/repos/snakemake/mastodon-release-post-action/tags | jq -r '.[].name' | head -20

echo ""
echo "=== Checking repo info ==="
curl -s https://api.github.com/repos/snakemake/mastodon-release-post-action | jq '{name, description, default_branch, has_releases}'

Repository: snakemake/snakemake-software-deployment-plugin-envmodules

Length of output: 569


🌐 Web query:

site:github.com snakemake/mastodon-release-post-action releases tags

💡 Result:

  • The repo snakemake/mastodon-release-post-action has 24 GitHub releases; the latest release is v1.7.6 (Nov 30, 2025). [1]
  • Its tags include version tags like v1.7.6, plus moving major/minor tags v1 and v1.7 (both dated Nov 30, 2025 and pointing at the same commit as v1.7.6). [2]

Pin action to a specific version.

Using @main for actions is a security and reliability risk—the action code could change unexpectedly or be compromised. The snakemake/mastodon-release-post-action has multiple stable releases available. Pin to a specific version tag instead (e.g., @v1.7.6 for the latest release, or @v1.7 for receiving patch updates within the minor version).

Example fix
-        uses: snakemake/mastodon-release-post-action@main # == latest
+        uses: snakemake/mastodon-release-post-action@v1.7.6
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
uses: snakemake/mastodon-release-post-action@main # == latest
uses: snakemake/mastodon-release-post-action@v1.7.6
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/announce-release.yml at line 31, Replace the unpinned
GitHub Action reference to snakemake/mastodon-release-post-action@main with a
pinned release tag to avoid accidental or malicious changes; edit the workflow
step that currently uses "snakemake/mastodon-release-post-action@main" and
change it to a specific version such as
"snakemake/mastodon-release-post-action@v1.7.6" (or use the minor-series pin
"snakemake/mastodon-release-post-action@v1.7" if you want automatic patch
updates) so the action code is stable and auditable.

with:
access-token: ${{ secrets.MASTODONBOT }}
pr-title: ${{ github.event.head_commit.message }}
image: "long_logo_conda.png"
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Image filename mismatch.

Line 24 verifies long_logo_env_modules.png exists, but this line references long_logo_conda.png. The workflow will verify one file and then attempt to use a different file that may not exist.

🐛 Proposed fix
-          image: "long_logo_conda.png"
+          image: "pr_logo/long_logo_env_modules.png"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
image: "long_logo_conda.png"
image: "pr_logo/long_logo_env_modules.png"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/announce-release.yml at line 35, The workflow references a
mismatched image name: the verification step checks for
"long_logo_env_modules.png" but the usage line sets image:
"long_logo_conda.png"; update the usage to image: "long_logo_env_modules.png"
(or alternatively change the verification to check for "long_logo_conda.png") so
the filename used by the image key matches the file validated earlier.


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

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

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Missing step extract-release-notes.

This references steps.extract-release-notes.outputs.release_notes, but no step with id: extract-release-notes is defined in the workflow. This will result in an empty value being interpolated.

You need to add a step that extracts release notes before the "Post to Mastodon" step, for example using an action like stefanzweifel/changelog-parser-action or a custom script.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/announce-release.yml at line 50, Add a new workflow step
with id "extract-release-notes" before the "Post to Mastodon" step to populate
steps.extract-release-notes.outputs.release_notes; implement it using a
changelog parser action (e.g., stefanzweifel/changelog-parser-action) or a small
script that reads your changelog/release body and sets the output
"release_notes", then reference that output in the existing Post to Mastodon
step so steps.extract-release-notes.outputs.release_notes is defined.

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