-
-
Save KyMidd/4680f3358d962c641afc35d8cb64d8e7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # Fetch stash repo correct spelling, if different from github name, correct name on github | |
| # Fetch correct capitalization of name from stash | |
| REPO_CORRECT_CAPS=$(curl -s --user $STASH_USER:$STASH_PASS https://$STASH_URL/rest/api/1.0/projects/$STASH_PROJECT_KEY/repos/$GH_REPO | jq -r .name) | |
| echo "Correcting casing of repo names to match stash" | |
| CORRECT_REPO_CASING=$(curl -s \ | |
| -X PATCH \ | |
| -H "Accept: application/vnd.github+json" \ | |
| -H "Authorization: Bearer $GITHUB_TOKEN"\ | |
| -H "X-GitHub-Api-Version: 2022-11-28" \ | |
| https://api.github.com/repos/$GH_ORG/$GH_REPO \ | |
| -d "{\"name\":\"$REPO_CORRECT_CAPS\"}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment