-
-
Save 4383/511359cc2080e06295944c5f40bd1033 to your computer and use it in GitHub Desktop.
Identify potential changes to analyze between October 1 2020 and October 20 2020
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
git fetch origin | |
# Retrieve all merged changes between October 1st and October 20 | |
for commit in $(git log --since "OCT 1 2020" --until "OCT 20 2020" --pretty=format:"%H" --no-merges origin/master) | |
do | |
# Retrieve modified files | |
modified_files=$(git log -m -1 --max-parents=1 --pretty="format:" --name-only ${commit}) | |
identified_files="" | |
for file in ${modified_files} | |
do | |
# Ignore releases and documentations changes, in other words only extract code changes | |
if [[ "${file}" != deliverables/*.yaml ]] && \ | |
[[ "${file}" != doc/*.rst ]] && \ | |
[[ "${file}" != data/*.yaml ]]; then | |
identified_files="${identified_files}\t- ${file}" | |
fi | |
if [ ! -z "${identified_files}" ]; then | |
echo -e "Commit to analyze:" | |
echo "https://review.opendev.org/#/q/${commit}" | |
echo "Files to analyze:" | |
echo -e "${identified_files}" | |
echo "-------------------------------" | |
fi | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment