Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cbrgm/mastodon-github-action
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1
Choose a base ref
...
head repository: cbrgm/mastodon-github-action
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2
Choose a head ref
Loading
Showing with 1,725 additions and 26,107 deletions.
  1. +90 −0 .anvil.lock
  2. +2 −0 .dockerignore
  3. +19 −0 .editorconfig
  4. +0 −3 .eslintignore
  5. +0 −15 .eslintrc.json
  6. +4 −0 .github/FUNDING.yml
  7. +13 −0 .github/auto_assign.yml
  8. +0 −7 .github/dependabot.yml
  9. +10 −0 .github/issue_template.md
  10. +9 −0 .github/pull_request_template.md
  11. +6 −0 .github/renovate.json
  12. +34 −0 .github/settings.yml
  13. +12 −0 .github/workflows/autoassign.yml
  14. +62 −0 .github/workflows/automerge.yml
  15. +154 −0 .github/workflows/container.yml
  16. +18 −0 .github/workflows/example-workflow-envs.yml
  17. +17 −0 .github/workflows/example-workflow.yml
  18. +54 −0 .github/workflows/go-binaries.yml
  19. +60 −0 .github/workflows/go-lint-test.yml
  20. +36 −0 .github/workflows/notify.yml
  21. +0 −21 .github/workflows/publish.yaml
  22. +35 −0 .github/workflows/stale.yml
  23. +68 −0 .github/workflows/tag.yml
  24. +0 −13 .github/workflows/test.yaml
  25. +32 −119 .gitignore
  26. +71 −0 .golangci.yml
  27. +0 −3 .prettierignore
  28. +2 −1 CODEOWNERS
  29. +49 −0 CONTRIBUTING.md
  30. +10 −0 Dockerfile.linux.386
  31. +10 −0 Dockerfile.linux.amd64
  32. +10 −0 Dockerfile.linux.arm
  33. +10 −0 Dockerfile.linux.arm64
  34. +2 −1 LICENSE
  35. +164 −0 Makefile
  36. +65 −9 README.md
  37. +50 −7 action.yml
  38. +197 −0 cmd/mastodon-github-action/main.go
  39. +170 −0 cmd/mastodon-github-action/main_test.go
  40. +45 −0 cmd/mastodon-github-action/output.go
  41. +0 −22,135 dist/index.js
  42. +0 −900 dist/licenses.txt
  43. +6 −11 example-workflows/example-inline-message.yaml
  44. +6 −11 example-workflows/example-multiline-message.yaml
  45. +48 −0 flake.lock
  46. +55 −0 flake.nix
  47. +7 −0 go.mod
  48. +13 −0 go.sum
  49. +0 −2,721 package-lock.json
  50. +0 −40 package.json
  51. +0 −90 src/index.js
90 changes: 90 additions & 0 deletions .anvil.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"generated_at": "2025-02-14T17:24:20.928072704Z",
"version": "1.2.26",
"files": [
{
"path": ".editorconfig"
},
{
"path": ".github/FUNDING.yml"
},
{
"path": ".github/auto_assign.yml"
},
{
"path": ".github/issue_template.md"
},
{
"path": ".github/pull_request_template.md"
},
{
"path": ".github/renovate.json"
},
{
"path": ".github/settings.yml"
},
{
"path": ".github/workflows/autoassign.yml"
},
{
"path": ".github/workflows/automerge.yml"
},
{
"path": ".github/workflows/notify.yml"
},
{
"path": ".github/workflows/stale.yml"
},
{
"path": ".github/workflows/tag.yml"
},
{
"path": "CODEOWNERS"
},
{
"path": "CONTRIBUTING.md"
},
{
"path": "LICENSE"
},
{
"path": ".dockerignore"
},
{
"path": ".github/workflows/container.yml"
},
{
"path": ".github/workflows/go-binaries.yml"
},
{
"path": ".github/workflows/go-lint-test.yml"
},
{
"path": ".gitignore"
},
{
"path": ".golangci.yml"
},
{
"path": "Dockerfile.linux.386"
},
{
"path": "Dockerfile.linux.amd64"
},
{
"path": "Dockerfile.linux.arm"
},
{
"path": "Dockerfile.linux.arm64"
},
{
"path": "Makefile"
},
{
"path": "flake.lock"
},
{
"path": "flake.nix"
}
]
}
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!bin/
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# http://editorconfig.org

root = true

[*]
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true

[Makefile]
indent_style = tab
indent_size = 4

[*.go]
indent_style = tab
indent_size = 4

[*.md]
trim_trailing_whitespace = true
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

15 changes: 0 additions & 15 deletions .eslintrc.json

This file was deleted.

4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# These are supported funding model platforms

ko_fi: chrisbargmann

13 changes: 13 additions & 0 deletions .github/auto_assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Set to true to add reviewers to pull requests
addReviewers: true

# Set to true to add assignees to pull requests
addAssignees: false

# A list of reviewers to be added to pull requests (GitHub user name)
reviewers:
- cbrgm

# A number of reviewers added to the pull request
# Set 0 to add all the reviewers (default: 0)
numberOfReviewers: 1
7 changes: 0 additions & 7 deletions .github/dependabot.yml

This file was deleted.

10 changes: 10 additions & 0 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!-- PLEASE READ BEFORE DELETING
Please write in English, as it's a language understood by all maintainers of this project. Before submitting your issue, please take a moment to ensure it hasn't already been reported or addressed.
Additionally, we highly recommend reading our contributing guidelines to familiarize yourself with the process and increase the effectiveness of your contribution:
https://github.com/cbrgm/mastodon-github-action/blob/main/CONTRIBUTING.md
Thank you for your help and understanding!
-->
9 changes: 9 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- PLEASE READ BEFORE DELETING
Before proceeding, ensure your pull request is targeting the main branch. Clearly describe the purpose of your pull request and the issue it addresses, if applicable. We also encourage you to read our contributing guidelines for a smoother contribution process:
https://github.com/cbrgm/mastodon-github-action/blob/main/CONTRIBUTING.md
Thank you for your contribution!
-->
6 changes: 6 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>cbrgm/cbrgm//renovate/preset"
]
}
34 changes: 34 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
repository:
name: mastodon-github-action
description: Use this Action to send a toot (message) from a GitHub Actions workflow to Mastodon
homepage: https://cbrgm.net
topics: gihub-actions, github, action, go, mastodon, toot

private: false
has_issues: true
has_wiki: false
has_downloads: false

default_branch: main

allow_squash_merge: true
allow_merge_commit: true
allow_rebase_merge: true

allow_update_branch: true
allow_auto_merge: true
delete_branch_on_merge: true
enable_automated_security_fixes: true
enable_vulnerability_alerts: true

branches:
- name: main
protection:
required_pull_request_reviews: null
required_status_checks:
strict: true
contexts:
- testing
enforce_admins: true
...
12 changes: 12 additions & 0 deletions .github/workflows/autoassign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: add-reviews
on:
pull_request_target:
types: [opened, ready_for_review]

jobs:
add-reviews:
runs-on: ubuntu-latest
steps:
- uses: kentaro-m/auto-assign-action@v2.0.0
...
62 changes: 62 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
name: automerge

on: pull_request

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'

steps:

- name: Fetch metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: ${{ secrets.BOT_PAT_TOKEN }}

- name: Approve request
id: approve
run: gh pr review --approve ${{ github.event.pull_request.html_url }}
env:
GH_TOKEN: ${{ secrets.BOT_PAT_TOKEN }}

- name: Enable automerge
id: automerge
run: gh pr merge --rebase --auto ${{ github.event.pull_request.html_url }}
env:
GH_TOKEN: ${{ secrets.BOT_PAT_TOKEN }}

renovate:
runs-on: ubuntu-latest
if: github.actor == 'renovate[bot]'

steps:
- name: Approve request
id: approve
run: gh pr review --approve ${{ github.event.pull_request.html_url }}
env:
GH_TOKEN: ${{ secrets.BOT_PAT_TOKEN }}

- name: Enable automerge
id: automerge
run: gh pr merge --rebase --auto ${{ github.event.pull_request.html_url }}
env:
GH_TOKEN: ${{ secrets.BOT_PAT_TOKEN }}

cbrgm:
runs-on: ubuntu-latest
if: github.actor == 'cbrgm' && contains(github.event.pull_request.labels.*.name, 'auto-merge')

steps:
- name: Enable automerge
id: automerge
run: gh pr merge --rebase --auto ${{ github.event.pull_request.html_url }}
env:
GH_TOKEN: ${{ secrets.BOT_PAT_TOKEN }}
...
Loading