Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update 'Get-ChangeLog' to make it more accurate#6764

Merged
TravisEz13 merged 2 commits intoPowerShell:masterfrom
daxian-dbw:getchangelog
Apr 30, 2018
Merged

Update 'Get-ChangeLog' to make it more accurate#6764
TravisEz13 merged 2 commits intoPowerShell:masterfrom
daxian-dbw:getchangelog

Conversation

@daxian-dbw
Copy link
Member

@daxian-dbw daxian-dbw commented Apr 27, 2018

PR Summary

Update 'Get-ChangeLog' to make it more accurate

  • Use "||" as the delimiter instead of "|", so it works for commit message that has the pipeline operator in it.
  • Handle merges that create a merge node in history.
  • Do not treat powershell team members as external contributors.

PR Checklist


# Find the commits that were made after the merge commit.
$new_commits_after_merge_commit = git --no-pager log --no-merges "$commit_hash..HEAD" --format=$format | New-CommitNode
$new_commits_after_merge_commit = @(git --no-pager log --first-parent "$commit_hash..HEAD" --format=$format | New-CommitNode)
Copy link
Member

Choose a reason for hiding this comment

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

--first-parent find only the parent commit in a set of merge commits?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Maybe the comment should be updated

Copy link
Member Author

Choose a reason for hiding this comment

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

--first-parent basically means for any merge node, only follow the parent node on the master branch side. In case we merge a branch to master for a PR, only the merge node will show up in this way, the individual commits from that branch will be ignored. This is what we want because the merge commit itself already represents the PR.

I will update the comment to explain --first-parent

@TravisEz13 TravisEz13 merged commit 1f9e9d2 into PowerShell:master Apr 30, 2018
@daxian-dbw daxian-dbw deleted the getchangelog branch April 30, 2018 20:02
@SytzeAndr SytzeAndr mentioned this pull request Mar 6, 2019
11 tasks
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