Last active
January 17, 2021 07:14
-
-
Save deltam/ece26cc805a073068c0e95b699a21614 to your computer and use it in GitHub Desktop.
コミットIDからマージされたプルリクを開くやつ
This file contains hidden or 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
#!/bin/sh | |
# 参考 Commit Hash から、該当 Pull Request を見つける方法 - Qiita https://qiita.com/awakia/items/f14dc6310e469964a8f7 | |
GITHUB_URL=`git config --get remote.origin.url | sed -E 's#^.+(github.com):(.+)\.git$#https://\1/\2#'` | |
git log --merges --oneline --reverse --ancestry-path $1...master | grep -m 1 "Merge pull request" | cut -f5 -d ' ' | sed "s@#@${GITHUB_URL}/pull/@" |xargs open |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment