Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update changelog template and introduce codeowners to notify when a PR is created #141

Merged
merged 98 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
7d55be3
Allow use of default config
MichaelKora Sep 7, 2023
1813854
Clean code
MichaelKora Sep 7, 2023
730affb
Test changelog generation
MichaelKora Sep 7, 2023
32a0d13
Test changelog generation
MichaelKora Sep 7, 2023
1c80947
Test changelog generation
MichaelKora Sep 7, 2023
053db47
Test changelog generation
MichaelKora Sep 7, 2023
e8cd9b6
Test changelog generation
MichaelKora Sep 7, 2023
a87c667
Test changelog generation
MichaelKora Sep 7, 2023
f821568
Clean code
MichaelKora Sep 7, 2023
73e2d93
Update documentation
MichaelKora Sep 7, 2023
b2c1f38
Update actions/changelog-generate/action.yaml
MichaelKora Sep 8, 2023
bdc8e6d
Update actions/changelog-generate/action.yaml
MichaelKora Sep 11, 2023
0cf5175
Update actions/changelog-generate/action.yaml
MichaelKora Sep 11, 2023
3386585
Update workflow call
MichaelKora Sep 13, 2023
9250b3d
Merge branch 'feat/changelog-def' of github.com:bakdata/ci-templates …
MichaelKora Sep 13, 2023
b3e289a
Update workflow call
MichaelKora Sep 13, 2023
a06b263
Update workflow call
MichaelKora Sep 13, 2023
bfa8556
Use composite actions
MichaelKora Sep 13, 2023
fd9984c
Use composite actions
MichaelKora Sep 13, 2023
8d9a39d
Use composite actions
MichaelKora Sep 13, 2023
1200ca3
Use newer versions for actions
MichaelKora Sep 13, 2023
8dd1826
Use newer versions for actions
MichaelKora Sep 13, 2023
79c8307
Use newer versions for actions
MichaelKora Sep 13, 2023
a3cef4b
Use newer versions for actions
MichaelKora Sep 13, 2023
5d0a959
Update link to ahangelog config
MichaelKora Sep 13, 2023
73c7639
Update link to ahangelog config
MichaelKora Sep 13, 2023
8f16e09
Update link to ahangelog config
MichaelKora Sep 13, 2023
9891035
Update link to ahangelog config
MichaelKora Sep 13, 2023
af75368
Update link to ahangelog config
MichaelKora Sep 13, 2023
9aefb37
Update link to ahangelog config
MichaelKora Sep 13, 2023
2147e40
Update link to ahangelog config
MichaelKora Sep 13, 2023
c6198c1
Update link to ahangelog config
MichaelKora Sep 13, 2023
3b16d79
Update link to ahangelog config
MichaelKora Sep 13, 2023
b2ca89e
Update link to ahangelog config
MichaelKora Sep 13, 2023
4da9e7f
Update link to ahangelog config
MichaelKora Sep 13, 2023
d7d9bfe
Update link to ahangelog config
MichaelKora Sep 13, 2023
5cffbad
Update link to ahangelog config
MichaelKora Sep 13, 2023
06c2c92
Update link to ahangelog config
MichaelKora Sep 13, 2023
2776093
Update link to ahangelog config
MichaelKora Sep 13, 2023
7086bd6
Update link to ahangelog config
MichaelKora Sep 13, 2023
5ada287
Update link to ahangelog config
MichaelKora Sep 13, 2023
5bf6364
Update link to ahangelog config
MichaelKora Sep 13, 2023
b645b3f
Update link to ahangelog config
MichaelKora Sep 13, 2023
9de6f3b
Update link to ahangelog config
MichaelKora Sep 14, 2023
030df2a
Update link to ahangelog config
MichaelKora Sep 14, 2023
ee47bba
Update link to ahangelog config
MichaelKora Sep 14, 2023
41c36b7
Update link to ahangelog config
MichaelKora Sep 14, 2023
db746d4
Update link to ahangelog config
MichaelKora Sep 14, 2023
c735c90
Update link to ahangelog config
MichaelKora Sep 14, 2023
ec14443
Update link to ahangelog config
MichaelKora Sep 14, 2023
18497cc
Update link to ahangelog config
MichaelKora Sep 14, 2023
b4cd4d9
Update link to ahangelog config
MichaelKora Sep 14, 2023
af08ad1
Update link to ahangelog config
MichaelKora Sep 14, 2023
6bd026b
Update link to ahangelog config
MichaelKora Sep 14, 2023
b136e92
Update link to ahangelog config
MichaelKora Sep 14, 2023
b8f2ca3
Update link to ahangelog config
MichaelKora Sep 14, 2023
414d76b
Update link to ahangelog config
MichaelKora Sep 14, 2023
3cf510d
Update link to ahangelog config
MichaelKora Sep 14, 2023
6eef5e6
Update link to ahangelog config
MichaelKora Sep 14, 2023
3ce1ec1
Update link to ahangelog config
MichaelKora Sep 14, 2023
024d9ca
Update link to ahangelog config
MichaelKora Sep 14, 2023
7a128c8
Update link to ahangelog config
MichaelKora Sep 14, 2023
9637d0d
Update link to ahangelog config
MichaelKora Sep 14, 2023
82d802f
Update link to ahangelog config
MichaelKora Sep 14, 2023
d8004ed
Update link to ahangelog config
MichaelKora Sep 14, 2023
c82f619
Update link to ahangelog config
MichaelKora Sep 14, 2023
76b4a93
Update link to ahangelog config
MichaelKora Sep 14, 2023
1378170
Update link to ahangelog config
MichaelKora Sep 14, 2023
2c342c2
Update link to ahangelog config
MichaelKora Sep 14, 2023
0bebb50
Update link to ahangelog config
MichaelKora Sep 14, 2023
5c756bb
Update link to ahangelog config
MichaelKora Sep 14, 2023
01dfa3d
Update link to ahangelog config
MichaelKora Sep 15, 2023
08bea9a
Update link to ahangelog config
MichaelKora Sep 15, 2023
316020c
Update link to ahangelog config
MichaelKora Sep 15, 2023
243b8c4
Update link to ahangelog config
MichaelKora Sep 15, 2023
d9f88b4
Update link to ahangelog config
MichaelKora Sep 15, 2023
e6f44a9
Update link to ahangelog config
MichaelKora Sep 15, 2023
c602092
Update link to ahangelog config
MichaelKora Sep 15, 2023
6263c41
Update link to ahangelog config
MichaelKora Sep 15, 2023
07c5a24
Update link to ahangelog config
MichaelKora Sep 15, 2023
5ce4369
Update link to ahangelog config
MichaelKora Sep 15, 2023
4bde02d
Update link to ahangelog config
MichaelKora Sep 15, 2023
6de9cb9
Update link to ahangelog config
MichaelKora Sep 15, 2023
ba0a355
Update link to ahangelog config
MichaelKora Sep 15, 2023
71eb829
Clean code
MichaelKora Sep 18, 2023
d48f7b2
Clean code
MichaelKora Sep 18, 2023
88e5323
Clean code
MichaelKora Sep 18, 2023
4face64
Update dependencies links
MichaelKora Sep 18, 2023
87b7213
Sort vars
MichaelKora Sep 18, 2023
4e29718
Comment remapping
MichaelKora Sep 18, 2023
762ec59
Allow to use graddle to push bump the version
MichaelKora Sep 20, 2023
385591f
Allow to use graddle to push bump the version
MichaelKora Sep 20, 2023
265e65d
Allow to use graddle to push bump the version
MichaelKora Sep 20, 2023
daabd51
Allow to use graddle to push bump the version
MichaelKora Sep 20, 2023
4524ca4
Remove unrelated changes
MichaelKora Sep 21, 2023
b82357e
Remove unrelated changes
MichaelKora Sep 21, 2023
dfc6a5e
Remove unrelated changes
MichaelKora Sep 21, 2023
87a815f
Remove unrelated changes
MichaelKora Sep 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/changelog-config.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"categories": [
{"title": "## 🚀 Features", "labels": ["enhancement"]},
{"title": "## 🐛 Fixes", "labels": ["bug"]}
],
"ignore_labels": ["ignore"],
"sort": {"order": "ASC", "on_property": "mergedAt"},
"template": "# [${{TO_TAG}}](https://github.com/bakdata/ci-templates/releases/tag/${{TO_TAG}}) - Release Date: ${{TO_TAG_DATE}}\n\n${{CHANGELOG}}\n\n<summary>Uncategorized</summary>\n\n${{UNCATEGORIZED}}",
"pr_template": "- ${{TITLE}} - [#${{NUMBER}}](${{URL}})\n",
"empty_template": "- no changes!"
"categories": [
{ "title": "## 🚀 Features", "labels": ["enhancement"] },
{ "title": "## 🐛 Fixes", "labels": ["bug"] }
],
"ignore_labels": ["ignore"],
"sort": { "order": "ASC", "on_property": "mergedAt" },
"template": "# [${{TO_TAG}}](https://github.com/${{OWNER}}/${{REPO}}/releases/tag/${{TO_TAG}}) - Release Date: ${{TO_TAG_DATE}}\n\n${{CHANGELOG}}\n\n<summary>Uncategorized</summary>\n\n${{UNCATEGORIZED}}",
"pr_template": "- ${{TITLE}} - [#${{NUMBER}}](${{URL}})\n",
"empty_template": "- no changes!"
}
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @yannick-roeder @MichaelKora @yordanovsstoyan
33 changes: 16 additions & 17 deletions actions/changelog-generate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ files. A simple configuration may look like this:
"title": "## 🚀 Features",
"labels": ["feature", "feat", "enhancement"]
},
{
{
"title": "## 🐛 Fixes",
"labels": ["fix", "bug"]
"labels": ["fix", "bug"]
},
{
{
"title": "## 🧪 Dependencies",
"labels": ["dependency"]
"labels": ["dependency"]
},
{
{
"title": "## 📦 Uncategorized",
"labels": []
"labels": []
}
],
"ignore_labels": ["ignore"],
Expand All @@ -70,16 +70,16 @@ Additional configuration options can be explored

## Input Parameters

| Name | Required | Default Value | Description |
| ------------------------- | :------: | :-------------------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| github-token | ✅ | - | The GitHub token for committing the changes |
| new-tag | ✅ | - | Defines until which tag the changelog will consider merged pull requests (can be a tag or a valid git ref) |
| changelog-file | ❌ | "CHANGELOG.md" | Path to the Changelog.md file |
| commit-mode | ❌ | "false" | Special configuration for projects which work without PRs. Uses commit messages as changelog. This mode looses access to information only available for PRs. |
| config | ❌ | "./.github/changelog-config.json" | Path to the changelog config JSON file |
| fetch-release-information | ❌ | "false" | Will enable fetching additional release information from tags. |
| fetch-reviewers | ❌ | "false" | Will enable fetching the users/reviewers who approved the PR. |
| old-tag | ❌ | "" | Defines the 'start' from where the changelog will consider merged pull requests (can be a tag or a valid git ref) |
| Name | Required | Default Value | Description |
| ------------------------- | :------: | :------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| github-token | ✅ | - | The GitHub token for committing the changes |
| new-tag | ✅ | - | Defines until which tag the changelog will consider merged pull requests (can be a tag or a valid git ref) |
| changelog-file | ❌ | "CHANGELOG.md" | Path to the Changelog.md file |
| commit-mode | ❌ | "false" | Special configuration for projects which work without PRs. Uses commit messages as changelog. This mode looses access to information only available for PRs. |
| config | ❌ | "" | Path to the changelog config JSON file |
MichaelKora marked this conversation as resolved.
Show resolved Hide resolved
| fetch-release-information | ❌ | "false" | Will enable fetching additional release information from tags. |
| fetch-reviewers | ❌ | "false" | Will enable fetching the users/reviewers who approved the PR. |
| old-tag | ❌ | "" | Defines the 'start' from where the changelog will consider merged pull requests (can be a tag or a valid git ref) |

## Outputs

Expand All @@ -106,7 +106,6 @@ steps:
uses: bakdata/ci-templates/actions/changelog-generate@main
with:
github-token: ${{ secrets.GH_TOKEN }}
config: "./.github/changelog-config.json"
new-tag: "1.0.0"
changelog-file: "CHANGELOG.md"
fetch-reviewers: "true"
Expand Down
17 changes: 14 additions & 3 deletions actions/changelog-generate/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ inputs:
config:
description: Path to the changelog config JSON file
required: false
default: "./.github/changelog-config.json"
default: ""
MichaelKora marked this conversation as resolved.
Show resolved Hide resolved
fetch-release-information:
description: "Will enable fetching additional release information from tags."
required: false
Expand Down Expand Up @@ -75,12 +75,23 @@ runs:
echo "fromtag=$setfrom">> $GITHUB_OUTPUT
shell: bash

- name: Download default changelog
id: config
run: |
if [[ -n "${{ inputs.config }}" ]]; then
echo "path=${{ inputs.config }}" >> "$GITHUB_OUTPUT"
else
wget -c https://raw.githubusercontent.com/bakdata/ci-templates/1.33.0/.github/changelog-config.json -O default-config.json
echo "path=default-config.json" >> "$GITHUB_OUTPUT"
fi
shell: bash

- name: "Create changelog"
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v4
with:
token: "${{ inputs.github-token }}"
configuration: "${{ inputs.config }}"
configuration: "${{ steps.config.outputs.path }}"
fromTag: "${{ steps.set-tags.outputs.fromtag }}"
toTag: "${{ steps.set-tags.outputs.totag }}"
outputFile: ${{ runner.temp }}/changes.md
Expand Down Expand Up @@ -111,7 +122,7 @@ runs:
# Create changelog.md in case of a first Release
if [ -n "${{ inputs.changelog-file }}" ]; then
sed -i 's/# /## /g' ${{ runner.temp }}/changes.md
echo -e "\n" >> ${{ runner.temp }}/changes.md
echo -e "\n" >> ${{ runner.temp }}/changes.md
if [ ! -f "${{ inputs.changelog-file }}" ]; then
echo $'# Changelog\n' >> ${{ inputs.changelog-file }}
fi
Expand Down