Skip to main content

Bitbucket for the Leanmote Agent

Connect your Bitbucket account so the agent can act on pull requests, as you, in the workspaces you choose.

With this connection the Leanmote Agent can act on your pull requests in Bitbucket: comment, close, merge, request reviewers and more. It is separate from the Bitbucket integration, which only reads repositories for Context; see Bitbucket integration.


​

The agent never acts on its own: each action is proposed in Leanmote and runs only after a person approves it.


​

What the agent can do


​

  • Comment on a pull request — pullrequest:write.

  • Close a pull request — pullrequest:write.

  • Merge a pull request — pullrequest:write.

  • Request a reviewer — pullrequest:write.

  • Mention someone — pullrequest:write.

  • Mark a pull request as draft — pullrequest:write.

  • Post a review comment on a stalled pull request — pullrequest:write.


​

Set the default reviewers of a repository needs repository:write, which the connection does not grant today, so the agent cannot do it on Bitbucket yet. Bitbucket has no pull request labels, so there is no labelling action.


​

Connect


​

  1. Open the Actions Hub and go to the Your agents tab.

  2. In Connections, click Bitbucket and then Authorize Bitbucket.

  3. Sign in to Bitbucket with your own account and accept the permissions listed below.

  4. Back in Leanmote, choose the Bitbucket workspaces where the agent may act, and click Grant access.


​

The connection reaches everything your Bitbucket account reaches: Bitbucket does not let it be narrowed when you authorize it. What you choose in step 4 is what Leanmote lets the agent act on.


​

Leanmote offers the workspaces your account belongs to.


​

Connection details


​

Detail

Value

Connection type

OAuth 2.0 (Bitbucket OAuth consumer).

Who connects in Bitbucket

Each person, with their own Bitbucket account.

Who can connect in Leanmote

Any member, for their own account.

Credential

Personal: the agent acts as you. One connection for each workspace you choose.

Write access

Yes: pull requests.


​

Scopes requested


​

In Bitbucket the scopes are set on Leanmote's OAuth consumer, not in the authorization request. The connection grants today:


​

  • account — identify your Bitbucket account and list your workspaces.

  • pullrequest:write — every action listed above.


​

Disconnect


​

  • In the Actions Hub, under Connections, click Manage. In Agent connections, click Disconnect next to Bitbucket and confirm. The agents stop using it.

  • To remove the access on Bitbucket's side as well, revoke the Leanmote Agent app from the authorized or connected apps of your Bitbucket account.


​

Related articles


​

  • Leanmote Agent connections

  • Bitbucket integration

Did this answer your question?