Skip to content

Commit

Permalink
fixup filename search
Browse files Browse the repository at this point in the history
  • Loading branch information
Raymond Gasper committed May 26, 2020
1 parent f4c8f74 commit 759e08e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion run_black_on_git_diff_adds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +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}"
python_files=`cat github_diff.txt | grep -E -- "\+\+\+ |\-\-\- " | awk '{print $2}' | grep -Po -- "(?<=[ab]/).+(.py$)"`
python_files=`cat github_diff.txt | grep -E -- "\+\+\+ |\-\-\- " | awk '{print $2}' | grep -Po -- "(?<=[ab]/).+.py$ | sort | uniq"`
echo "python files edited in this PR: ${python_files}"

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

0 comments on commit 759e08e

Please sign in to comment.