Respond to a successful push with a URL to create a PR pointing to the default branch. This behavior is made to mimic other Git forges.
Signed-off-by: Samuel Shuert me@thecoded.prof
Respond to a successful push with a URL to create a PR pointing to the default branch. This behavior is made to mimic other Git forges.
Signed-off-by: Samuel Shuert me@thecoded.prof
·········l.Error("failed to trigger pipeline", "err", err, "line", line, "did", gitUserDid, "repo", gitRelativeDir)
·········+if (line.NewSha.String() != line.OldSha.String()) && line.OldSha.IsZero() && (line.Ref != fmt.Sprint("refs/heads/", defaultBranch)) {+resp.Messages = append(resp.Messages, fmt.Sprintf("Create a PR pointing to %s", defaultBranch))+resp.Messages = append(resp.Messages, fmt.Sprintf("\t%s/@%s/%s/compare/%s...%s", h.c.AppViewEndpoint, user, repoName, defaultBranch, strings.TrimPrefix(line.Ref, "refs/heads/")))l.Error("failed to trigger pipeline", "err", err, "line", line, "did", gitUserDid, "repo", gitRelativeDir)