(repo ghrepo.Interface, j *capi.Job)
| 195 | } |
| 196 | |
| 197 | func agentSessionWebURL(repo ghrepo.Interface, j *capi.Job) string { |
| 198 | if j.PullRequest == nil { |
| 199 | return "" |
| 200 | } |
| 201 | if j.SessionID == "" { |
| 202 | return fmt.Sprintf("https://github.com/%s/%s/pull/%d", url.PathEscape(repo.RepoOwner()), url.PathEscape(repo.RepoName()), j.PullRequest.Number) |
| 203 | } |
| 204 | return fmt.Sprintf("https://github.com/%s/%s/pull/%d/agent-sessions/%s", url.PathEscape(repo.RepoOwner()), url.PathEscape(repo.RepoName()), j.PullRequest.Number, url.PathEscape(j.SessionID)) |
| 205 | } |
| 206 | |
| 207 | // fetchJobSessionURL tries to return the agent session URL for a job. If the pull |
| 208 | // request is not yet available, ("", nil) is returned. |
no test coverage detected