Created
June 11, 2020 12:45
-
-
Save vgebrev/98776ea0ee13a81127ae309d38d560b1 to your computer and use it in GitHub Desktop.
PowerShell script that lists all distinct JIRA task codes from commit messages since the last tag
This file contains 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
$jiraTaskPattern = 'XXX-\d{1,4}' | |
$latestTaggedCommit = git rev-list --tags --max-count=1 | |
$latestTag = git describe $latestTaggedCommit | |
git log --pretty=oneline "$latestTag..HEAD" | Select-String -Pattern $jiraTaskPattern | ForEach-Object { $_.Matches[0].Value } | Group-Object | ForEach-Object { $_.Name } | Sort-Object |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment