Skip to content

Commit

Permalink
fix: fix repo health script (#451)
Browse files Browse the repository at this point in the history
  • Loading branch information
UsamaSadiq authored Dec 4, 2023
1 parent 3f1bc2a commit 94adefc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/repo-health-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ METADATA_FILE_DIST="docs/checks_metadata.yaml"
failed_repos=()

OUTPUT_FILE_POSTFIX="_repo_health.yaml"

# Git clone each repo in org and run checks on it
input="repositories.txt"
while IFS= read -r line; do
Expand Down Expand Up @@ -150,7 +149,7 @@ if [[ ${EDX_REPO_HEALTH_BRANCH} == 'master' && -z ${REPORT_DATE} ]]; then
for full_name in "${failed_repos[@]}"; do
OUTPUT_FILE_NAME="${full_name}${OUTPUT_FILE_POSTFIX}"
echo "reverting repo health data for ${OUTPUT_FILE_NAME}"
git checkout -- "${WORKSPACE}/individual_repo_data/${OUTPUT_FILE_NAME}"
git clean -f "individual_repo_data/${OUTPUT_FILE_NAME}"
done
fi

Expand All @@ -173,7 +172,7 @@ if [[ ${#failed_repos[@]} -ne 0 ]]; then
echo
echo
echo "TLDR Runbook(More detailed runbook: https://openedx.atlassian.net/wiki/spaces/AT/pages/3229057351/Repo+Health+Runbook ):"
echo " To resolve, search the console output for 'ERRORS' (without the quotes), or search for any"
echo " To resolve, search the console output for 'ERROR' (without the quotes), or search for any"
echo " of the failed repo names listed below."
echo "The following repositories failed while executing pytest repo-health scripts causing the job to fail:"
echo
Expand Down

0 comments on commit 94adefc

Please sign in to comment.