From cd25fc706d52703669a657e6cdbfa51d637882fd Mon Sep 17 00:00:00 2001 From: Dylan Ravel Date: Fri, 3 Apr 2026 20:03:16 -0700 Subject: [PATCH 1/4] Add Dependabot PR title workflow; tweak templates --- .github/dependabot.yml | 4 --- .github/workflows/dependabot-pr-title.yml | 30 +++++++++++++++++++++++ cliff.toml | 2 +- 3 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/dependabot-pr-title.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 79a2bba..3112716 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,8 +7,6 @@ updates: interval: "weekly" labels: - "dependencies" - commit-message: - prefix: "build(deps)" # Maintain GitHub Actions in your workflows - package-ecosystem: "github-actions" @@ -18,5 +16,3 @@ updates: labels: - "dependencies" - "ci" - commit-message: - prefix: "ci(github-actions)" \ No newline at end of file diff --git a/.github/workflows/dependabot-pr-title.yml b/.github/workflows/dependabot-pr-title.yml new file mode 100644 index 0000000..58b73a7 --- /dev/null +++ b/.github/workflows/dependabot-pr-title.yml @@ -0,0 +1,30 @@ +name: Dependabot PR Title + +on: + pull_request_target: + types: [opened, reopened, synchronize] + +permissions: + pull-requests: write + +jobs: + prefix-title: + runs-on: ubuntu-latest + if: github.actor == 'dependabot[bot]' + steps: + - name: Update PR Title + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_URL: ${{ github.event.pull_request.html_url }} + PR_TITLE: ${{ github.event.pull_request.title }} + run: | + # Check if it already has a prefix to prevent double-prefixing + if [[ "$PR_TITLE" != build\(deps\)* ]] && [[ "$PR_TITLE" != ci\(github-actions\)* ]]; then + # If it's a GitHub Action update, use ci(github-actions) + if [[ "$PR_TITLE" == *"github-actions"* || "$PR_TITLE" == *"actions/"* ]]; then + gh pr edit "$PR_URL" --title "ci(github-actions): $PR_TITLE" + else + # Otherwise, use build(deps) for Go modules + gh pr edit "$PR_URL" --title "build(deps): $PR_TITLE" + fi + fi diff --git a/cliff.toml b/cliff.toml index 3748d39..a1b5e56 100644 --- a/cliff.toml +++ b/cliff.toml @@ -11,7 +11,7 @@ body = """ {% set commit_title = commit_title | replace(from=pr_str, to="") -%} {% endif -%} - {% if commit.breaking %}[breaking] {% endif %}{{ commit_title | upper_first }}\ -{% if commit.remote.username %} by @{{ commit.remote.username }}{% endif %}\ +{% if commit.author.name %} by **{{ commit.author.name }}**{% endif %}\ {% if commit.remote.pr_number %} in [#{{ commit.remote.pr_number }}](https://github.com/DylanDevelops/tmpo/pull/{{ commit.remote.pr_number }}){% endif %} {% endfor %} From 9964da1eef5289b12c35ded3cf20b82dbd1f9d4c Mon Sep 17 00:00:00 2001 From: Dylan Ravel Date: Sat, 11 Apr 2026 17:02:58 -0700 Subject: [PATCH 2/4] Revert "Add Dependabot PR title workflow; tweak templates" This reverts commit cd25fc706d52703669a657e6cdbfa51d637882fd. --- .github/dependabot.yml | 4 +++ .github/workflows/dependabot-pr-title.yml | 30 ----------------------- cliff.toml | 2 +- 3 files changed, 5 insertions(+), 31 deletions(-) delete mode 100644 .github/workflows/dependabot-pr-title.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 3112716..79a2bba 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,6 +7,8 @@ updates: interval: "weekly" labels: - "dependencies" + commit-message: + prefix: "build(deps)" # Maintain GitHub Actions in your workflows - package-ecosystem: "github-actions" @@ -16,3 +18,5 @@ updates: labels: - "dependencies" - "ci" + commit-message: + prefix: "ci(github-actions)" \ No newline at end of file diff --git a/.github/workflows/dependabot-pr-title.yml b/.github/workflows/dependabot-pr-title.yml deleted file mode 100644 index 58b73a7..0000000 --- a/.github/workflows/dependabot-pr-title.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Dependabot PR Title - -on: - pull_request_target: - types: [opened, reopened, synchronize] - -permissions: - pull-requests: write - -jobs: - prefix-title: - runs-on: ubuntu-latest - if: github.actor == 'dependabot[bot]' - steps: - - name: Update PR Title - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PR_URL: ${{ github.event.pull_request.html_url }} - PR_TITLE: ${{ github.event.pull_request.title }} - run: | - # Check if it already has a prefix to prevent double-prefixing - if [[ "$PR_TITLE" != build\(deps\)* ]] && [[ "$PR_TITLE" != ci\(github-actions\)* ]]; then - # If it's a GitHub Action update, use ci(github-actions) - if [[ "$PR_TITLE" == *"github-actions"* || "$PR_TITLE" == *"actions/"* ]]; then - gh pr edit "$PR_URL" --title "ci(github-actions): $PR_TITLE" - else - # Otherwise, use build(deps) for Go modules - gh pr edit "$PR_URL" --title "build(deps): $PR_TITLE" - fi - fi diff --git a/cliff.toml b/cliff.toml index a1b5e56..3748d39 100644 --- a/cliff.toml +++ b/cliff.toml @@ -11,7 +11,7 @@ body = """ {% set commit_title = commit_title | replace(from=pr_str, to="") -%} {% endif -%} - {% if commit.breaking %}[breaking] {% endif %}{{ commit_title | upper_first }}\ -{% if commit.author.name %} by **{{ commit.author.name }}**{% endif %}\ +{% if commit.remote.username %} by @{{ commit.remote.username }}{% endif %}\ {% if commit.remote.pr_number %} in [#{{ commit.remote.pr_number }}](https://github.com/DylanDevelops/tmpo/pull/{{ commit.remote.pr_number }}){% endif %} {% endfor %} From 6f5c9ad6691a65e87b063bd6e8e42e2dde043bde Mon Sep 17 00:00:00 2001 From: Dylan Ravel Date: Sat, 11 Apr 2026 17:04:18 -0700 Subject: [PATCH 3/4] Update dependabot.yml --- .github/dependabot.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 79a2bba..3112716 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,8 +7,6 @@ updates: interval: "weekly" labels: - "dependencies" - commit-message: - prefix: "build(deps)" # Maintain GitHub Actions in your workflows - package-ecosystem: "github-actions" @@ -18,5 +16,3 @@ updates: labels: - "dependencies" - "ci" - commit-message: - prefix: "ci(github-actions)" \ No newline at end of file From 31d86353b41c5094f1dd626d86ba29e09bc2aabe Mon Sep 17 00:00:00 2001 From: Dylan Ravel Date: Sat, 11 Apr 2026 17:14:50 -0700 Subject: [PATCH 4/4] Update to use github api for release notes --- .github/workflows/release.yml | 65 +++++++++++++++++------------------ cliff.toml | 29 +++++++++------- 2 files changed, 48 insertions(+), 46 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 16620a6..6acf35f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,43 +1,42 @@ name: Release on: - push: - tags: - - "v*" + push: + tags: + - "v*" permissions: - contents: write + contents: write jobs: - goreleaser: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v6 - with: - fetch-depth: 0 + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + fetch-depth: 0 - - name: Set up Go - uses: actions/setup-go@v6 - with: - go-version: "1.25" + - name: Set up Go + uses: actions/setup-go@v6 + with: + go-version: "1.25" - - name: Generate Release Notes - uses: orhun/git-cliff-action@v4 - with: - config: cliff.toml - args: --latest --strip header - env: - OUTPUT: ${{ runner.temp }}/release-notes.md - GITHUB_REPO: ${{ github.repository }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Generate Release Notes + uses: orhun/git-cliff-action@v4 + with: + config: cliff.toml + args: --latest --strip header --github-repo ${{ github.repository }} + env: + OUTPUT: ${{ runner.temp }}/release-notes.md + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v7 - with: - distribution: goreleaser - version: "~> v2" - args: release --clean --release-notes=${{ runner.temp }}/release-notes.md - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }} + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v7 + with: + distribution: goreleaser + version: "~> v2" + args: release --clean --release-notes=${{ runner.temp }}/release-notes.md + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }} diff --git a/cliff.toml b/cliff.toml index 3748d39..ba5026e 100644 --- a/cliff.toml +++ b/cliff.toml @@ -1,3 +1,7 @@ +[remote.github] +owner = "DylanDevelops" +repo = "tmpo" + [changelog] body = """ ## What's Changed @@ -6,13 +10,13 @@ body = """ ### {{ group | striptags | trim }} {% for commit in commits -%} {% set commit_title = commit.message | split(pat="\\n") | first -%} -{% if commit.remote.pr_number -%} - {% set pr_str = " (#" ~ commit.remote.pr_number ~ ")" -%} +{% if commit.github.pr_number -%} + {% set pr_str = " (#" ~ commit.github.pr_number ~ ")" -%} {% set commit_title = commit_title | replace(from=pr_str, to="") -%} {% endif -%} - {% if commit.breaking %}[breaking] {% endif %}{{ commit_title | upper_first }}\ -{% if commit.remote.username %} by @{{ commit.remote.username }}{% endif %}\ -{% if commit.remote.pr_number %} in [#{{ commit.remote.pr_number }}](https://github.com/DylanDevelops/tmpo/pull/{{ commit.remote.pr_number }}){% endif %} +{% if commit.github.username %} by @{{ commit.github.username }}{% endif %}\ +{% if commit.github.pr_number %} in [#{{ commit.github.pr_number }}](https://github.com/DylanDevelops/tmpo/pull/{{ commit.github.pr_number }}){% endif %} {% endfor %} {% endfor %} @@ -24,7 +28,6 @@ body = """ {% endfor %} {% endif %} - {% if previous.version %} **Full Changelog**: https://github.com/DylanDevelops/tmpo/compare/{{ previous.version }}...{{ version }} {% else %} @@ -38,12 +41,12 @@ conventional_commits = true filter_unconventional = true filter_commits = true commit_parsers = [ - { message = "^feat", group = "โœจ Features" }, - { message = "^fix", group = "๐Ÿ› Bug Fixes" }, - { message = "^perf", group = "๐Ÿš€ Performance Improvements" }, - { message = "^refactor", group = "๐Ÿ› ๏ธ Refactoring" }, - { message = "^docs?", group = "๐Ÿ“š Documentation" }, - { message = "^(build|ci)", group = "๐Ÿ”ง Build & Dependencies" }, - { message = "^chore", group = "๐Ÿงน Maintenance" }, - { message = "^Merge ", skip = true }, + { message = "^feat", group = "โœจ Features" }, + { message = "^fix", group = "๐Ÿ› Bug Fixes" }, + { message = "^perf", group = "๐Ÿš€ Performance Improvements" }, + { message = "^refactor", group = "๐Ÿ› ๏ธ Refactoring" }, + { message = "^docs?", group = "๐Ÿ“š Documentation" }, + { message = "^(build|ci)", group = "๐Ÿ”ง Build & Dependencies" }, + { message = "^chore", group = "๐Ÿงน Maintenance" }, + { message = "^Merge ", skip = true }, ] \ No newline at end of file