-
Notifications
You must be signed in to change notification settings - Fork 101
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
Set onlyLastTag to true to prevent rate limiting issues w/ gh api #668
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.
It the same time, PR opened by this workflow will drop old
changes
ah, so the result is not additive and instead it will override the changelog? Hmm bummer, then we need to sprinkle it w/ some bash-fu and append logic, I guess. |
It is enough to change file name to generate and then insert step between those two jobs and append new to the old. create PR step will detect changes then. |
163560b
c3fc992
to
163560b
Compare
Signed-off-by: Jirka Kremser <[email protected]>
163560b
to
ba2dd3e
Compare
- name: Prepend the latest changes to CHANGELOG.md | ||
run: | | ||
mv CHANGELOG.md CHANGELOG-old.md | ||
cat CHANGELOG-latest.md | sed -e'$d' > CHANGELOG.md |
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.
remove the last line w/ the footer ("This Changelog was automatically generated by...") it would be in the middle of the file otherwise
run: | | ||
mv CHANGELOG.md CHANGELOG-old.md | ||
cat CHANGELOG-latest.md | sed -e'$d' > CHANGELOG.md | ||
cat CHANGELOG-old.md | sed -e'1,4d' >> CHANGELOG.md |
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.
remove the first couple of lines w/ the # Changelog\n\n
(again, it would be in the middle of the file otherwise)
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.
aren't these statements belong to comment right in the code?
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.
ah, sorry. I've missed your comment, fair point. Do you want me to open the pr just with the comments?
if the flag is true, it should translate to this logic: https://github.com/heinrichreimer/action-github-changelog-generator/blob/master/entrypoint.sh#L27
when evaluated that command locally it returned correctly the previous tag, so this should work 🤞
What may go wrong is the previous gh checkout action not fetching all the tags, but
fetch-depth: 0
(as it is) should fetch everything, I am mentioning it in here so that we are aware that it may break if someone change that number to say1
Signed-off-by: Jirka Kremser [email protected]