Bot for GitHub Issues and Pull Requests Management

I want to propose the deployment of Haunt for openHAB repositories like openhab2-addons.

Haunt helps you keep your github issues under control. It does this by allowing you to run unit tests against github issues and pull-requests, then make contextual decisions about closing, sorting, tagging, and commenting.

Check out the one example posted here. Possible use cases:

  • Check issues for inactivity
    • post a reminder after four weeks
    • post another reminder after eight weeks, mention 1-2 maintainers
    • close the issue after 12 weeks inactivity
  • Assign labels based on issue/pull request description content
  • For openhab2-addons: automatic assignment of binding-specific labels
  • Check pull request to be made from feature branches
  • Check pull requests for a description of a minimum length (if size of commit bigger than x)

What do you think? @staff @maintainers


Nice, at least it would keep us from forgetting oldish pull requests.

Could the PR then checked for mergeability / being rebased against master and if necessary a reminder posted that the original author should kindly rebase his work?

I think an issue should not be closed due to inactivity.

I would say it depends - if it’s an enhancement, then I would say it should be. If the people doing the enhancement goes away, then it should be closed. If it’s a bug, then it probably should be kept open.

Sounds like a nice tool, haven’t heard of it before.
What might be interesting is automatic assignment of issues to a maintainer of a specific binding - possibly combined with adding a label for a binding.

Regarding running unit tests on PRs, I am not sure how much this overlaps with the Cloudbees-PR builds that we are doing or with what Travis offers.

@hakan oldish pull requests as well as issues. Mergability and the need for rebase is checked by GitHub. I believe you are talking about posting an appropriate notification for the developer!? I’m not sure if Haunt can check for this property but it’s probably possible. If we decide to use Haunt in the openHAB organization, we are free to implement these details step by step.

@Lolodomo @chris the above was just an example and closing is not the important action there. In the example, there would be two notifications before the issue is closed. After each notifications maintainers and the issue creator would be reminded to become active by either responding to open questions, by updating the status or by closing the ticket. If nobody reacts even after the second reminder, the ticket is obviously not worth being left open or we have a serious management problem :wink:

@Kai Haunt is the most promising I found and with it’s scripting capabilities seems to be the most flexible. Automatic assignment of binding specific labels and/or developers is also what I thought would be a great improvement. The bot could also help make the most out of other labels like “Waiting for Info” or “Waiting for Review”.
Regarding unit tests, I think you got the wrong idea. It’s supposed to check the ticket, NOT the code :wink: e.g. “If a pull request is bigger than 10 lines of change, check for more than one line of commit message.” or “If issue contains ‘Related to binding: sonos’ assign label ‘Sonos’ and maintainer ‘bob’.”

If you believe this idea is worth pursuing, I could look into this bot some time in the future. At first it doesn’t need any special permissions as he could start by just commenting. If any of you knows of better alternatives, possibly in the form of a web-service, please let me/us know.

:confounded: I have to take one step back. The last commit in the original Haunt repository was done in 2012. There are forks with commits in 2016 but I’d have to reevaluate the fitness of these. This doesn’t change the fact, that tools like this exist and might be an option for openhab.

Hm, that’s a shame. This also has the risk that it isn’t compatible with today’s Github anymore. I hope you find something that is still maintained and working…

@Kai I’ll still have to look into this to find the best option for the inactivity reminder and label assigning capabilities. There’s an unexpected absence of these kinds of solutions. I’m a bit confused.

I found one solution that may however be an instant improvement. Check out mention-bot by Facebook. It’s an available bot you can use right away without self-hosting. The bot will mention fitting developers in PRs based on the blame history of the code area the PR is doing changes to. Quite clever if you ask me :wink: You wanna give it a try?

@Kai I’ve tested the mention-bot at openhabian:
Besides the fact that with only three authors in total the algorithm of mention-bot can not really show it’s wonders here, he seems to work and do what he’s supposed to. Also remember that you can provide a configuration file for details. How about activating the hook at openhab2-addons ?


Thanks for testing this, sounds useful indeed. I have activated it on openhab2-addons now - let’s see what will happen :slight_smile:

1 Like

Pretty cool! Another nice find @ThomDietrich! It looks like people taking a holiday or a break from development can put mentionbot on their ignore list which is pretty simple!

1 Like

@martinvw I didn’t find the time to actually test Haunt yet. I still think it offers the right amount of flexibility for the above mentioned use cases.

Another fork was last updated in 2016 and supposedly working. However turns out that the fork is also not continued.

From here on forward we have two options. We can look for another, active project or we can test and utilize Haunt from the zopaUK fork. While at it we could continue improving Haunt.

However to be honest, I do not have the time to work on such a project right now. Would you be interested to look into this?

However to be honest, I do not have the time to work on such a project right now. Would you be interested to look into this?

Nope, one project is enough :smile:

Hi all,

I was looking for a similar tool for the Moment.js repository.

I also looked at Haunt but couldn’t get it to work (filed an issue here)

I then found GitIssueBot, which did most of what I wanted. I left some setup notes here.

Hope this helps you folks.

1 Like