Skip to content

Commit

Permalink
uses prLink instead of prNumber
Browse files Browse the repository at this point in the history
The following error occured in vercel logs when trying to run
`/dep-graph all` and this commit attempts to fix it

```
received issue comment event: 5313a0b0-ea84-11eb-9476-5e66546e3b95
commenting dependency graph for all changes
Error occured in "issue_comment handler: ReferenceError: prLink is not defined
    at subCommandHandler (/var/task/slash_commands.js:113:13)
    at Object.handle (/var/task/slash_commands.js:41:11)
    at handleSlashCommands (/var/task/slash_commands.js:14:26)
    at /var/task/issue_comment.js:18:11
    at /var/task/node_modules/@octokit/webhooks/event-handler/receive.js:45:14
    at async Promise.all (index 0)"
2021-07-22T00:32:42.034Z	f6a5fcaf-5ebb-4aff-b435-aebff96864c4	ERROR	ERROR:  Error: Webhook handler error
    at /var/task/node_modules/@octokit/webhooks/event-handler/receive.js:58:19 {
  errors: [
    ReferenceError: prLink is not defined
        at subCommandHandler (/var/task/slash_commands.js:113:13)
        at Object.handle (/var/task/slash_commands.js:41:11)
        at handleSlashCommands (/var/task/slash_commands.js:14:26)
        at /var/task/issue_comment.js:18:11
        at /var/task/node_modules/@octokit/webhooks/event-handler/receive.js:45:14
        at async Promise.all (index 0) {
      event: [Object]
    }
  ]
}
```
  • Loading branch information
scriptnull committed Jul 22, 2021
1 parent 63712b9 commit 087e86e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions slash_commands.js
Expand Up @@ -98,15 +98,15 @@ depGraph.handle = subCommandMatcher(depGraph.slashCommand, {
context: 'server'
});
},
'PRO-SERVER': async ({octokit, prNumber}) => {
'PRO-SERVER': async ({octokit, prLink}) => {
console.log('commenting dependency graph for pro server changes');
const commentDepGraph = monoRepoWorkflowDispatch(octokit, 'comment-dependency-graph');
await commentDepGraph({
prLink,
context: 'pro-server'
});
},
'ALL': async ({octokit, prNumber}) => {
'ALL': async ({octokit, prLink}) => {
console.log('commenting dependency graph for all changes');
const commentDepGraph = monoRepoWorkflowDispatch(octokit, 'comment-dependency-graph');
await commentDepGraph({
Expand Down

1 comment on commit 087e86e

@vercel
Copy link

@vercel vercel bot commented on 087e86e Jul 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.