MCPcopy Index your code
hub / github.com/bytebase/bytebase / buildBitbucketPullRequestURL

Function buildBitbucketPullRequestURL

action/command/vcs_user.go:231–240  ·  view source on GitHub ↗
(apiURL, workspace, repoSlug, pullRequestID string)

Source from the content-addressed store, hash-verified

229}
230
231func buildBitbucketPullRequestURL(apiURL, workspace, repoSlug, pullRequestID string) (string, error) {
232 parsedURL, err := url.Parse(apiURL)
233 if err != nil {
234 return "", err
235 }
236 parsedURL.Path = strings.TrimRight(parsedURL.Path, "/") + "/repositories/" + url.PathEscape(workspace) + "/" + url.PathEscape(repoSlug) + "/pullrequests/" + url.PathEscape(pullRequestID)
237 parsedURL.RawQuery = ""
238 parsedURL.Fragment = ""
239 return parsedURL.String(), nil
240}
241
242func firstNonEmpty(values ...string) string {
243 for _, value := range values {

Callers 2

getBitbucketVCSUserFunction · 0.85

Calls 1

StringMethod · 0.65