Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Stop Probot from responding #82

Closed
AlFalahTaieb opened this issue Sep 18, 2019 · 1 comment
Closed

How to Stop Probot from responding #82

AlFalahTaieb opened this issue Sep 18, 2019 · 1 comment

Comments

@AlFalahTaieb
Copy link

So I just managed to make it work, the problem is as soon as i comment on an issue the bot enter in an infinite loop and respond every second.

How to avoid this ?

module.exports = app => {
  // Your code here
  app.log('Yay, the app was loaded!')
const regexMatch = matchRobTalks(context)
  app.on('issue_comment', async context => {
    const issueComment = context.issue({ body: "Hey, I'm :robot: created by taie" });    
    
    return context.github.issues.createComment(issueComment)
   
  })

}

@AlFalahTaieb AlFalahTaieb changed the title Stop Probot How to Stop Probot from responding Sep 18, 2019
@AlFalahTaieb
Copy link
Author

Found it ..

God i'm dumb

just added :

if (context.payload.sender.type != "User") {
return

in the app.on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant