Skip to content

Commit

Permalink
debug debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Raymond Gasper committed May 26, 2020
1 parent 59d5dac commit 8347a0c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion run_black_on_git_diff_adds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ then
exit 1
fi

set -x

github_pr_url=`echo -En ${GITHUB_EVENT_PATH} | jq '.pull_request.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$)"`
Expand All @@ -21,5 +23,4 @@ else
line_length="${LINE_LENGTH}"
fi

set -x
black --line-length ${line_length} --check ${list_of_edited_files}

0 comments on commit 8347a0c

Please sign in to comment.