Skip to content

Commit

Permalink
fix issue comment created (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
robandpdx authored Oct 27, 2023
1 parent 8b2a22d commit 3415a9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ module.exports = (app) => {
await context.octokit.rest.issues.addLabels({
owner: context.payload.repository.owner.login,
repo: context.payload.repository.name,
issue_number: context.payload.pull_request.number,
issue_number: context.payload.issue.number,
labels: [emergencyLabel]
}).then(response => {
console.log(`${emergencyLabel} label applied to PR: ${context.payload.issue.pull_request.html_url}`);
Expand Down
3 changes: 2 additions & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ const payloadPrComment = {
url: "https://api.github.com/repos/robandpdx/superbigmono/issues/1",
pull_request: {
html_url: "https://github.com/robandpdx/superbigmono/pull/1"
}
},
number: 1,
},
comment: {
body: "We need an Emergency landing - this bug is critical!"
Expand Down

0 comments on commit 3415a9f

Please sign in to comment.