Skip to content

Commit

Permalink
tweaking
Browse files Browse the repository at this point in the history
  • Loading branch information
Raymond Gasper committed May 26, 2020
1 parent a333bc4 commit f4c8f74
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions run_black_on_git_diff_adds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ echo "looking for diff at ${github_pr_url}"
curl --request GET --url ${github_pr_url} --header "authorization: Bearer ${GITHUB_TOKEN}" --header "Accept: application/vnd.github.v3.diff" > github_diff.txt
diff_length=`wc -l github_diff.txt`
echo "approximate diff size: ${diff_length}"
edited_files=`cat github_diff.txt | grep -E -- "\+\+\+ |\-\-\- " | awk '{print $2}' | grep -Po -- "(?<=[ab]/).+"`
echo "diff files: \n ${edited_files}"
python_files=`echo ${edited_files} | grep *.py`
python_files=`cat github_diff.txt | grep -E -- "\+\+\+ |\-\-\- " | awk '{print $2}' | grep -Po -- "(?<=[ab]/).+(.py$)"`
echo "python files edited in this PR: ${python_files}"

if [[ -z "${LINE_LENGTH}" ]]; then
Expand Down

0 comments on commit f4c8f74

Please sign in to comment.