MCPcopy Create free account
hub / github.com/Scalingo/cli / PullRequest

Function PullRequest

integrationlink/pull_request.go:11–28  ·  view source on GitHub ↗
(ctx context.Context, app string, pullRequestID int)

Source from the content-addressed store, hash-verified

9)
10
11func 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}

Callers 1

Calls 1

ScalingoClientFunction · 0.92

Tested by

no test coverage detected