From 82d97409a571605cb3197809c6e0307336b33b94 Mon Sep 17 00:00:00 2001 From: Ashish Keshan Date: Wed, 6 Dec 2023 13:39:45 -0800 Subject: [PATCH] rename integration -> autograding --- .github/workflows/integration.yml | 2 +- src/notify-classroom.js | 12 +----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 95dd37e..df4d9dc 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -7,7 +7,7 @@ permissions: actions: read contents: read jobs: - integration: + autograding: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/src/notify-classroom.js b/src/notify-classroom.js index 88498e0..c79a9c8 100644 --- a/src/notify-classroom.js +++ b/src/notify-classroom.js @@ -42,9 +42,6 @@ exports.NotifyClassroom = async function NotifyClassroom (runnerResults) { if (Number.isNaN(runId)) return // Fetch the workflow run - console.log(`Check owner: ${owner}`) - console.log(`Check repo: ${repo}`) - console.log(`Check runId: ${runId}`) const workflowRunResponse = await octokit.rest.actions.getWorkflowRun({ owner, repo, @@ -59,19 +56,12 @@ exports.NotifyClassroom = async function NotifyClassroom (runnerResults) { const checkRunsResponse = await octokit.rest.checks.listForSuite({ owner, repo, - check_name: 'integration', + check_name: 'autograding', check_suite_id: checkSuiteId, }) console.log(`Check checkRunsResponse: ${checkRunsResponse.data.total_count}`) - // List check runs for the repository - // const checkRunsResponse = await octokit.rest.checks.listForRef({ - // owner, - // repo, - // check_name: 'Autograding Tests' - // }) - // Filter to find the check run named "Autograding Tests" for the specific workflow run ID const checkRun = checkRunsResponse.data.total_count === 1 && checkRunsResponse.data.check_runs[0] console.log(`Check run: ${checkRun}`)