Skip to content

Commit

Permalink
tweak verbosity
Browse files Browse the repository at this point in the history
  • Loading branch information
Raymond Gasper committed May 26, 2020
1 parent c6b976c commit b80dfd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions run_black_on_git_diff_adds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b80dfd6

Please sign in to comment.