(ctx context.Context, app string, pullRequestID int)
| 9 | ) |
| 10 | |
| 11 | func PullRequest(ctx context.Context, app string, pullRequestID int) (*scalingo.RepoLinkPullRequest, error) { |
| 12 | if app == "" { |
| 13 | return nil, errors.New(ctx, "no app defined") |
| 14 | } |
| 15 | |
| 16 | c, err := config.ScalingoClient(ctx) |
| 17 | if err != nil { |
| 18 | return nil, errors.Wrapf(ctx, err, "fail to get Scalingo client") |
| 19 | } |
| 20 | |
| 21 | pullRequest, err := c.SCMRepoLinkPullRequest(ctx, app, pullRequestID) |
| 22 | |
| 23 | if err != nil { |
| 24 | return nil, errors.Wrapf(ctx, err, "fail to fetch the pull request status") |
| 25 | } |
| 26 | |
| 27 | return pullRequest, nil |
| 28 | } |
no test coverage detected