Question

I Love BitBucket.org

But is there a way to configure BitBucket to accept email and automatically put them into my 'New' Issue list in the issue tracker?

BitBucket sends out email notifications, but I want something the other way around. I don't want to have to go in and create an issue manually each time someone emails me about a problem. I want to forward those emails to Bitbucket so problems to go directly into the issue tracker via E-Mail.

And: Similarly, can you configure Bitbucket so that it listens for code check-ins and it auto-magically set issues to complete/fixed etc.?

Is there a way?

Was it helpful?

Solution

There is a API to create issue http://confluence.atlassian.com/display/BBDEV/Issues.

And a custom script which may or could be able to fetch email and post to issue tracker.

OTHER TIPS

I don't think there is a way to submit issues via email and now that Atlassian has bought Bitbucket I doubt that they will spend much time improving or enhancing the issue tracking inside Bitbucket as their main product (JIRA) is an very comprehensive issue tracker.

I would sooner expect some sort of integration of the two and a phase out of the current issue tracker. But then we will probably have to pay :-(

Re adding emails:

I want to forward those emails to Bitbucket so problems to go directly into the issue tracker via E-Mail.

Yes you can do this - you need to have an endpoint that receives emails, so for example sendgrid allows this (see Sendgrid webhooks docs), and will call a webhook on your server whenever an email comes in. You then need a bit of glue code on the server to post that issue to bitbucket via the bitbucket API (see the bitbucket api docs). So there are two parts to doing this, and you will need to write some code I think.

I'm currently working on a tool to do just this at Project Page. If anyone would like to try it out let me know. I'm also planning to let it interrogate the user to get a bit more detail about things like priority and urls associated with the problem.

Re the second part of your question:

Similarly, can you configure Bitbucket so that it listens for code check-ins and it auto-magically set issues to complete/fixed etc.?

Yes you can close issues automatically - just use the text fixes #n, so for example:

fixes #123 

in the commit message, where 123 is the number of the issue you want to close.

Yes, it's possible. Bitbucket has a robust REST API that lets you do it at least two ways:

Option 1: 3rd Party Service Use an online API automation service like

(Click those links for specific email/Bitbucket integration examples.)

You have a couple of options with this approach. With Zapier, for example, you can have a dedicated Issue-only Gmail address, and any email sent to it creates a new Issues ticket. OR you can automatically create Issues just by assigning a specific label to an email in an existing Gmail account.

Oddly, IFTTT doesn't currently offer Bitbucket integration.

Option 2: Write Your Own Server Script

If you have server access, you can configure your Message Transfer Agent to send certain emails to a PHP script that will create a Bitbucket Issue.

A great how-to article for this approach is Process Incoming Mail with PHP Script with Exim.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top