File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -198,6 +198,11 @@ elif [[ "${#pathargs[@]}" -ge '2' && ${pathargs[${#pathargs[@]} - 2]} == '_git'
198
198
fi
199
199
elif [[ " $domain " =~ amazonaws\. com$ ]]; then
200
200
# AWS Code Commit
201
+ if (( is_issue )) ; then
202
+ echo " Issue feature does not supported on AWS Code Commit." 1>&2
203
+ exit 1
204
+ fi
205
+
201
206
# Take region name from domain.
202
207
region=${domain#* .}
203
208
region=${region%% .* }
Original file line number Diff line number Diff line change @@ -503,6 +503,39 @@ setup() {
503
503
assert_output " https://gitopen.visualstudio.com/Project/_workitems?id=36"
504
504
}
505
505
506
+ # #
507
+ # # AWS Code Commit
508
+ # #
509
+
510
+ @test " aws: https url" {
511
+ git remote set-url origin " https://git-codecommit.us-east-1.amazonaws.com/v1/repos/repo"
512
+ git checkout -B " master"
513
+ run ../git-open
514
+ assert_output " https://us-east-1.console.aws.amazon.com/codecommit/home?region=us-east-1#/repository/repo/browse/"
515
+ }
516
+
517
+ @test " aws: ssh url" {
518
+ git remote set-url origin " ssh://git-codecommit.us-east-1.amazonaws.com/v1/repos/repo"
519
+ git checkout -B " master"
520
+ run ../git-open
521
+ assert_output " https://us-east-1.console.aws.amazon.com/codecommit/home?region=us-east-1#/repository/repo/browse/"
522
+ }
523
+
524
+ @test " aws: branch " {
525
+ git remote set-url origin " https://git-codecommit.us-east-1.amazonaws.com/v1/repos/repo"
526
+ git checkout -B " mybranch"
527
+ run ../git-open
528
+ assert_output " https://us-east-1.console.aws.amazon.com/codecommit/home?region=us-east-1#/repository/repo/browse/mybranch/--/"
529
+ }
530
+
531
+ @test " aws: issue" {
532
+ git remote set-url origin " https://git-codecommit.us-east-1.amazonaws.com/v1/repos/repo"
533
+ git checkout -B " issues/#12"
534
+ run ../git-open " --issue"
535
+ [ " $status " -eq 1 ]
536
+ assert_output " Issue feature does not supported on AWS Code Commit."
537
+ }
538
+
506
539
507
540
teardown () {
508
541
cd ..
You can’t perform that action at this time.
0 commit comments