CheckIssue refuses a pull request, since artifacts are only supported on issues. It makes one lookup, and callers run it before any artifact request.
(c client.ArtifactClient, repo ghrepo.Interface, number int)
| 229 | // CheckIssue refuses a pull request, since artifacts are only supported on |
| 230 | // issues. It makes one lookup, and callers run it before any artifact request. |
| 231 | func CheckIssue(c client.ArtifactClient, repo ghrepo.Interface, number int) error { |
| 232 | isPullRequest, err := c.IsPullRequest(repo, number) |
| 233 | if err != nil { |
| 234 | return err |
| 235 | } |
| 236 | if isPullRequest { |
| 237 | return pullRequestError(repo, number) |
| 238 | } |
| 239 | return nil |
| 240 | } |
| 241 | |
| 242 | // CheckUploadTarget is CheckIssue for a command that uploads files with |
| 243 | // --attach. It refuses a pull request the same way, and its one lookup also |