Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

changelog: add go-changelog templates and tooling #101

Merged
merged 23 commits into from
Apr 27, 2022
Merged

Conversation

mikemorris
Copy link
Contributor

@mikemorris mikemorris commented Feb 15, 2022

Changes proposed in this PR:

  • Adds template files used by go-changelog and make tasks to generate a changelog section for a specific release from changelog entry files associated with pull requests.
  • Adds a CI workflow to check for changelog entries in PRs.

TODO:

How I've tested this PR:

make changelog

Running

LAST_RELEASE_GIT_TAG=v0.1.0 make changelog

should generate

IMPROVEMENTS:

* changelog: add go-changelog templates and tooling [[GH-101](https://github.com/hashicorp/consul-api-gateway/issues/101)]

make changelog-check

cat ./changelog/101.txt | make changelog-check

should validate the changelog entry for .changelog/101.txt successfully with exit code 0

echo "foo" | make changelog-check

should check that the string foo is not a valid changelog entry, with exit code 1

echo "\`\`\`release-note:bar\`\`\`" | make changelog-check

should check that the string bar is not a valid changelog entry type and list the valid configured changelog entry types, with exit code 1

make changelog-entry

make changelog-entry

should detect that the current branch has an open pull request and start an interactive workflow to write a valid changelog entry at ./changelog/101.txt

How I expect reviewers to test this PR:

Checklist:

  • Tests added (CI validation)
  • CHANGELOG entry added

    HashiCorp engineers only, community PRs should not add a changelog entry.
    Entries should use present tense (e.g. Add support for...)

Refs prior implementations in:

@hashicorp-cla
Copy link

hashicorp-cla commented Mar 12, 2022

CLA assistant check
All committers have signed the CLA.

@mikemorris mikemorris marked this pull request as ready for review April 8, 2022 20:21
@mikemorris mikemorris requested review from a team, Jeff-Apple and sophie-gairo April 8, 2022 20:21
@mikemorris
Copy link
Contributor Author

mikemorris commented Apr 8, 2022

The current workflow for changelog generation only happens at release time - for future work we may want to consider implementing hashicorp/go-changelog#5 to allow the CHANGELOG.md file to be updated automatically as PRs are merged so users can see changes which have been merged and will be included in the next release.

Copy link
Member

@nathancoleman nathancoleman left a comment

Choose a reason for hiding this comment

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

Nice work! Excited to see this

changelog-check.sh Outdated Show resolved Hide resolved
.github/pull_request_template.md Show resolved Hide resolved
@mikemorris mikemorris merged commit 313d7ad into main Apr 27, 2022
@mikemorris mikemorris deleted the go-changelog branch April 27, 2022 14:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants