Question

Is it possible for me to have users of my website send bugs to my Bitbucket repo's Issue tracker without redirecting them to the Bitbucket page ?

I know this is possible with authentication but it seems weird that they can add an issue without authentication from the Bitbucket site but not from the API.

Was it helpful?

Solution 2

I ended up using Basic Authentication with general user.

The user doesn't have to be part of the team so it can be any user.

edit: its solved on my post see sending issue to bitbucket using oauth via bitbucket api

$account_name = 'companyy';    
$repo_slug = 'issuer';

$oauth_params = array(
    'oauth_consumer_key'      => 'key',
    'oauth_consumer_secret'   => 'secret'
);

$issue = new issues();
//this was the missing peace of the puzzle . one single line
$issue->getClient()->addListener( new OAuthListener($oauth_params) );

$issue->create($account_name, $repo_slug, array(
    'title'     => 'title 123',
    'content'   => 'coententt123 ',
    'kind'      => 'proposal',
    'priority'  => 'blocker'
    ));

OTHER TIPS

I created a PHP library to do this, you don't say what language your website is built on, but this plugin will do the basic work of creating a simple bug submission form, sending a POST to the BitBucket API using Basic Auth and will send a nice confirmation email to the user with the bug # (and optional URL to the bug). The user doesn't have to do any logging in... your code on the server does that.

It's here: http://syntaxseed.com/project/bitbucketphpbuglib/

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