Currently, a release is created in draft status, although it should have been automatically published:
|
request="$(jq -n \ |
|
--arg body "$RELEASE_CHANGELOG" \ |
|
--arg name "Release $RELEASE_TAG" \ |
|
--arg tag_name "$RELEASE_TAG" \ |
|
--arg target_commitish "$RELEASE_BRANCH" \ |
|
'{ |
|
body: $body, |
|
name: $name, |
|
tag_name: $tag_name, |
|
target_commitish: $target_commitish, |
|
draft: false, |
|
prerelease: false |
|
}')" |
draft: false, but the release was only a draft. The API didn't change here: https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#create-a-release
For 2.1.0, this was handy, because I closed #341 - which caused github_changelog_generator to generate a changelog for 2.1.0...HEAD - which only contained #341 and not the 2.1.0 changes, see the first entry in CHANGELOG.md:
|
## [Unreleased](https://github.com/m2e-code-quality/m2e-code-quality/tree/HEAD) |
|
|
|
[Full Changelog](https://github.com/m2e-code-quality/m2e-code-quality/compare/2.1.0...HEAD) |
|
|
|
**Closed issues:** |
|
|
|
- Proper releases instead of just snapshots? [\#341](https://github.com/m2e-code-quality/m2e-code-quality/issues/341) |
|
|
|
## [2.1.0](https://github.com/m2e-code-quality/m2e-code-quality/tree/2.1.0) (2023-12-08) |
So, two questions/issues:
- why was the release not published automatically?
- how can we prevent that the wrong changelog entry ends up in the release notes?
For 2., currently we extract the release notes from CHANGELOG.md, and we take the beginning until the second version entry (in that case "Unreleased" but not "2.1.0"):
|
END_LINE=$(grep -n "^## " CHANGELOG.md|head -2|tail -1|cut -d ":" -f 1) |
|
END_LINE=$((END_LINE - 1)) |
|
RELEASE_CHANGELOG="$(head -$END_LINE CHANGELOG.md)" |
This needs to be improved.
Currently, a release is created in draft status, although it should have been automatically published:
m2e-code-quality/tools/release.sh
Lines 28 to 40 in 8b3c4aa
draft: false, but the release was only a draft. The API didn't change here: https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#create-a-releaseFor 2.1.0, this was handy, because I closed #341 - which caused github_changelog_generator to generate a changelog for 2.1.0...HEAD - which only contained #341 and not the 2.1.0 changes, see the first entry in CHANGELOG.md:
m2e-code-quality/CHANGELOG.md
Lines 3 to 11 in 8b3c4aa
So, two questions/issues:
For 2., currently we extract the release notes from CHANGELOG.md, and we take the beginning until the second version entry (in that case "Unreleased" but not "2.1.0"):
m2e-code-quality/tools/release.sh
Lines 24 to 26 in 8b3c4aa
This needs to be improved.