You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by kl...@apache.org on 2023/12/15 02:08:10 UTC
(incubator-devlake) branch main updated: fix(azuredevops): avoid pipeline panic if commit_sha is none (#6627)
This is an automated email from the ASF dual-hosted git repository.
klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 8973b18b7 fix(azuredevops): avoid pipeline panic if commit_sha is none (#6627)
8973b18b7 is described below
commit 8973b18b79bd9bff46376658e8b5be14fb3c8423
Author: André Brisolla <an...@gmail.com>
AuthorDate: Thu Dec 14 23:08:06 2023 -0300
fix(azuredevops): avoid pipeline panic if commit_sha is none (#6627)
Co-authored-by: Camille Teruel <ca...@gmail.com>
---
.../plugins/azuredevops/azuredevops/streams/builds.py | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/backend/python/plugins/azuredevops/azuredevops/streams/builds.py b/backend/python/plugins/azuredevops/azuredevops/streams/builds.py
index aba07c90d..b24dc1be8 100644
--- a/backend/python/plugins/azuredevops/azuredevops/streams/builds.py
+++ b/backend/python/plugins/azuredevops/azuredevops/streams/builds.py
@@ -87,10 +87,11 @@ class Builds(Stream):
cicd_scope_id=ctx.scope.domain_id(),
)
- yield devops.CiCDPipelineCommit(
- pipeline_id=b.domain_id(),
- commit_sha=b.source_version,
- branch=b.source_branch,
- repo_id=ctx.scope.domain_id(),
- repo_url=ctx.scope.url,
- )
+ if b.source_version is not None:
+ yield devops.CiCDPipelineCommit(
+ pipeline_id=b.domain_id(),
+ commit_sha=b.source_version,
+ branch=b.source_branch,
+ repo_id=ctx.scope.domain_id(),
+ repo_url=ctx.scope.url,
+ )