-
Notifications
You must be signed in to change notification settings - Fork 42
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
generate changelog notes #71
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nothing blocking, this is looking really good
diff[dependency] = compareUrl(dependency, previous, current); | ||
} | ||
} | ||
for (let dependency in diff) { | ||
diff[dependency].changes = await getDiff(diff[dependency].api); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it make sense to do something like this to avoid the second loop?
diff[dependency] = compareUrl(dependency, previous, current); | |
} | |
} | |
for (let dependency in diff) { | |
diff[dependency].changes = await getDiff(diff[dependency].api); | |
} | |
const urls = compareUrl(dependency, previous, current); | |
diff[dependency] = { | |
...urls, | |
changes: await getDiff(urls.api) | |
} | |
} | |
} |
for (let dep in diff) { | ||
console.log(asciiDependencyDiff(dep, diff[dep].api)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could do
for (let dep in diff) { | |
console.log(asciiDependencyDiff(dep, diff[dep].api)); | |
} | |
for (const {api} of diff) { | |
console.log(asciiDependencyDiff(dep, api)); | |
} |
for (let dep in diff) { | ||
console.log(`<${diff[dep].html}>`); | ||
diff[dep].changes.forEach((change) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
for (let dep in diff) { | |
console.log(`<${diff[dep].html}>`); | |
diff[dep].changes.forEach((change) => { | |
for (const {html, changes} in diff) { | |
console.log(`<${html}>`); | |
changes.forEach((change) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
excellent suggestions, thank you! I was thinking some more about this and am wondering if it might be better to keep the release notes generation out of sdk-release. e.g. it it's npm installable then releasers will be able to open a terminal and:
npx js-sdk-release-notes | pbcopy
# or
npx js-sdk-release-notes 5.0.432 | pbcopy
# or
npx js-sdk-release-notes 5.0.430...5.0.432 | pbcopy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that would be really cool!
one change i would consider is building up a string in your function and then doing |
This PR adds an action step to generate the changelog notes for the latest JS SDK release:
For this demo, I added a step to the
main.yml
workflow to test it but moved it topublish.yml
in 42ca4b3