Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ All notable changes to `src-cli` are documented in this file.
### Added

- `src lsif upload` now supports the `-gitlab-token` flag. [#721](https://github.com/sourcegraph/src-cli/pull/721)
- Batch Changes can be applied to Bitbucket Cloud when `src` is used with Sourcegraph 3.40 or later. [#725](https://github.com/sourcegraph/src-cli/pull/725)

### Changed

Expand Down
2 changes: 2 additions & 0 deletions internal/batches/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type FeatureFlags struct {
AllowConditionalExec bool
AllowOptionalPublished bool
ServerSideBatchChanges bool
BitbucketCloud bool
}

func (ff *FeatureFlags) SetFromVersion(version string) error {
Expand All @@ -42,6 +43,7 @@ func (ff *FeatureFlags) SetFromVersion(version string) error {
{&ff.AllowConditionalExec, ">= 3.28.0-0", "2021-05-05"},
{&ff.AllowOptionalPublished, ">= 3.30.0-0", "2021-06-21"},
{&ff.ServerSideBatchChanges, ">= 3.37.0-0", "2022-02-08"},
{&ff.BitbucketCloud, ">= 3.40.0-0", "2022-04-20"},
} {
value, err := api.CheckSourcegraphVersion(version, feature.constraint, feature.minDate)
if err != nil {
Expand Down
5 changes: 5 additions & 0 deletions internal/batches/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,11 @@ func (svc *Service) ResolveRepositories(ctx context.Context, spec *batcheslib.Ba

switch st := strings.ToLower(repo.ExternalRepository.ServiceType); st {
case "github", "gitlab", "bitbucketserver":
case "bitbucketcloud":
if svc.features.BitbucketCloud {
break
}
fallthrough

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a fallthrough outside of the language spec 🤯

default:
if !svc.allowUnsupported {
unsupported.Append(repo)
Expand Down