mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 11:52:10 +00:00
fix: use url.JoinPath
to join url parts
This avoids duplicated or more slashes. fixes #4759
This commit is contained in:
parent
49eeec269a
commit
46357e7856
2 changed files with 8 additions and 2 deletions
|
@ -7,6 +7,7 @@ package pull
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
|
@ -56,7 +57,11 @@ func getMergeMessage(ctx context.Context, baseGitRepo *git.Repository, pr *issue
|
|||
issueReference = "!"
|
||||
}
|
||||
|
||||
reviewedOn := fmt.Sprintf("Reviewed-on: %s/%s", setting.AppURL, pr.Issue.Link())
|
||||
issueURL, err := url.JoinPath(setting.AppURL, pr.Issue.Link())
|
||||
if err != nil {
|
||||
return "", "", err
|
||||
}
|
||||
reviewedOn := fmt.Sprintf("Reviewed-on: %s", issueURL)
|
||||
reviewedBy := pr.GetApprovers(ctx)
|
||||
|
||||
if mergeStyle != "" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue