You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ab...@apache.org on 2024/02/29 09:43:08 UTC
(incubator-devlake) branch main updated: fix(azuredevops): fix environment field (#7064)
This is an automated email from the ASF dual-hosted git repository.
abeizn 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 d2e549757 fix(azuredevops): fix environment field (#7064)
d2e549757 is described below
commit d2e549757f595baa3a1fe383dfa184ff98c9b2f7
Author: Lynwee <li...@merico.dev>
AuthorDate: Thu Feb 29 17:42:59 2024 +0800
fix(azuredevops): fix environment field (#7064)
---
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())