| 1359 | } |
| 1360 | |
| 1361 | func generateCompareURL(ctx CreateContext, state shared.IssueMetadataState, projectsV1Support gh.ProjectsV1Support) (string, error) { |
| 1362 | u := ghrepo.GenerateRepoURL( |
| 1363 | ctx.PRRefs.BaseRepo(), |
| 1364 | "compare/%s...%s?expand=1", |
| 1365 | url.PathEscape(ctx.PRRefs.BaseRef()), url.PathEscape(ctx.PRRefs.QualifiedHeadRef())) |
| 1366 | url, err := shared.WithPrAndIssueQueryParams(ctx.Client, ctx.PRRefs.BaseRepo(), u, state, projectsV1Support) |
| 1367 | if err != nil { |
| 1368 | return "", err |
| 1369 | } |
| 1370 | return url, nil |
| 1371 | } |
| 1372 | |
| 1373 | // Humanize returns a copy of the string s that replaces all instance of '-' and '_' with spaces. |
| 1374 | func humanize(s string) string { |