File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -196,6 +196,23 @@ elif [[ "${#pathargs[@]}" -ge '2' && ${pathargs[${#pathargs[@]} - 2]} == '_git'
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 "
You can’t perform that action at this time.
0 commit comments