Skip to content

Commit

Permalink
Re-add label code
Browse files Browse the repository at this point in the history
  • Loading branch information
Elizabeth Rapp committed Mar 10, 2022
1 parent 3018723 commit ceaf67c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ async function process(dataMap, payload) {
console.log(
`Adding label: ${dataMap[item].label} to Issue #${payload.issue.number}`
);

await addLabelToIssue(
dataMap[item].org,
dataMap[item].repo,
payload.issue.number,
dataMap[item].label
);
console.log(`Getting ID for project #${dataMap[item].project}`);
const projectId = await getBetaProjectId(
dataMap[item].org,
Expand All @@ -58,8 +63,8 @@ async function process(dataMap, payload) {

async function addLabelToIssue(org, repo, issueNumber, label) {
return await octokit.rest.issues.addLabels({
org,
repo,
owner: org,
repo: repo,
issue_number: issueNumber,
labels: [label],
});
Expand Down

0 comments on commit ceaf67c

Please # to comment.