Skip to content

Commit

Permalink
chore: Add dep-update prefix for dependabot upgrades (#55)
Browse files Browse the repository at this point in the history
* Add dep-update prefix for dependabot upgrades

* chore: release-plz also uses [changelog] in it's own config now
  • Loading branch information
chriswk authored Jan 6, 2025
1 parent 753e595 commit 07ba1d2
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 87 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ updates:
schedule:
interval: daily
open-pull-requests-limit: 10
commit-message:
prefix: "dep-update: "
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
commit-message:
prefix: "dep-update: "
open-pull-requests-limit: 10
4 changes: 3 additions & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install rust
run: |
rustup set auto-self-update disable
Expand Down
86 changes: 0 additions & 86 deletions cliff.toml

This file was deleted.

83 changes: 83 additions & 0 deletions release-plz.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,86 @@ publish_allow_dirty = false
semver_check = false


[changelog]

commit_parsers = [
{ message = "^feat", group = "<!-- 0 -->🚀 Features" },
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
{ message = "^doc", group = "<!-- 3 -->📚 Documentation" },
{ message = "^perf", group = "<!-- 4 -->⚡ Performance" },
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
{ message = "^dep-update", group = "<!-- 11 --> Dependency updates" },
{ message = "^chore\\(release\\): prepare for", skip = true },
{ message = "^chore\\(deps.*\\)", skip = true },
{ message = "^chore\\(pr\\)", skip = true },
{ message = "^chore\\(pull\\)", skip = true },
{ message = "^chore|^ci", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" },
{ body = ".*security", group = "<!-- 8 -->🛡️ Security" },
{ message = "^revert", group = "<!-- 9 -->◀️ Revert" },
{ message = ".*", group = "<!-- 10 -->💼 Other" },
]

commit_preprocessors = [
# Replace `foo` with `bar`
{ pattern = "foo", replace = "bar" },

# Replace `<REPO>` in the template body with the repository URL
{ pattern = '<REPO>', replace = "https://github.com/unleash/unleash-types-rs" },

# Replace multiple spaces with a single space.
{ pattern = " +", replace = " " },

# Replace the issue number with the link.
{ pattern = "\\(#([0-9]+)\\)", replace = "([#${1}](https://github.com/unleash/unleash-types-rs/issues/${1}))" },
# Remove prefix
{ pattern = 'Merged PR #[0-9]: (.*)', replace = "$1" },

# Remove gitmoji from commit messages, both actual UTF emoji and :emoji:
{ pattern = ' *(:\w+:|[\p{Emoji_Presentation}\p{Extended_Pictographic}\u{200D}]) *', replace = "" },

# Hyperlink PR references from merge commits.
{ pattern = "Merge pull request #([0-9]+) from [^ ]+", replace = "PR # [${1}](https://github.com/unleash/unleash-types-rs/pull/${1}):" },

# Hyperlink commit links, with short commit hash as description.
{ pattern = "https://github.com/unleash/unleash-types-rs/commit/([a-f0-9]{7})[a-f0-9]*", replace = "commit # [${1}](${0})" },

# Hyperlink bare commit hashes like "abcd1234" in commit logs, with short commit hash as description.
{ pattern = "([ \\n])(([a-f0-9]{7})[a-f0-9]*)", replace = "${1}commit # [${3}](https://github.com/unleash/unleash-types-rs/commit/${2})" },
]

body = """
## [{{ version | trim_start_matches(pat="v") }}]\
{%- if release_link -%}\
({{ release_link }})\
{% endif %} \
- {{ timestamp | date(format="%Y-%m-%d") }}
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
{% for commit in commits %}
{%- if commit.scope -%}
- *({{commit.scope}})* {% if commit.breaking %}[**breaking**] {% endif %}\
{{ commit.message }}{{ self::username(commit=commit) }}\
{%- if commit.links %} \
({% for link in commit.links %}[{{link.text}}]({{link.href}}) {% endfor -%})\
{% endif %}
{% else -%}
- {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message }}{{ self::username(commit=commit) }}{{ self::pr(commit=commit) }}
{% endif -%}
{% endfor -%}
{% endfor %}
{%- if remote.contributors %}
### Contributors
{% for contributor in remote.contributors %}
* @{{ contributor.username }}
{%- endfor %}
{% endif -%}
{%- macro username(commit) -%}
{% if commit.remote.username %} (by @{{ commit.remote.username }}){% endif -%}
{% endmacro -%}
{%- macro pr(commit) -%}
{% if commit.remote.pr_number %} - #{{ commit.remote.pr_number }}{% endif -%}
{% endmacro -%}
"""

0 comments on commit 07ba1d2

Please sign in to comment.