diff --git a/dist/index.js b/dist/index.js index d020a64..668b759 100644 --- a/dist/index.js +++ b/dist/index.js @@ -40234,16 +40234,27 @@ axios.interceptors.response.use( // core.setOutput("success", isPassed); // create a github check for this run - let octokit = getOctokit(personalAccessToken); - - let res = await octokit.rest.repos.createCommitStatus({ + let octokit = getOctokit(personalAccessToken) + + let res = await octokit.rest.checks.create({ owner: config.githubContext.owner, repo: config.githubContext.repo, - sha: config.githubContext.sha, - state: "success", - target_url: 'https://example.com/build/status', - description: "The build succeeded!", - context: "continuous-integration/testdriver", + name: "TestDriver.ai", + head_sha: config.githubContext.head_ref || config.githubContext.sha, + status: "completed", + conclusion: "success", + output: { + title: "TestDriver.ai Results", + summary: 'demo', + text: 'dmeo', + details_url: 'demo', + images: [ + { + alt: "Dashcam.io Recording", + image_url: 'https://i.sstatic.net/SYZFJ.png?s=64', + }, + ], + }, }); console.log(res); diff --git a/src/index.js b/src/index.js index 81ed150..aeeceb5 100644 --- a/src/index.js +++ b/src/index.js @@ -258,16 +258,27 @@ axios.interceptors.response.use( // core.setOutput("success", isPassed); // create a github check for this run - let octokit = getOctokit(personalAccessToken); - - let res = await octokit.rest.repos.createCommitStatus({ + let octokit = getOctokit(personalAccessToken) + + let res = await octokit.rest.checks.create({ owner: config.githubContext.owner, repo: config.githubContext.repo, - sha: config.githubContext.sha, - state: "success", - target_url: 'https://example.com/build/status', - description: "The build succeeded!", - context: "continuous-integration/testdriver", + name: "TestDriver.ai", + head_sha: config.githubContext.head_ref || config.githubContext.sha, + status: "completed", + conclusion: "success", + output: { + title: "TestDriver.ai Results", + summary: 'demo', + text: 'dmeo', + details_url: 'demo', + images: [ + { + alt: "Dashcam.io Recording", + image_url: 'https://i.sstatic.net/SYZFJ.png?s=64', + }, + ], + }, }); console.log(res);