From 07bfc98d6f09f6b25f4243fbd7762f60b974d891 Mon Sep 17 00:00:00 2001 From: fenrirx22 Date: Sat, 2 Dec 2023 12:28:20 +0100 Subject: [PATCH] set bitbucket repository issueUrl to return empty uri for now --- packages/melos/lib/src/common/git_repository.dart | 5 ++--- packages/melos/test/git_repository_test.dart | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/melos/lib/src/common/git_repository.dart b/packages/melos/lib/src/common/git_repository.dart index 5e0d966f..38ae0f98 100644 --- a/packages/melos/lib/src/common/git_repository.dart +++ b/packages/melos/lib/src/common/git_repository.dart @@ -253,10 +253,9 @@ class BitbucketRepository extends HostedGitRepository { @override Uri commitUrl(String id) => url.resolve('commits/$id'); + // TODO(fenrirx22): Implementing an issueUrl for Bitbucket requires a Jira URL @override - Uri issueUrl(String id) => throw UnsupportedError( - 'Not supported yet as it require Jira url', - ); + Uri issueUrl(String id) => Uri(); @override Uri get url => Uri.parse('$origin/$owner/$name/'); diff --git a/packages/melos/test/git_repository_test.dart b/packages/melos/test/git_repository_test.dart index 2c301d6b..b24a6cf7 100644 --- a/packages/melos/test/git_repository_test.dart +++ b/packages/melos/test/git_repository_test.dart @@ -314,13 +314,13 @@ void main() { ); }); - test('issueUrl returns correct URL', () { + test('issueUrl returns empty URL', () { final repo = BitbucketRepository(owner: 'a', name: 'b'); const issueId = '123'; expect( repo.issueUrl(issueId), - Uri.parse('https://bitbucket.org/a/b/pull-requests/123'), + Uri(), ); }); });