This is an automated email from the ASF dual-hosted git repository.

lynwee pushed a commit to branch release-v0.21
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/release-v0.21 by this push:
     new b2644822c fix(azuredevops): fix environment field (#7064) (#7065)
b2644822c is described below

commit b2644822ccfd643d72d7b815ede89aca0682f602
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Feb 29 17:43:30 2024 +0800

    fix(azuredevops): fix environment field (#7064) (#7065)
    
    Co-authored-by: Lynwee <[email protected]>
---
 backend/python/plugins/azuredevops/azuredevops/streams/builds.py | 2 +-
 backend/python/plugins/azuredevops/azuredevops/streams/jobs.py   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/backend/python/plugins/azuredevops/azuredevops/streams/builds.py 
b/backend/python/plugins/azuredevops/azuredevops/streams/builds.py
index cb3b9f652..ef4717759 100644
--- a/backend/python/plugins/azuredevops/azuredevops/streams/builds.py
+++ b/backend/python/plugins/azuredevops/azuredevops/streams/builds.py
@@ -67,7 +67,7 @@ class Builds(Stream):
         environment = devops.CICDEnvironment.PRODUCTION
         if ctx.scope_config.production_pattern is not None and 
ctx.scope_config.production_pattern.search(
                 b.name) is None:
-            environment = devops.CICDEnvironment.EMPTY
+            environment = None
 
         if b.finish_time:
             duration_sec = abs(b.finish_time.timestamp() - 
b.start_time.timestamp())
diff --git a/backend/python/plugins/azuredevops/azuredevops/streams/jobs.py 
b/backend/python/plugins/azuredevops/azuredevops/streams/jobs.py
index 9a309a2a7..9c625c5f3 100644
--- a/backend/python/plugins/azuredevops/azuredevops/streams/jobs.py
+++ b/backend/python/plugins/azuredevops/azuredevops/streams/jobs.py
@@ -84,7 +84,7 @@ class Jobs(Substream):
         environment = devops.CICDEnvironment.PRODUCTION
         if ctx.scope_config.production_pattern is not None and 
ctx.scope_config.production_pattern.search(
                 j.name) is None:
-            environment = devops.CICDEnvironment.EMPTY
+            environment = None
 
         if j.finish_time:
             duration_sec = abs(j.finish_time.timestamp() - 
j.start_time.timestamp())

Reply via email to