Projects STRLCPY git-open Commits 557fd40b
🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    git-open
    skipped 195 lines
    196 196   # Keep project and repository name, append branch selector.
    197 197   providerBranchRef="?version=GB$branch"
    198 198   fi
     199 +elif [[ "$domain" =~ amazonaws\.com$ ]]; then
     200 + # AWS Code Commit
     201 + # Take region name from domain.
     202 + region=${domain#*.}
     203 + region=${region%%.*}
     204 + 
     205 + # Replace domain.
     206 + # Ex. git-codecommit.us-east-1.amazonaws.com -> us-east-1.console.aws.amazon.com
     207 + domain="${region}.console.aws.amazon.com"
     208 + 
     209 + # Replace URL path.
     210 + # Ex. v1/repos/example -> codecommit/home?region=us-east-1#/repository/example/browse/
     211 + urlpath="codecommit/home?region=${region}#/repository/${urlpath##*/}/browse/"
     212 + 
     213 + # Replace branch ref.
     214 + # Ex. /tree/foobar -> foobar/--/
     215 + providerBranchRef="${providerBranchRef##*/}/--/"
    199 216  fi
    200 217   
    201 218  openurl="$protocol://$domain/$urlpath"
    skipped 33 lines
Please wait...
Page is in error, reload to recover