Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Improved Mastodon Bot #183

Merged
merged 8 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/post_to_mastodon.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!bin/bash

version="${${{ github.event.pull_request.title }}##* }"
changelog="https://github.com/snakemake/snakemake-executor-plugin-slurm/releases/tag/v${version}"

read -d '\n' message << EndOfText
Beep, Beepi - I am the #Snakemake release bot

I have a new release in for the Snakemake executor for #SLURM on #HPC systems. The version now is '${version}'.

See ${changelog} for details.

Get the latest release from #Bioconda or #Pypi. Be sure to give it some time to be released there, too.

#OpenScience #ReproducibleResearch #ReproducibleComputing

EndOfText

curl -X POST -H "Authorization: Bearer ${{ secrets.MASTODONBOT }}" \
-F "status=${message}" \
https://fediscience.org/api/v1/statuses \
-w "\nResponse code: %{http_code}\n" \
-f || {
echo "Failed to post to Mastodon"
exit 1
}
11 changes: 2 additions & 9 deletions .github/workflows/post_to_mastodon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,5 @@ jobs:
with:
timeout_minutes: 2
max_attempts: 3
command: |
curl -X POST -H "Authorization: Bearer ${{ secrets.MASTODONBOT }}" \
-F "status=New release in Snakemake project '${{ github.event.repository.full_name }}' for pull request '#${{ github.event.pull_request.number }}' merged: '${{ github.event.pull_request.title }}'. Get the latest release from #Bioconda or #Pypi." \
https://fediscience.org/api/v1/statuses \
-w "\nResponse code: %{http_code}\n" \
-f || {
echo "Failed to post to Mastodon"
exit 1
}
run: |
./post_to_mastodon.sh
Loading