Skip to content

Commit

Permalink
create a check or a commit status?
Browse files Browse the repository at this point in the history
  • Loading branch information
Filip Maj committed May 10, 2024
1 parent 942da3e commit 2aeb306
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions src/health-score.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,15 @@ module.exports = {
// Report the thing
const ctx = github.context;
const octokit = github.getOctokit(gh);
const res = await octokit.rest.checks.create({
name: 'Health Score',
const res = await octokit.rest.repos.createCommitStatus({
owner: ctx.repo.owner,
repo: ctx.repo.repo,
head_sha: ctx.sha,
status: 'completed',
conclusion: 'neutral',
completed_at: new Date().toISOString(),
started_at: startTime.toISOString(),
output: {
title: 'Calculate Health Score',
summary: `${points} points`,
text: `Details:
sha: ctx.sha,
state: 'success',
context: 'Slack Health Score',
description: `Details:
Problematic comments:\n${score.comments.map((c) => ` ${c}`).join('\n')}`,
},
});
console.log(res);
return points;
Expand Down

0 comments on commit 2aeb306

Please sign in to comment.