Created
September 3, 2018 04:59
-
-
Save reyoung/b5a603038a0063d85ac92ff2672f0283 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
BEGIN_PR_ID=11635 | |
END_PR_ID=13159 | |
GH_API_TOKEN=REPLACE_TO_YOUR_API_TOKEN | |
for ((i=$BEGIN_PR_ID; i<END_PR_ID;++i)) | |
do | |
curl -H "Authorization: token $GH_API_TOKEN" https://api.github.com/repos/PaddlePaddle/Paddle/pulls/$i > PR.json | |
merge_sha1=$(cat PR.json | jq -re .merge_commit_sha) | |
if [[ $? -eq 1 ]] | |
then | |
continue | |
fi | |
merge_time=$(cat PR.json | jq .merged_at | date -u +%s) | |
echo ${merge_time}, ${merge_sha1} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment