Skip to content

Commit

Permalink
Merge pull request #23 from scidsg/glenn-sorrentino-patch-1
Browse files Browse the repository at this point in the history
Update post_to_mastodon.yml
  • Loading branch information
Glenn authored Nov 3, 2023
2 parents fc832ea + e9ccd52 commit 445f3a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/post_to_mastodon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ jobs:
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_BODY: ${{ github.event.pull_request.body }}
PR_USER: ${{ github.event.pull_request.user.login }}
REPO_NAME: ${{ github.repository }}
MASTODON_INSTANCE_URL: 'https://fosstodon.org'
run: |
PR_COMMENT=$(echo "$PR_BODY" | head -c 100) # Truncating to 100 characters, adjust as needed
STATUS="Pull request #$PR_NUMBER by @$PR_USER merged: $PR_TITLE - $PR_COMMENT"
STATUS="Pull request #$PR_NUMBER by @$PR_USER in $REPO_NAME merged: $PR_TITLE - $PR_COMMENT"
curl -X POST -H "Authorization: Bearer ${{ secrets.MASTODON_ACCESS_TOKEN }}" \
-F "status=$STATUS" \
$MASTODON_INSTANCE_URL/api/v1/statuses

0 comments on commit 445f3a8

Please sign in to comment.