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

Include relevant changelog on Release page #837

Open
johnd0e opened this issue May 7, 2024 · 4 comments
Open

Include relevant changelog on Release page #837

johnd0e opened this issue May 7, 2024 · 4 comments

Comments

@johnd0e
Copy link
Contributor

johnd0e commented May 7, 2024

Description of the new feature or improvement

It would be convenient not only see build number, but relevant changelog parts, e.g.:

build 6331

changelog:

--------------------------------------------------------------------------------
drkns 2024-05-06 12:34:28+01:00 - build 6331

1. Refactoring.

LuaMacro\changelog:

shmuel 2024-05-06 11:34:46+03:00 - build 831

1. mf.eval(S,2): invalid area in 'S' is treated as a part of key

2. mf.eval(S,2): a leading slash in 'S' indicates that no area is specified

Alternatively: list of commits messages since last build, e.g.:

build 6331

Alternatively: link to github compare, e.g.:

build 6331

builds/3.0.6330...builds/3.0.6331

Proposed technical implementation details (optional)

To get news from changelog we need to compare old size vs new size, and output only diff.

@alabuzhev
Copy link
Contributor

It could be improved indeed.
We probably could steal a few ideas from other projects, e.g. include merged PRs and contributors like in michaellukashov/Far-NetBox.

But I hate this yaml nonsense with all my heart, so please don't count on me, it might take forever.
PRs are welcome.

@johnd0e
Copy link
Contributor Author

johnd0e commented May 17, 2024

e.g. include merged PRs

That could be useful if only this project would PR-driven, which is not currently in case.
So better stick to commits msgs reciting.

@johnd0e
Copy link
Contributor Author

johnd0e commented Nov 1, 2024

softprops/action-gh-release

Although it is powerful enough, this action can provide a changelog record without special efforts.
For example: Full Changelog: ci/v3.0.6387.4012...ci/v3.0.6388.4014

Sample yaml: https://github.com/OwO-Network/DeepLX/blob/d98f71d1c54e5c1483884c62e87441269a1b8318/.github/workflows/release.yaml#L22-L28

@johnd0e
Copy link
Contributor Author

johnd0e commented Nov 1, 2024

But if we need just this link to compare tags, it is more logical to make it directly.

git for-each-ref --sort=-creatordate --count=5 --format %(refname:short) refs/tags
Output
ci/v3.0.6388.4014
builds/3.0.6388
builds/3.0.6387
ci/v3.0.6387.4012
builds/3.0.6386

We can grab only ci-tags:

git for-each-ref --sort=-creatordate --count=5 --format %(refname:short) refs/tags | grep.exe ci | head -n 2

And output all the commits in between:

git log --pretty=format:"%h - %an: %s" ci/v3.0.6387.4012..ci/v3.0.6388.4014
Output
4d65ed020 - Shmuel Zeigerman: LuaFAR: fix actl.GetFarmanagerVersion(true) and rename to actl.GetFarManagerVersion
63ac6f69c - Alex Alabuzhev: Continue 6385.5

So the complete shell script is:

latest_cis=$(git for-each-ref --sort=-creatordate --format '%(refname:short)' refs/tags | grep '^ci/' | head -n 2)
tag1=$(echo "$latest_cis" | sed -n '1p')
tag2=$(echo "$latest_cis" | sed -n '2p')
git log "$tag2..$tag1"

We can vary the format of output changing the last line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants