-
-
Save KyMidd/7d9f13860a6dd88e7d0b2c1b0424c8df to your computer and use it in GitHub Desktop.
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
if [[ $GH_REPO_NAME == *"database"* ]]; then | |
# CODEOWNERS should contain all 4 leads groups for this project | |
CODEOWNERS="@$GH_ORG/${SERVICES_LEADS_TEAM_SLUG} @$GH_ORG/${TEST_LEADS_TEAM_SLUG} @$GH_ORG/${UI_LEADS_TEAM_SLUG} @$GH_ORG/${DATA_LEADS_TEAM_SLUG}" | |
#echo "database" | |
# If endpoint, api, or apiendpoint ends repo name | |
elif [[ $GH_REPO_NAME == *"endpoint" ]] || [[ $GH_REPO_NAME == *"api" ]] || [[ $GH_REPO_NAME == *"apiendpoint" ]]; then | |
# CODEOWNERS should contain ServiceLeads, UILeads, TestLeads (but not DataLeads) | |
CODEOWNERS="@$GH_ORG/${SERVICES_LEADS_TEAM_SLUG} @$GH_ORG/${TEST_LEADS_TEAM_SLUG} @$GH_ORG/${UI_LEADS_TEAM_SLUG}" | |
#echo "api/endpoint" | |
# All others assumed that ServicesLeads are owners | |
else | |
# CODEOWNERS should contain ServicesLeads only | |
CODEOWNERS="@$GH_ORG/${SERVICES_LEADS_TEAM_SLUG}" | |
#echo "services owned" | |
fi | |
# Sed in CODEOWNERS var to file | |
sed -i '' "s#PF_CODEOWNER#$CODEOWNERS#g" CODEOWNERS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment