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 87df4b7d9 fix: Add name in gitextractor task options (#5629)
87df4b7d9 is described below

commit 87df4b7d9abc012f073b992b24779db9c8d77c3e
Author: Camille Teruel <[email protected]>
AuthorDate: Thu Jul 6 04:26:48 2023 +0200

    fix: Add name in gitextractor task options (#5629)
    
    Frontend expects gitextractor task to have a `name` property in its options.
    
    Co-authored-by: Camille Teruel <[email protected]>
---
 backend/python/plugins/azuredevops/azuredevops/main.py | 2 +-
 backend/python/pydevlake/pydevlake/pipeline_tasks.py   | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/backend/python/plugins/azuredevops/azuredevops/main.py 
b/backend/python/plugins/azuredevops/azuredevops/main.py
index 616a8076c..ac0d27dda 100644
--- a/backend/python/plugins/azuredevops/azuredevops/main.py
+++ b/backend/python/plugins/azuredevops/azuredevops/main.py
@@ -128,7 +128,7 @@ class AzureDevOpsPlugin(Plugin):
         if DomainType.CODE in scope_config.domain_types and not 
scope.is_external():
             url = urlparse(scope.remote_url)
             url = 
url._replace(netloc=f'{url.username}:{connection.token.get_secret_value()}@{url.hostname}')
-            yield gitextractor(url.geturl(), scope.domain_id(), 
connection.proxy)
+            yield gitextractor(url.geturl(), scope.name, scope.domain_id(), 
connection.proxy)
 
     def extra_stages(self, scope_config_pairs: list[tuple[GitRepository, 
GitRepositoryConfig]], _):
         for scope, config in scope_config_pairs:
diff --git a/backend/python/pydevlake/pydevlake/pipeline_tasks.py 
b/backend/python/pydevlake/pydevlake/pipeline_tasks.py
index 72912d0a8..5c2094d3c 100644
--- a/backend/python/pydevlake/pydevlake/pipeline_tasks.py
+++ b/backend/python/pydevlake/pydevlake/pipeline_tasks.py
@@ -21,12 +21,13 @@ from pydantic import BaseModel
 from pydevlake.message import PipelineTask
 
 
-def gitextractor(url: str, repo_id: str, proxy: Optional[str]):
+def gitextractor(url: str, repo_name: str, scope_id: str, proxy: 
Optional[str]):
     return PipelineTask(
         plugin="gitextractor",
         options={
             "url": url,
-            "repoId": repo_id,
+            "name": repo_name,
+            "repoId": scope_id,
             "proxy": proxy
         },
     )

Reply via email to