Skip to content

Commit

Permalink
Merge pull request #1059 from EppO/fix-gitlab-mr-link
Browse files Browse the repository at this point in the history
GitLab's Merge Requests are using ! not #
  • Loading branch information
lkysow authored May 28, 2020
2 parents dc3ea77 + 1594fc2 commit a1682c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/events/vcs/gitlab_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func (g *GitlabClient) MergePull(pull models.PullRequest) error {

// MarkdownPullLink specifies the string used in a pull request comment to reference another pull request.
func (g *GitlabClient) MarkdownPullLink(pull models.PullRequest) (string, error) {
return fmt.Sprintf("#%d", pull.Num), nil
return fmt.Sprintf("!%d", pull.Num), nil
}

// GetVersion returns the version of the Gitlab server this client is using.
Expand Down
2 changes: 1 addition & 1 deletion server/events/vcs/gitlab_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func TestGitlabClient_MarkdownPullLink(t *testing.T) {
Ok(t, err)
pull := models.PullRequest{Num: 1}
s, _ := client.MarkdownPullLink(pull)
exp := "#1"
exp := "!1"
Equals(t, exp, s)
}

Expand Down

0 comments on commit a1682c6

Please sign in to comment.