Skip to content

docs: mastodon announcements#3723

Merged
johanneskoester merged 6 commits into
mainfrom
docs/mastodon_announcements
Oct 1, 2025
Merged

docs: mastodon announcements#3723
johanneskoester merged 6 commits into
mainfrom
docs/mastodon_announcements

Conversation

@cmeesters

@cmeesters cmeesters commented Sep 5, 2025

Copy link
Copy Markdown
Member

This is the new announcement action for the Snakemake announcement bot on Mastodon (https://fediscience.org/@snakemake)

Its message is basic. Please have a look.

Note, that the CI has to run in release mode before anything can be told for its workings.

edit - PS: the PR is labelled "docs" in lack for a better conventional commit category.

Summary by CodeRabbit

  • New Features

    • Releases are now automatically announced on Mastodon, sharing version, highlights, changelog links, and release notes to keep users informed without monitoring the repo.
  • Chores

    • CI now posts Mastodon release announcements only for official release commits tied to changelog updates, ensuring accurate, gated, and timely notifications.

@coderabbitai

coderabbitai Bot commented Sep 5, 2025

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Adds a new GitHub Actions workflow .github/workflows/announce-release.yml that triggers on pushes to main when only CHANGELOG.md changed and the commit message contains chore(main): release; it checks out the repo and posts a templated release announcement to Mastodon using snakemaker/mastodon-release-post-action@v1.

Changes

Cohort / File(s) Summary of Changes
CI: Release announcement workflow
.github/workflows/announce-release.yml
Adds “Announce Release on Mastodon” workflow triggered on push to main limited to CHANGELOG.md and requiring commit message chore(main): release. Defines job post_to_mastodon (ubuntu-latest) that checks out the repo and runs snakemaker/mastodon-release-post-action@v1 with inputs: access-token from secrets.MASTODONBOT, pr-title from the commit message, image set to ${{ github.workspace }}/images/logo_dark.png, image-description, and a multiline message embedding extracted release notes (steps.extract-release-notes.outputs.release_notes).

Sequence Diagram(s)

sequenceDiagram
    actor Dev as Developer
    participant GH as GitHub
    participant R as Actions Runner
    participant Act as mastodon-release-post-action@v1
    participant M as Mastodon

    Dev->>GH: Push to main
    GH-->>GH: Check path filter (only CHANGELOG.md)
    GH-->>GH: Check commit message contains "chore(main): release"
    alt Conditions met
        GH->>R: Start job post_to_mastodon
        R->>R: actions/checkout
        R->>Act: Run action with token, title, image, message (includes release notes)
        Act->>M: POST status with release announcement
        M-->>Act: 200 OK
        Act-->>R: Success
        R-->>GH: Job success
    else Conditions not met
        GH-->>Dev: Workflow skipped
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/mastodon_announcements

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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

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

3-9: Trigger conditions may miss real releases

Limiting to only CHANGELOG.md changes is brittle. Consider tag or release events and keep a manual trigger.

 on:
   push:
     branches:
       - main
     paths:
       - 'CHANGELOG.md'
+    tags:
+      - 'v*'
+  release:
+    types: [published]
+  workflow_dispatch:

13-17: Add concurrency and secret-availability guard

Prevents duplicate posts and no‑secret failures (e.g., local runs).

 jobs:
   post_to_mastodon:
-    if: "${{ contains(github.event.head_commit.message, 'chore(main): release') }}"
+    if: ${{ contains(github.event.head_commit.message, 'chore(main): release') && secrets.MASTODONBOT != '' }}
     runs-on: ubuntu-latest
+    concurrency:
+      group: announce-release-${{ github.ref }}
+      cancel-in-progress: true

28-43: Message content: verify placeholders and audience

  • Confirm the composite action supports {{ version }}, {{ issue_url }}, and {{ changelog }} in the message body.
  • Text currently targets the SLURM executor; is that intended for snakemake/snakemake releases? If not, make it generic.
  • Use full Mastodon handles for all mentions (include instance for @rupdecat as well).

20-20: Trim trailing spaces (YAMLlint errors)

Clean up trailing whitespace to satisfy linters.

-        
+      
-            
+          
-            
+          
-            
+          
-            
+          
-            
+          
-            
+          

Also applies to: 30-30, 32-32, 34-34, 37-37, 41-41, 43-43

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between db24371 and 1aecfd0.

⛔ Files ignored due to path filters (1)
  • images/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.7)
.github/workflows/announce-release.yml

28-28: property "extract-release-notes" is not defined in object type {}

(expression)

🪛 YAMLlint (1.37.1)
.github/workflows/announce-release.yml

[error] 20-20: trailing spaces

(trailing-spaces)


[error] 30-30: trailing spaces

(trailing-spaces)


[error] 32-32: trailing spaces

(trailing-spaces)


[error] 34-34: trailing spaces

(trailing-spaces)


[error] 37-37: trailing spaces

(trailing-spaces)


[error] 41-41: trailing spaces

(trailing-spaces)


[error] 43-43: trailing spaces

(trailing-spaces)

⏰ 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). (55)
  • GitHub Check: tests (10, ubuntu-latest, py312)
  • GitHub Check: tests (10, ubuntu-latest, py311)
  • GitHub Check: tests (10, ubuntu-latest, py313)
  • GitHub Check: tests (10, windows-2022, py312)
  • GitHub Check: tests (10, windows-2022, py313)
  • GitHub Check: tests (9, ubuntu-latest, py312)
  • GitHub Check: tests (9, windows-2022, py312)
  • GitHub Check: tests (9, ubuntu-latest, py311)
  • GitHub Check: tests (8, ubuntu-latest, py312)
  • GitHub Check: tests (9, ubuntu-latest, py313)
  • GitHub Check: tests (9, windows-2022, py313)
  • GitHub Check: tests (8, windows-2022, py313)
  • GitHub Check: tests (8, ubuntu-latest, py313)
  • GitHub Check: tests (8, macos-latest, py313)
  • GitHub Check: tests (8, windows-2022, py312)
  • GitHub Check: tests (8, ubuntu-latest, py311)
  • GitHub Check: tests (6, ubuntu-latest, py313)
  • GitHub Check: tests (7, ubuntu-latest, py313)
  • GitHub Check: tests (7, windows-2022, py312)
  • GitHub Check: tests (7, ubuntu-latest, py312)
  • GitHub Check: tests (4, ubuntu-latest, py311)
  • GitHub Check: tests (7, windows-2022, py313)
  • GitHub Check: tests (7, ubuntu-latest, py311)
  • GitHub Check: tests (6, windows-2022, py312)
  • GitHub Check: tests (5, ubuntu-latest, py311)
  • GitHub Check: tests (6, windows-2022, py313)
  • GitHub Check: tests (6, ubuntu-latest, py312)
  • GitHub Check: tests (5, windows-2022, py313)
  • GitHub Check: tests (3, macos-latest, py312)
  • GitHub Check: tests (5, windows-2022, py312)
  • GitHub Check: tests (3, windows-2022, py313)
  • GitHub Check: tests (4, windows-2022, py313)
  • GitHub Check: tests (4, ubuntu-latest, py312)
  • GitHub Check: tests (6, ubuntu-latest, py311)
  • GitHub Check: tests (2, macos-latest, py312)
  • GitHub Check: tests (3, windows-2022, py312)
  • GitHub Check: tests (5, ubuntu-latest, py313)
  • GitHub Check: tests (3, ubuntu-latest, py313)
  • GitHub Check: tests (4, windows-2022, py312)
  • GitHub Check: tests (5, ubuntu-latest, py312)
  • GitHub Check: tests (3, ubuntu-latest, py311)
  • GitHub Check: tests (4, ubuntu-latest, py313)
  • GitHub Check: tests (3, ubuntu-latest, py312)
  • GitHub Check: tests (2, windows-2022, py313)
  • GitHub Check: tests (1, macos-latest, py313)
  • GitHub Check: tests (1, windows-2022, py313)
  • GitHub Check: tests (2, ubuntu-latest, py313)
  • GitHub Check: tests (2, windows-2022, py312)
  • GitHub Check: tests (2, ubuntu-latest, py312)
  • GitHub Check: tests (2, ubuntu-latest, py311)
  • GitHub Check: tests (1, ubuntu-latest, py313)
  • GitHub Check: tests (1, windows-2022, py312)
  • GitHub Check: tests (1, ubuntu-latest, py311)
  • GitHub Check: tests (1, ubuntu-latest, py312)
  • GitHub Check: apidocs

Comment thread .github/workflows/announce-release.yml Outdated
Comment thread .github/workflows/announce-release.yml
Comment thread .github/workflows/announce-release.yml Outdated
Comment thread .github/workflows/announce-release.yml
cmeesters and others added 4 commits September 5, 2025 14:34
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

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

♻️ Duplicate comments (1)
.github/workflows/announce-release.yml (1)

42-42: Undefined output: add a step with id extract-release-notes before use.

steps.extract-release-notes.outputs.release_notes is referenced but no step sets it; workflow will fail (actionlint). Insert a step to compute and expose the notes.

       - name: Checkout repository
         uses: actions/checkout@v4
-      
+      
+      - name: Extract release notes from CHANGELOG.md
+        id: extract-release-notes
+        run: |
+          awk 'BEGIN{p=0}
+               /^## /{ if(p) exit; p=1; print; next }
+               p&&NF{ print }
+               p&&!NF{ exit }' CHANGELOG.md > rn.txt
+          {
+            echo "release_notes<<EOF"
+            cat rn.txt
+            echo "EOF"
+          } >> "$GITHUB_OUTPUT"
🧹 Nitpick comments (5)
.github/workflows/announce-release.yml (5)

21-22: Consider pinning the action to an immutable commit SHA.

Tag pinning (@v1) is good; for supply‑chain immutability, pin to a specific commit SHA and optionally comment the tag it maps to.


28-43: Trim trailing spaces flagged by YAMLlint.

Whitespace-only/trailing-space lines will fail linters.

-      
+
             BEEP, BEEP - I am your friendly #Snakemake release announcement bot.
-            
+
             There is a new release of Snakemake. Its version now is {{ version }}!
-            
+
             Give us some time, and you will automatically find it on #Bioconda and #Pypi.
-            
+
             If you want to discuss the release, you will find the maintainer here on Mastodon!
             @johanneskoester@fosstodon.org
-            
+
             If you discover any issues, please report them on {{ issue_url }}.
 
             See {{ changelog }} for details. Here is the header of the changelog:
-            
+
             ${{ steps.extract-release-notes.outputs.release_notes }}
-            
+

3-9: Add manual and release triggers for resilience (optional).

To support manual runs and guaranteed announcements on GitHub Releases, add workflow_dispatch and release: published.

 on:
   push:
     branches:
       - main
     paths:
       - 'CHANGELOG.md'
+  release:
+    types: [published]
+  workflow_dispatch:

15-16: Avoid duplicate posts with concurrency control (optional).

Prevents double posts on re-runs/force-pushes.

   post_to_mastodon:
+    concurrency:
+      group: announce-release-${{ github.ref }}
+      cancel-in-progress: true
     if: "${{ contains(github.event.head_commit.message, 'chore(main): release') }}"

28-43: Ensure release announcements fit Mastodon’s 500-char limit. The static message is already ~474 chars; including even a short changelog header can push you past Mastodon’s 500-char cap. Add logic in this workflow to truncate the combined text at ≤500 chars (e.g. slice to ~480 chars and append a link) or split into multiple toots.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 1aecfd0 and 1d251eb.

📒 Files selected for processing (1)
  • .github/workflows/announce-release.yml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/announce-release.yml

28-28: property "extract-release-notes" is not defined in object type {}

(expression)

🪛 YAMLlint (1.37.1)
.github/workflows/announce-release.yml

[error] 20-20: trailing spaces

(trailing-spaces)


[error] 30-30: trailing spaces

(trailing-spaces)


[error] 32-32: trailing spaces

(trailing-spaces)


[error] 34-34: trailing spaces

(trailing-spaces)


[error] 37-37: trailing spaces

(trailing-spaces)


[error] 41-41: trailing spaces

(trailing-spaces)


[error] 43-43: trailing spaces

(trailing-spaces)

⏰ 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). (54)
  • GitHub Check: tests (10, windows-2022, py313)
  • GitHub Check: tests (10, ubuntu-latest, py313)
  • GitHub Check: tests (10, windows-2022, py312)
  • GitHub Check: tests (10, ubuntu-latest, py311)
  • GitHub Check: tests (9, windows-2022, py312)
  • GitHub Check: tests (8, windows-2022, py312)
  • GitHub Check: tests (8, windows-2022, py313)
  • GitHub Check: tests (10, ubuntu-latest, py312)
  • GitHub Check: tests (9, ubuntu-latest, py313)
  • GitHub Check: tests (8, ubuntu-latest, py312)
  • GitHub Check: tests (9, windows-2022, py313)
  • GitHub Check: tests (9, ubuntu-latest, py312)
  • GitHub Check: tests (9, ubuntu-latest, py311)
  • GitHub Check: tests (8, ubuntu-latest, py313)
  • GitHub Check: tests (7, windows-2022, py312)
  • GitHub Check: tests (6, windows-2022, py312)
  • GitHub Check: tests (7, ubuntu-latest, py313)
  • GitHub Check: tests (8, ubuntu-latest, py311)
  • GitHub Check: tests (7, windows-2022, py313)
  • GitHub Check: tests (7, ubuntu-latest, py312)
  • GitHub Check: tests (6, windows-2022, py313)
  • GitHub Check: tests (7, macos-latest, py312)
  • GitHub Check: tests (7, ubuntu-latest, py311)
  • GitHub Check: tests (6, ubuntu-latest, py311)
  • GitHub Check: tests (5, ubuntu-latest, py311)
  • GitHub Check: tests (6, ubuntu-latest, py313)
  • GitHub Check: tests (4, windows-2022, py313)
  • GitHub Check: tests (6, ubuntu-latest, py312)
  • GitHub Check: tests (5, windows-2022, py312)
  • GitHub Check: tests (5, ubuntu-latest, py312)
  • GitHub Check: tests (5, ubuntu-latest, py313)
  • GitHub Check: tests (3, ubuntu-latest, py313)
  • GitHub Check: tests (3, macos-latest, py313)
  • GitHub Check: tests (5, windows-2022, py313)
  • GitHub Check: tests (3, windows-2022, py312)
  • GitHub Check: tests (4, ubuntu-latest, py312)
  • GitHub Check: tests (4, windows-2022, py312)
  • GitHub Check: tests (3, ubuntu-latest, py312)
  • GitHub Check: tests (3, windows-2022, py313)
  • GitHub Check: tests (4, ubuntu-latest, py311)
  • GitHub Check: tests (4, ubuntu-latest, py313)
  • GitHub Check: tests (3, ubuntu-latest, py311)
  • GitHub Check: tests (2, windows-2022, py313)
  • GitHub Check: tests (1, ubuntu-latest, py311)
  • GitHub Check: tests (2, windows-2022, py312)
  • GitHub Check: tests (2, ubuntu-latest, py312)
  • GitHub Check: tests (2, macos-latest, py312)
  • GitHub Check: tests (1, windows-2022, py313)
  • GitHub Check: tests (1, windows-2022, py312)
  • GitHub Check: tests (2, ubuntu-latest, py313)
  • GitHub Check: tests (1, ubuntu-latest, py312)
  • GitHub Check: tests (2, ubuntu-latest, py311)
  • GitHub Check: tests (1, macos-latest, py313)
  • GitHub Check: tests (1, ubuntu-latest, py313)
🔇 Additional comments (3)
.github/workflows/announce-release.yml (3)

10-12: Permissions look correct for checkout.

contents: read is present; this should unblock actions/checkout@v4.


26-27: Logo path exists. The file images/logo_dark.png is present in the repository.


25-25: No changes needed: pr-title is a valid required input for snakemake/mastodon-release-post-action@v1.

@johanneskoester johanneskoester 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.

Cool!

@johanneskoester johanneskoester merged commit 7da1b18 into main Oct 1, 2025
80 checks passed
@johanneskoester johanneskoester deleted the docs/mastodon_announcements branch October 1, 2025 06:22
johanneskoester pushed a commit that referenced this pull request Oct 1, 2025
🤖 I have created a release *beep* *boop*
---


##
[9.11.7](v9.11.6...v9.11.7)
(2025-10-01)


### Bug Fixes

* Add type annotations in logging module
([#3757](#3757))
([63404b2](63404b2))
* source_path not mounted
([#3738](#3738))
([86e30b3](86e30b3))


### Documentation

* mastodon announcements
([#3723](#3723))
([7da1b18](7da1b18))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
kjohnsen pushed a commit to kjohnsen/snakemake that referenced this pull request Dec 15, 2025
This is the new announcement action for the Snakemake announcement bot
on Mastodon (https://fediscience.org/@snakemake)

Its message is basic. Please have a look.

Note, that the CI has to run in release mode before anything can be told
for its workings.

edit - PS: the PR is labelled "docs" in lack for a better conventional
commit category.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Releases are now automatically announced on Mastodon, sharing version,
highlights, changelog links, and release notes to keep users informed
without monitoring the repo.

* **Chores**
* CI now posts Mastodon release announcements only for official release
commits tied to changelog updates, ensuring accurate, gated, and timely
notifications.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
kjohnsen pushed a commit to kjohnsen/snakemake that referenced this pull request Dec 15, 2025
🤖 I have created a release *beep* *boop*
---


##
[9.11.7](snakemake/snakemake@v9.11.6...v9.11.7)
(2025-10-01)


### Bug Fixes

* Add type annotations in logging module
([snakemake#3757](snakemake#3757))
([63404b2](snakemake@63404b2))
* source_path not mounted
([snakemake#3738](snakemake#3738))
([86e30b3](snakemake@86e30b3))


### Documentation

* mastodon announcements
([snakemake#3723](snakemake#3723))
([7da1b18](snakemake@7da1b18))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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