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

Add changelog generation #72

Merged
merged 12 commits into from
Apr 18, 2023
Merged

Add changelog generation #72

merged 12 commits into from
Apr 18, 2023

Conversation

markusweigelt
Copy link
Collaborator

@markusweigelt markusweigelt commented Apr 5, 2023

  • only the PR`s analogous to the changelog generation of GitHub are used
  • Identifier in merges are used to retrieve the PR information from GitHub
  • currently the following adjustments are still necessary manually:
    • change of the release version number
    • change of the from and end commit references
  • manual execution if update_changelog.sh using personal token as parameter

@markusweigelt markusweigelt requested a review from bertsky April 5, 2023 14:17
Copy link
Member

@bertsky bertsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

  • only the PR`s analogous to the changelog generation of GitHub are used

Yes, I guess since we don't do releases or semantic versioning anywhere, this is as good as it gets. PR titles are short but very descriptive – and the list of changes is already long (at least for this release)...

  • Identifier in merges are used to retrieve the PR information from GitHub

There's probably a way to get to that directly via Github API, but let's stick with your method as long as it works.

  • currently the following adjustments are still necessary manually:

    • change of the release version number
    • change of the from and end commit references

I would expect your script to be embedded in a release procedure where a new tag is available on the HEAD, and so you would just need to go back to the previous tag to get a commit range. Or, for manual override, optional parameters.

  • manual execution if update_changelog.sh using personal token as parameter

And from CI this could be passed on from Github Actions perhaps?


#echo "curl -L -H Accept: application/vnd.github+json -H Authorization: Bearer $token https://api.github.com/repos/$repo/pulls/$pull_request_id"
curl -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer $token" https://api.github.com/repos/$repo/pulls/$pull_request_id | \
jq -r '[.title, .user.login] | @sh' | xargs printf "* %s by @%s in $url/pull/$pull_request_id\n"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice pattern!

update_changelog.sh Outdated Show resolved Hide resolved
update_changelog.sh Outdated Show resolved Hide resolved
markusweigelt and others added 2 commits April 12, 2023 10:33
Co-authored-by: Robert Sachunsky <38561704+bertsky@users.noreply.github.com>
…ecific changes, modify update changelog script to autogenerate CHANGELOG.md without manual intervention
@markusweigelt markusweigelt requested a review from bertsky April 12, 2023 14:46
@markusweigelt
Copy link
Collaborator Author

markusweigelt commented Apr 12, 2023

  • Update update_changelog.sh to retrieve commit references without manual intervention
  • Improve script to add release changes at the top of existing CHANGELOG.md
  • Move update_changelog.sh to .github/scripts
  • Add workflow to provide a PR with changes for release using the update_changelog.sh script

Copy link
Member

@bertsky bertsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic!

@markusweigelt markusweigelt merged commit 2daf391 into main Apr 18, 2023
@markusweigelt markusweigelt deleted the add-changelog branch April 18, 2023 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants