diff --git a/run_black_on_git_diff_adds.sh b/run_black_on_git_diff_adds.sh index 2735444..59a7653 100755 --- a/run_black_on_git_diff_adds.sh +++ b/run_black_on_git_diff_adds.sh @@ -11,14 +11,14 @@ then exit 1 fi -set -x - github_pr_url=`jq '.pull_request.url' ${GITHUB_EVENT_PATH}` # github pr url sometimes has leading and trailing quotes github_pr_url=`sed -e 's/^"//' -e 's/"$//' <<<"$github_pr_url"` github_diff=`curl --request GET --url ${github_pr_url} --header "authorization: Bearer ${GITHUB_TOKEN}" --header "Accept: application/vnd.github.v3.diff"` list_of_edited_files=`echo -En ${github_diff} | grep -E -- "\+\+\+ " | awk '{print $2}' | grep -Po -- "(?<=[ab]/).+(.py$)"` +echo ${list_of_edited_files} + if [[ -z "${LINE_LENGTH}" ]]; then line_length=130 else