Skip to content

Commit

Permalink
fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
softmarshmallow committed Jul 7, 2023
1 parent 2f18e73 commit f98f10c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/codetest-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
id: comment
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
STATUS: ${{ steps.report.outputs.STATUS }}
working-directory: ci/report
run: |
npm ci
Expand Down
6 changes: 2 additions & 4 deletions ci/report/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@ const octokit = github.getOctokit(process.env.GITHUB_TOKEN);
const context = github.context;
const { sha } = context;

const STEP_REPORT = "report";
const STEP_UPLOAD = "upload";

const report_url = `https://code.grida.co/tests/reports/${sha}`;

let message;

if (context.payload.pull_request && context.eventName === "pull_request") {
const conclusion = steps[STEP_REPORT].conclusion;
const conclusion = process.env.STATUS || "unknown";

switch (conclusion) {
case "success":
Expand All @@ -21,6 +18,7 @@ if (context.payload.pull_request && context.eventName === "pull_request") {
message = "Your PR failed some tests :x:";
break;
case "skipped":
case "unknown":
break;
}

Expand Down

0 comments on commit f98f10c

Please sign in to comment.