-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update all project files, update to Go v1.21 (#51)
* chore: update all project files, update to Go v1.21 * docs: update readme * chore: update golang-ci
- Loading branch information
Showing
20 changed files
with
609 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"generated_at": "2024-01-16T18:00:46.781499+01:00", | ||
"version": "v1.1.5-dirty", | ||
"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" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# These are supported funding model platforms | ||
|
||
ko_fi: chrisbargmann | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/githubevents/blob/main/CONTRIBUTING.md | ||
Thank you for your help and understanding! | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/githubevents/blob/main/CONTRIBUTING.md | ||
Thank you for your contribution! | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
repository: | ||
name: githubevents | ||
description: GitHub webhook events toolset for Go 🚀 | ||
homepage: https://cbrgm.net | ||
topics: github, go, golang, webhooks, events, module, webhook, codegen, go-library | ||
|
||
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 | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
name: 'add-reviews' | ||
on: | ||
pull_request_target: | ||
types: [opened, ready_for_review] | ||
|
||
jobs: | ||
add-reviews: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: kentaro-m/[email protected] | ||
|
||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v1 | ||
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 }} | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ jobs: | |
- name: install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.19.x | ||
go-version: 1.21.x | ||
|
||
- name: get modules | ||
run: go mod vendor | ||
|
@@ -28,7 +28,7 @@ jobs: | |
- name: golangci-lint | ||
uses: golangci/[email protected] | ||
with: | ||
version: v1.49 | ||
version: v1.54 | ||
|
||
- name: run tests | ||
run: make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: release-notification | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
notify-on-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Send Telegram Notification on New Release | ||
uses: cbrgm/telegram-github-action@v1 | ||
with: | ||
token: ${{ secrets.TELEGRAM_TOKEN }} | ||
to: ${{ secrets.TELEGRAM_CHAT_ID }} | ||
message: | | ||
🚀 New Release Published! | ||
Release Name: ${{ github.event.release.name }} | ||
Tag: ${{ github.event.release.tag_name }} | ||
Actor: ${{ github.actor }} | ||
Repository: ${{ github.repository }} | ||
Check it out: ${{ github.event.release.html_url }} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
name: stale-issues-and-prs | ||
'on': | ||
schedule: | ||
- cron: 0 0/3 * * * | ||
jobs: | ||
label-issues: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/stale@v9 | ||
name: Setting issue as idle | ||
with: | ||
repo-token: '${{ secrets.GITHUB_TOKEN }}' | ||
stale-issue-message: "This issue is idle because it has been open for 14 days with no activity." | ||
stale-issue-label: idle | ||
days-before-stale: 14 | ||
days-before-close: -1 | ||
operations-per-run: 100 | ||
exempt-issue-labels: backlog | ||
- uses: actions/stale@v9 | ||
name: Setting PR as idle | ||
with: | ||
repo-token: '${{ secrets.GITHUB_TOKEN }}' | ||
stale-pr-message: "This PR is idle because it has been open for 14 days with no activity." | ||
stale-pr-label: idle | ||
days-before-stale: 14 | ||
days-before-close: -1 | ||
operations-per-run: 100 | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
--- | ||
name: publish-release-tag | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * 0,1,3,5' # At 00:00 (12 AM) on Sunday, Monday, Wednesday, and Friday | ||
|
||
workflow_dispatch: | ||
inputs: | ||
bump-level: | ||
required: true | ||
type: choice | ||
description: 'The semver bump level' | ||
options: | ||
- 'major' | ||
- 'minor' | ||
- 'patch' | ||
- 'premajor' | ||
- 'preminor' | ||
- 'prepatch' | ||
- 'prerelease' | ||
default: 'patch' | ||
|
||
prerelease-tag: | ||
required: false | ||
description: 'The tag to use for prereleases' | ||
default: 'alpha' | ||
|
||
jobs: | ||
publish-release-tag: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.BOT_PAT_TOKEN }} | ||
|
||
- name: Get Latest Tag | ||
id: current | ||
run: | | ||
git fetch --tags | ||
latest_tag=$(git tag | sort -V | tail -n 1) | ||
echo "current version is: $latest_tag" | ||
echo "latest_tag=$latest_tag" >> $GITHUB_ENV | ||
- name: Bump Version | ||
id: bump-semver | ||
uses: cbrgm/semver-bump-action@main | ||
with: | ||
current-version: ${{ env.latest_tag }} | ||
bump-level: ${{ github.event.inputs.bump-level || 'patch' }} | ||
prerelease-tag: ${{ github.event.inputs.prerelease-tag }} | ||
|
||
- name: Publish Git Tag | ||
run: | | ||
git fetch --tags | ||
latest_tag=$(git tag | sort -V | tail -n 1) | ||
new_tag=${{ steps.bump-semver.outputs.new_version }} | ||
if [[ $(git rev-list $latest_tag..HEAD --count) -gt 0 ]]; then | ||
git config user.name "GitHub Actions" | ||
git config user.email "[email protected]" | ||
git tag $new_tag | ||
git push origin $new_tag | ||
else | ||
echo "No new commits since last tag. Skipping tag push. ($new_tag)" | ||
fi | ||
... |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.