From b62524cf8bd36995e0c36d69d9a7ad008945e645 Mon Sep 17 00:00:00 2001 From: LongyuZhang Date: Fri, 27 Sep 2024 12:44:06 -0400 Subject: [PATCH] Enable TriagerX recommendation on corresponding issues Enable TriagerX recommendation comment on corresponding issues Closes: https://github.com/eclipse-openj9/openj9/issues/20119 Signed-off-by: LongyuZhang --- .github/recommendation.js | 5 ++--- .github/workflows/TriageClosedIssue.yml | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/recommendation.js b/.github/recommendation.js index 00d4b7e364a..db7e7cb8c19 100644 --- a/.github/recommendation.js +++ b/.github/recommendation.js @@ -3,7 +3,6 @@ const core = require('@actions/core'); const github = require('@actions/github'); async function run() { - const sandboxIssueNumber = 19673; const sandboxOwner = 'eclipse-openj9'; const sandboxRepo = 'openj9'; @@ -33,7 +32,7 @@ async function run() { resultString += `Recommended Assignees: ${predictedAssignees.join(', ')}\n`; await octokit.rest.issues.createComment({ - issue_number: sandboxIssueNumber, + issue_number: process.env.ISSUE_NUMBER, owner: sandboxOwner, repo: sandboxRepo, body: resultString @@ -41,7 +40,7 @@ async function run() { } catch (error) { core.setFailed(`Action failed with error: ${error}`); await octokit.rest.issues.createComment({ - issue_number: sandboxIssueNumber, + issue_number: process.env.ISSUE_NUMBER, owner: sandboxOwner, repo: sandboxRepo, body: `The TriagerX model is currently not responding to the issue ${process.env.ISSUE_NUMBER}. Please try again later.` diff --git a/.github/workflows/TriageClosedIssue.yml b/.github/workflows/TriageClosedIssue.yml index ea3f01b9712..302c7494ffc 100644 --- a/.github/workflows/TriageClosedIssue.yml +++ b/.github/workflows/TriageClosedIssue.yml @@ -24,7 +24,6 @@ jobs: const commentsUrl = issueData.comments_url; const { data: commentsData } = await github.request(commentsUrl); - const sandboxIssueNumber = 19673; const sandboxOwner = context.repo.owner; const sandboxRepo = context.repo.repo; @@ -74,7 +73,7 @@ jobs: } await github.issues.createComment({ - issue_number: sandboxIssueNumber, + issue_number: context.issue.number, owner: sandboxOwner, repo: sandboxRepo, body: resultString,