Skip to content

Commit

Permalink
fix gitlab 16.0 legacy urls removed
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Roskrow <michael.roskrow@finbourne.com>
  • Loading branch information
Michael Roskrow committed May 18, 2023
1 parent 2745592 commit c872bf4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion assets/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,10 @@ add_git_metadata_url() {

local url=""
case $host in
*github* | *gitlab* | *gogs* )
*github* | *gogs* )
url="https://${host}/${repo_path}/commit/${commit}" ;;
*gitlab* )
url="https://${host}/${repo_path}/-/commit/${commit}" ;;
*bitbucket* )
url="https://${host}/${repo_path}/commits/${commit}";;
esac
Expand Down
2 changes: 1 addition & 1 deletion test/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ it_has_url_in_metadata_when_remote_is_likely_github_enterprise() {
it_has_url_in_metadata_when_remote_is_gitlab() {
local repo=$(init_repo)
local ref=$(make_commit $repo "")
local expectedUrl="https://gitlab.com/myorg/mygroup/myrepo/commit/$ref"
local expectedUrl="https://gitlab.com/myorg/mygroup/myrepo/-/commit/$ref"

# set a gitlab origin with nested groups
cd $repo
Expand Down

0 comments on commit c872bf4

Please sign in to comment.