Skip to content

Add Bitbucket provider support#50

Merged
RomainCscn merged 1 commit intolinear:mainfrom
justindell:add-bitbucket-provider-support
May 6, 2026
Merged

Add Bitbucket provider support#50
RomainCscn merged 1 commit intolinear:mainfrom
justindell:add-bitbucket-provider-support

Conversation

@justindell
Copy link
Copy Markdown
Contributor

Summary

  • Add Bitbucket as a recognized provider in hostToProvider(), supporting both bitbucket.org and self-hosted Bitbucket instances
  • Add tests for Bitbucket HTTPS and SSH URL parsing in parseRepoUrl

Problem

Running linear-release sync from a Bitbucket-hosted repository fails with:

Error: Variable "$input" got invalid value null at "input.repository.provider";
Expected non-nullable type "String!" not to be null.

The hostToProvider() function only recognized GitHub and GitLab hosts, returning null for Bitbucket. Since parseRepoUrl() still successfully parses the owner/name/url from the remote, the resulting RepoInfo object is non-null — but with provider: null. This gets passed into the GraphQL mutation where repository.provider is a required String! field.

Fix

Added a Bitbucket check to hostToProvider() in src/git.ts, matching the existing pattern for GitHub and GitLab. Bitbucket merge commit message parsing was already supported in extractBranchNameFromMergeMessage() — this closes the gap in provider detection.

@RomainCscn RomainCscn merged commit cd1e730 into linear:main May 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants