diff --git a/ci-find-smithy-go.sh b/ci-find-smithy-go.sh index d6e16712f95..c1e2346cf64 100755 --- a/ci-find-smithy-go.sh +++ b/ci-find-smithy-go.sh @@ -18,6 +18,12 @@ if [ -z "$RUNNER_TMPDIR" ]; then exit 1 fi +if [ -n "$GIT_PAT" ]; then + repository=https://$GIT_PAT@github.com/$SMITHY_GO_REPOSITORY +else + repository=https://github.com/$SMITHY_GO_REPOSITORY +fi + branch=$(git branch --show-current) if [ "$branch" == main ]; then echo aws-sdk-go-v2 is on branch main @@ -31,12 +37,6 @@ if [ -z "$branch" ]; then branch=$GITHUB_HEAD_REF fi -if [ -n "$GIT_PAT" ]; then - repository=https://$GIT_PAT@github.com/$SMITHY_GO_REPOSITORY -else - repository=https://github.com/$SMITHY_GO_REPOSITORY -fi - echo on branch \"$branch\" while [ -n "$branch" ] && [[ "$branch" == *-* ]]; do echo looking for "$branch"...