chore: Update changelog script to allow for .txt output#7396
Merged
madalynrose merged 3 commits intomicrosoft:mainfrom Jul 23, 2024
Merged
chore: Update changelog script to allow for .txt output#7396madalynrose merged 3 commits intomicrosoft:mainfrom
madalynrose merged 3 commits intomicrosoft:mainfrom
Conversation
codeofdusk
approved these changes
Jul 23, 2024
|
|
||
| const gitLogs = await getGitLogs(params.from, params.to); | ||
|
|
||
| const outputContent = generateOutputContent(gitLogs, params.to); |
Contributor
There was a problem hiding this comment.
Maybe rename this method to generateCSVContent, assuming it doesn't break API elsewhere.
brocktaylor7
approved these changes
Jul 23, 2024
tools/get-change-log-for-release.js
Outdated
| params.kind === 'csv' | ||
| ? generateOutputContent(gitLogs, params.to) | ||
| : generateTextContent(gitLogs); | ||
| console.log(outputContent); |
Contributor
There was a problem hiding this comment.
Did we want to leave this console.log here? Totally fine if it makes sense during generation output, just wanted to make sure :)
Contributor
Author
There was a problem hiding this comment.
I find it useful to validate that it did what I wanted without having to open the file but could see it getting cumbersome if there are dozens of commits. I could go either way. I'll remove it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details
This PR enables the changelog script to output a .txt file with a list of commits to validate instead of a .csv.
This can be triggered by adding a flag onto the end of the script for the desired kind of file:
node ./tools/get-change-log-for-release.js --from web@PREVIOUS_RELEASE --to web@NEW_RELEASE --kind txtor
yarn run change-log --from web@PREVIOUS_RELEASE --to web@NEW_RELEASE -k txtExample Output:
This is the result for running
yarn run change-log -f web@2.43.0 -t web@2.44.0 -k txtThe release driver would just need to paste this into OneNote, remove any commits that are non-user-facing, and format like a list to add bullets and the indents are already there!
Motivation
Our changelog script generates a csv of the commits to main between two commits (usually the previous release and HEAD). During release validation, our team filters down that CSV in excel and then pastes the generated table into our validation template so we can check that those commits have successfully made it into the new release. To make our release validation process more accessible, we are moving away from using tables in our validation templates.
Context
The text version of the changelog automatically excludes
dependabotandchore(deps-dev)commits, as it is more cumbersome to filter the text list than the csv and these updates aren't included in validation anyhow.Pull request checklist
yarn fastpassyarn test)<rootDir>/test-results/unit/coveragefix:,chore:,feat(feature-name):,refactor:). SeeCONTRIBUTING.md.