File tree Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -71,16 +71,13 @@ runs:
71
71
core.debug(`owner: ${owner}`);
72
72
core.debug(`repo: ${repo}`);
73
73
74
- const raw = await github.rest.repos.getContent({
74
+ const { content, encoding } = ( await github.rest.repos.getContent({
75
75
owner: owner,
76
76
repo: repo,
77
77
path: '${{ inputs.cla_path }}'
78
- });
78
+ })).data ;
79
79
const contributors = JSON.parse(
80
- Buffer.from(
81
- raw.data.content,
82
- raw.data.encoding
83
- ).toString('utf-8')
80
+ Buffer.from(content, encoding).toString('utf-8')
84
81
).contributors;
85
82
core.debug(`contributors: ${contributors}`);
86
83
Original file line number Diff line number Diff line change @@ -28,23 +28,22 @@ runs:
28
28
github-token : ${{ inputs.token }}
29
29
script : |
30
30
const { owner, repo, number } = context.issue;
31
- const raw = await github.rest.pulls.get({
31
+ const sha = ( await github.rest.pulls.get({
32
32
owner: owner,
33
33
repo: repo,
34
34
pull_number: number,
35
- });
36
- const sha = raw.data.head.sha;
35
+ })).data.head.sha;
37
36
core.debug(`owner: ${owner}`);
38
37
core.debug(`repo: ${repo}`);
39
38
core.debug(`sha: ${sha}`);
40
39
41
- const raw = await github.rest.repos.createCommitStatus({
40
+ const { context, state } = ( await github.rest.repos.createCommitStatus({
42
41
context: '${{ inputs.context }}',
43
42
description: '${{ inputs.description }}',
44
43
owner: owner,
45
44
repo: repo,
46
45
sha: sha,
47
46
state: '${{ inputs.state }}',
48
47
target_url: '${{ inputs.target_url }}'
49
- });
50
- core.info(`${raw.data. context} is ${raw.data. state}`);
48
+ })).data ;
49
+ core.info(`${context} is ${state}`);
You can’t perform that action at this time.
0 commit comments