Integrations
Bitbucket integration setup
Connecting Bitbucket Cloud tells Lineman which repository and branch a piece of work happened on, so AI spend is attributed to real projects rather than sitting in one undifferentiated total. You then choose which repositories your team is expected to spend on, and anything outside that list is flagged.
Not generally available yet. Bitbucket sits behind the integrations feature flag, and connecting also needs Lineman to have registered a Bitbucket OAuth consumer. If that is not configured yet, the Connect button tells you so rather than sending you part-way into a sign-in that cannot finish.
Connect
- 1In your dashboard, open Integrations and choose Bitbucket.
- 2Sign in to Bitbucket and approve access. There is nothing to type in: unlike GitLab, Bitbucket Cloud is a single service, so there is no instance address to supply.
- 3Lineman then lists every workspace that sign-in belongs to and discovers the repositories in each one, along with their main branches. There is nothing to configure inside Bitbucket itself.
This covers Bitbucket Cloud, not Bitbucket Data Center. They share a name and very little else: Data Center is a separate product with a different API and a different sign-in mechanism, so it needs its own integration rather than a setting on this one. If you self-host Bitbucket, get in touch and we will tell you where it sits on the roadmap.
Workspaces
A Bitbucket repository belongs to a workspace rather than to a person, and most teams have more than one. Lineman follows that structure rather than flattening it.
- One connection covers every workspace the account you signed in with belongs to. You do not connect Bitbucket once per workspace, and the repository list on the integration page is grouped by workspace so you can tell them apart.
- Two workspaces can each contain a repository with the same name. Lineman keeps them separate by recording the full
workspace/repositorypath, so their costs never merge into one figure.
Authorising repositories
Discovering a repository is not the same as approving spend on it. The tick box against each repository is a decision you make, and Lineman never makes it for you.
- Tick a repository to say your team is expected to be working there. Its AI spend is then treated as ordinary and expected.
- Spend on anything unticked is flagged. That is the whole point of the list: AI usage appearing somewhere nobody was meant to be working stands out, instead of blending into the total.
Nothing is ticked to begin with, and a refresh never changes your ticks. Re-discovering repositories only adds newly-found ones and updates their details, so a repository you deliberately left unticked stays that way.
How work is matched
- Lineman reads your branch names. A branch such as
feat/LIN-412-retry-backoffcarries its ticket in the name, and that is what links a session's cost to a piece of work. Nothing needs adding to your commits. - Branch conventions are sampled, not exhaustive. Lineman looks at a bounded number of branches per repository to work out the pattern your team uses, and shows what it found on the integration page. A repository with no branches yet is marked as empty rather than guessed at.
What Lineman can do with your Bitbucket account
The access requested is read-only and narrow, and it is worth knowing about one Bitbucket-specific expiry rule before it surprises you.
- Lineman only reads. It lists your workspaces, repositories and branch names. It does not push code, does not open or comment on pull requests, and does not write to your repositories in any way.
- A Bitbucket sign-in that sits completely unused for three months has to be redone. That is Bitbucket's rule, not ours, and it applies to the sign-in rather than to your account. In normal use Lineman refreshes it automatically well inside that window; if you do get asked to reconnect, nothing has gone wrong and none of your settings are lost.
Bitbucket issues
Lineman does not write costs onto Bitbucket issues. That is deliberate rather than missing: Bitbucket's own issue tracker needs separate permissions, and in practice teams using Bitbucket track their work in Jira. If that is you, connect Jira as well and each ticket picks up the cost of the branches linked to it, using the same branch names this integration already reads.