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

Dump git-log to change-log #156

Draft
wants to merge 30 commits into
base: main
Choose a base branch
from
Draft

Dump git-log to change-log #156

wants to merge 30 commits into from

Conversation

HeikoTheissen
Copy link
Contributor

@HeikoTheissen HeikoTheissen commented Sep 22, 2021

CHANGELOG.md can be maintained via github workflow. Open question is which branch shall contain it:

  • The main branch, but this leads to an additional commit for every change
  • A separate branch without history, but this cannot be published to github.io

How can I include `npm run changelog` in `nodejs.yml` so that it is
executed only upon merge, not for every commit to the PR branch?
@HeikoTheissen
Copy link
Contributor Author

How can I include npm run changelog in nodejs.yml so that it is executed only upon merge, not for every commit to the PR branch?

@ralfhandl
Copy link
Contributor

How can I include npm run changelog in nodejs.yml so that it is executed only upon merge, not for every commit to the PR branch?

Try a conditional step with condition

if: github.event.pull_request.merged == true

@HeikoTheissen
Copy link
Contributor Author

OK to have CHANGELOG.md in a separate branch without history? Or does this pose problems on github.io? If we generate it via workflow in the same branch, that gives an extra commit each time.

@ralfhandl
Copy link
Contributor

OK to have CHANGELOG.md in a separate branch without history? Or does this pose problems on github.io?

Github pages are built from the main branch. Please try adding a CHANGELOG.md to main that then references a markdown file from a different branch to see whether that works.

package.json Outdated Show resolved Hide resolved
tools/changelog.sh Outdated Show resolved Hide resolved
tools/changelog.js Outdated Show resolved Hide resolved
test/changelog.test.js Outdated Show resolved Hide resolved
Copy link
Contributor

@ralfhandl ralfhandl left a comment

Choose a reason for hiding this comment

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

I kind of like this, the only caveat is that we have to be very careful when merging a pull request because we can't edit the commit message later.

test/gitlog.txt Outdated Show resolved Hide resolved
ralfhandl and others added 4 commits September 23, 2021 15:49
test/gitlog.txt Outdated Show resolved Hide resolved
@HeikoTheissen HeikoTheissen marked this pull request as draft September 24, 2021 11:14
CHANGELOG:
- This should appear.
- So should this.
CHANGELOG:
- commit ID after date
- reverse sorting
AMENDS: 3263262
CHANGELOG:
proper sorting
@HeikoTheissen
Copy link
Contributor Author

HeikoTheissen commented Sep 30, 2021

TC 2021-09-30: Investigate whether the commit texts can automatically be filled from the comment at the top of the pull request.

Not possible within the current process.

Check the format (presence of CHANGELOG:) as a prerequisite for merge.

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