-
Notifications
You must be signed in to change notification settings - Fork 55
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
Update Changelog script to include changes in lib dependencies. #420
Conversation
def getCommitsBetween( tagA, tagB = "HEAD", dir=None): | ||
if dir: | ||
original_dir = os.getcwd() | ||
os.chdir(dir) |
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.
To be able to easily run this function in other directories I've added the dir
parameter to temporarily change the current working directory.
ed81539
to
d0d6d02
Compare
d0d6d02
to
94b4a54
Compare
if dir: | ||
original_dir = os.getcwd() | ||
os.chdir(dir) | ||
commits = os.popen(f'git log --format="%s (by %an)" --no-merges --reverse {tagA}..{tagB}').read().strip().splitlines() |
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.
There was no way to change shortlog
to not group commits, so I've replaced it with git log --no-merges
. Reverse was needed because that's the order used by shortlog
, which I guess makes sense with older commits first, as we read top to bottom.
The format includes the git author name at the end of the commit title, in case we wanted to still provide attribution.
%s
-> commit title
%an
-> commit author name
@JohnVidler if possible it'd be great to merge this before releasing the next tag, to be able to include this info in the changelog. |
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.
Discussed in a call and good to merge 👍
It also changes the log format, as
git shortlog
groups the commits by author (or other options, but they always have to grouped) and that can get a bit verbose when also including commits from the other libraries.Also, an advantage of not grouping by author is that the commits are listed historically.
As part of this PR I've also updated the changelog from v0.2.63, as this is the last tag used for MakeCode live, so it'll be useful to have this info when presenting MS the changelog for deployment.