Skip to content

Commit

Permalink
Update label-issues.js
Browse files Browse the repository at this point in the history
  • Loading branch information
gshivi authored Aug 20, 2023
1 parent 2bc9a00 commit 22a55ac
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions label-issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,23 @@ console.log(issue);
const categoryKey = gptResponse.toLowerCase();
const label = categoryKey.trim().replace(/\n/g, "");

octokit.issues.addLabels({
owner: process.env.GITHUB_REPOSITORY_OWNER,
repo: process.env.GITHUB_REPOSITORY_NAME,
issue_number: process.env.GITHUB_ISSUE_NUMBER,
labels: [label],
});
// octokit.issues.addLabels({
// owner: process.env.GITHUB_REPOSITORY_OWNER,
// repo: process.env.GITHUB_REPOSITORY_NAME,
// issue_number: process.env.GITHUB_ISSUE_NUMBER,
// labels: [label],
// });

const categoryRecord =
categoryMap.get(categoryKey ?? "unknown") ?? categoryMap.get("unknown");

// Assign the issue to the owner
octokit.issues.addAssignees({
owner: process.env.GITHUB_REPOSITORY_OWNER,
repo: process.env.GITHUB_REPOSITORY_NAME,
issue_number: process.env.GITHUB_ISSUE_NUMBER,
assignees: [categoryRecord.owner],
});
// octokit.issues.addAssignees({
// owner: process.env.GITHUB_REPOSITORY_OWNER,
// repo: process.env.GITHUB_REPOSITORY_NAME,
// issue_number: process.env.GITHUB_ISSUE_NUMBER,
// assignees: [categoryRecord.owner],
// });

// Code-flow for sending mail
const transporter = nodemailer.createTransport({
Expand Down Expand Up @@ -148,7 +148,7 @@ console.log(issue);
html: mailBody,
};

send();
//send();

async function send() {
const result = await transporter.sendMail(mailOptions);
Expand Down

0 comments on commit 22a55ac

Please sign in to comment.