diff --git a/integrations/azure-devops/CHANGELOG.md b/integrations/azure-devops/CHANGELOG.md index 2a50feae64..cb1608669f 100644 --- a/integrations/azure-devops/CHANGELOG.md +++ b/integrations/azure-devops/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 +# Port_Ocean 0.1.11 (2024-04-15) + +### Bug Fixes + +- Made defaultBranch not required in the repository body when fetching repository policies + # Port_Ocean 0.1.10 (2024-04-11) ### Improvements diff --git a/integrations/azure-devops/azure_devops/client/azure_devops_client.py b/integrations/azure-devops/azure_devops/client/azure_devops_client.py index 1881ebd2bf..17bc7db536 100644 --- a/integrations/azure-devops/azure_devops/client/azure_devops_client.py +++ b/integrations/azure-devops/azure_devops/client/azure_devops_client.py @@ -102,8 +102,10 @@ async def generate_repository_policies( for repo in repos: params = { "repositoryId": repo["id"], - "refName": repo["defaultBranch"], } + if default_branch := repo.get("defaultBranch"): + params["refName"] = default_branch + policies_url = f"{self._organization_base_url}/{repo['project']['id']}/{API_URL_PREFIX}/git/policy/configurations" repo_policies = ( await self.send_request("GET", policies_url, params=params) diff --git a/integrations/azure-devops/pyproject.toml b/integrations/azure-devops/pyproject.toml index f61b562254..45ee348ef5 100644 --- a/integrations/azure-devops/pyproject.toml +++ b/integrations/azure-devops/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "azure-devops" -version = "0.1.10" +version = "0.1.11" description = "An Azure Devops Ocean integration" authors = ["Matan Geva "]