(
key: IntegrationTaskKey,
params: { owner: string; repo: string }
)
| 6 | constructor(private runTask: GitHubRunTask) {} |
| 7 | |
| 8 | get( |
| 9 | key: IntegrationTaskKey, |
| 10 | params: { owner: string; repo: string } |
| 11 | ): GitHubReturnType<Octokit["rest"]["repos"]["get"]> { |
| 12 | return this.runTask( |
| 13 | key, |
| 14 | async (client, task) => { |
| 15 | const result = await client.rest.repos.get({ |
| 16 | owner: params.owner, |
| 17 | repo: params.repo, |
| 18 | headers: { |
| 19 | "x-trigger-attempt": String(task.attempts), |
| 20 | }, |
| 21 | }); |
| 22 | return result.data; |
| 23 | }, |
| 24 | { |
| 25 | name: "Get Repo", |
| 26 | params, |
| 27 | properties: [ |
| 28 | { |
| 29 | label: "Repo", |
| 30 | text: params.repo, |
| 31 | }, |
| 32 | ], |
| 33 | }, |
| 34 | onError |
| 35 | ); |
| 36 | } |
| 37 | |
| 38 | updateWebhook( |
| 39 | key: IntegrationTaskKey, |
no test coverage detected