Skip to content

Commit

Permalink
set bitbucket repository issueUrl to return empty uri for now
Browse files Browse the repository at this point in the history
  • Loading branch information
fenrirx22 committed Dec 2, 2023
1 parent 26c469a commit 07bfc98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions packages/melos/lib/src/common/git_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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/');
Expand Down
4 changes: 2 additions & 2 deletions packages/melos/test/git_repository_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
);
});
});
Expand Down

0 comments on commit 07bfc98

Please sign in to comment.