Skip to content

Instantly share code, notes, and snippets.

@karlding
Created May 21, 2019 07:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karlding/28257b335fe948f2fe77d3a1dfade382 to your computer and use it in GitHub Desktop.
Save karlding/28257b335fe948f2fe77d3a1dfade382 to your computer and use it in GitHub Desktop.
get a list of all files modified by the given PRs
#!/bin/bash
ACTIVE_PRS=(290 539 554 567)
DIFF_FILE="output.txt"
echo "" >| "${DIFF_FILE}"
for PR in "${ACTIVE_PRS[@]}"; do
git fetch origin pull/"${PR}"/head:pr-"${PR}"
git diff --name-only develop...pr-"${PR}" | tee -a "${DIFF_FILE}"
done
sort "${DIFF_FILE}" -o "${DIFF_FILE}" -u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment