|
@@ -64,7 +64,7 @@ jobs:
|
|
|
});
|
|
});
|
|
|
const ref = pull.head.sha;
|
|
const ref = pull.head.sha;
|
|
|
console.log("\n\nPR sha: " + ref)
|
|
console.log("\n\nPR sha: " + ref)
|
|
|
- const { data: checks } = await github.checks.listForRef({
|
|
|
|
|
|
|
+ const { data: checks } = await github.rest.checks.listForRef({
|
|
|
...context.repo,
|
|
...context.repo,
|
|
|
ref
|
|
ref
|
|
|
});
|
|
});
|
|
@@ -74,14 +74,14 @@ jobs:
|
|
|
console.log("\n\nPR Filtered CHECK: " + check)
|
|
console.log("\n\nPR Filtered CHECK: " + check)
|
|
|
console.log(check)
|
|
console.log(check)
|
|
|
if(check && check.length > 0){
|
|
if(check && check.length > 0){
|
|
|
- const { data: result } = await github.checks.update({
|
|
|
|
|
|
|
+ const { data: result } = await github.rest.checks.update({
|
|
|
...context.repo,
|
|
...context.repo,
|
|
|
check_run_id: check[0].id,
|
|
check_run_id: check[0].id,
|
|
|
status: 'in_progress',
|
|
status: 'in_progress',
|
|
|
});
|
|
});
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
- const { data: result } = await github.checks.create({
|
|
|
|
|
|
|
+ const { data: result } = await github.rest.checks.create({
|
|
|
...context.repo,
|
|
...context.repo,
|
|
|
name: job_name,
|
|
name: job_name,
|
|
|
head_sha: pull.head.sha,
|
|
head_sha: pull.head.sha,
|
|
@@ -212,13 +212,13 @@ jobs:
|
|
|
with:
|
|
with:
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
script: |
|
|
script: |
|
|
|
- const { data: pull } = await github.pulls.get({
|
|
|
|
|
|
|
+ const { data: pull } = await github.rest.pulls.get({
|
|
|
...context.repo,
|
|
...context.repo,
|
|
|
pull_number: process.env.number
|
|
pull_number: process.env.number
|
|
|
});
|
|
});
|
|
|
const ref = pull.head.sha;
|
|
const ref = pull.head.sha;
|
|
|
console.log("\n\nPR sha: " + ref)
|
|
console.log("\n\nPR sha: " + ref)
|
|
|
- const { data: checks } = await github.checks.listForRef({
|
|
|
|
|
|
|
+ const { data: checks } = await github.rest.checks.listForRef({
|
|
|
...context.repo,
|
|
...context.repo,
|
|
|
ref
|
|
ref
|
|
|
});
|
|
});
|
|
@@ -227,7 +227,7 @@ jobs:
|
|
|
const check = checks.check_runs.filter(c => c.name === job_name);
|
|
const check = checks.check_runs.filter(c => c.name === job_name);
|
|
|
console.log("\n\nPR Filtered CHECK: " + check)
|
|
console.log("\n\nPR Filtered CHECK: " + check)
|
|
|
console.log(check)
|
|
console.log(check)
|
|
|
- const { data: result } = await github.checks.update({
|
|
|
|
|
|
|
+ const { data: result } = await github.rest.checks.update({
|
|
|
...context.repo,
|
|
...context.repo,
|
|
|
check_run_id: check[0].id,
|
|
check_run_id: check[0].id,
|
|
|
status: 'completed',
|
|
status: 'completed',
|