We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 426cdae commit b0db5d5Copy full SHA for b0db5d5
tools/config.sh
@@ -110,7 +110,7 @@ function github_commit_exists(){ #github_commit_exists <repo-path> <branch-name>
110
function github_last_commit(){ # github_last_commit <repo-path> <branch-name>
111
local repo_path="$1"
112
local branch_name="$2"
113
- curl -s -k -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3.raw+json" "https://api.github.com/repos/$repo_path/commits/heads/$branch_name"
+ local commit=`curl -s -k -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3.raw+json" "https://api.github.com/repos/$repo_path/commits/heads/$branch_name" | jq -r '.sha'`
114
if [ ! "$commit" == "" ] && [ ! "$commit" == "null" ]; then
115
echo ${commit:0:8}
116
else
0 commit comments