File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ function github_commit_exists(){ #github_commit_exists <repo-path> <branch-name>
103
103
local repo_path=" $1 "
104
104
local branch_name=" $2 "
105
105
local commit_message=" $3 "
106
- local commits_found=` curl -s -k -H " Authorization: token $GITHUB_TOKEN " -H " Accept: application/vnd.github.v3.raw+json" " https://api.github.com/repos/$repo_path /commits/?sha=$branch_name " | jq -r ' .[]. commit.message' | grep " $commit_message " | wc -l`
106
+ local commits_found=` curl -s -k -H " Authorization: token $GITHUB_TOKEN " -H " Accept: application/vnd.github.v3.raw+json" " https://api.github.com/repos/$repo_path /commits/?sha=$branch_name " | jq -r ' .commit.message' | grep " $commit_message " | wc -l`
107
107
if [ ! " $commits_found " == " " ] && [ ! " $commits_found " == " null" ] && [ ! " $commits_found " == " 0" ]; then echo 1; else echo 0; fi
108
108
}
109
109
You can’t perform that action at this time.
0 commit comments