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
6 changes: 1 addition & 5 deletions fixtures/vsts.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,7 @@ def _stub_vsts(self):
"id": self.repo_id,
"name": self.repo_name,
"project": {"name": self.project_a["name"]},
"_links": {
"web": {
"href": f"https://{self.vsts_account_name.lower()}.visualstudio.com/_git/{self.repo_name}"
}
},
"webUrl": f"https://{self.vsts_account_name.lower()}.visualstudio.com/_git/{self.repo_name}",
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion src/sentry/integrations/vsts/integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ def get_repositories(
"repo_name": repo["name"],
"identifier": str(repo["id"]),
"external_id": self.get_repo_external_id(repo),
"url": repo["_links"]["web"]["href"],
"url": repo.get("webUrl", ""),
Comment thread
wedamija marked this conversation as resolved.
"instance": self.instance,
"project": repo["project"]["name"],
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,17 +455,13 @@ def test_creates_new_repos_for_vsts(self, mock_get_client: MagicMock) -> None:
"id": "repo-uuid-1",
"name": "cool-service",
"project": {"name": "ProjectA"},
"_links": {
"web": {"href": "https://myvstsaccount.visualstudio.com/_git/cool-service"}
},
"webUrl": "https://myvstsaccount.visualstudio.com/_git/cool-service",
},
{
"id": "repo-uuid-2",
"name": "other-service",
"project": {"name": "ProjectA"},
"_links": {
"web": {"href": "https://myvstsaccount.visualstudio.com/_git/other-service"}
},
"webUrl": "https://myvstsaccount.visualstudio.com/_git/other-service",
},
]
}
Expand Down
Loading