Last active
August 4, 2016 19:43
-
-
Save andrewchilds/4217def8e8ad0128240e61605d6bff77 to your computer and use it in GitHub Desktop.
Extracting Clubhouse story IDs from a set of git commits
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
old_sha="87d4fed" | |
new_sha="2d5b22d" | |
git log $old_sha..$new_sha --oneline | |
# 2d5b22d Merge pull request #6 from company/me/ch345/my-story-name | |
# e730351 Fix bug | |
# c410ba0 Fix other bug [ch1004] | |
function clubhouse_find_stories_in_commit_range { | |
old_sha="$1" | |
new_sha="$2" | |
git log $old_sha..$new_sha --oneline | grep -io 'ch[0-9]*' | sed 's/[^0-9]*//g' | uniq | |
} | |
clubhouse_find_stories_in_commit_range $old_sha $new_sha | |
# 345 | |
# 1004 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment