| 1280 | } |
| 1281 | |
| 1282 | func generateCompareURL(ctx CreateContext, state shared.IssueMetadataState, projectsV1Support gh.ProjectsV1Support) (string, error) { |
| 1283 | u := ghrepo.GenerateRepoURL( |
| 1284 | ctx.PRRefs.BaseRepo(), |
| 1285 | "compare/%s...%s?expand=1", |
| 1286 | url.PathEscape(ctx.PRRefs.BaseRef()), url.PathEscape(ctx.PRRefs.QualifiedHeadRef())) |
| 1287 | url, err := shared.WithPrAndIssueQueryParams(ctx.Client, ctx.PRRefs.BaseRepo(), u, state, projectsV1Support) |
| 1288 | if err != nil { |
| 1289 | return "", err |
| 1290 | } |
| 1291 | return url, nil |
| 1292 | } |
| 1293 | |
| 1294 | // Humanize returns a copy of the string s that replaces all instance of '-' and '_' with spaces. |
| 1295 | func humanize(s string) string { |