You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ca...@apache.org on 2023/07/05 09:04:49 UTC

[incubator-devlake] branch gitextractor_task_name_is_undefined updated (6d2ddf730 -> c3cae44c0)

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

camilleteruel pushed a change to branch gitextractor_task_name_is_undefined
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


    omit 6d2ddf730 Fix: Add name in gitextractor task options
     new c3cae44c0 fix: Add name in gitextractor task options

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (6d2ddf730)
            \
             N -- N -- N   refs/heads/gitextractor_task_name_is_undefined (c3cae44c0)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:


[incubator-devlake] 01/01: fix: Add name in gitextractor task options

Posted by ca...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

camilleteruel pushed a commit to branch gitextractor_task_name_is_undefined
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit c3cae44c0787f845f4baaed2be833e65177ed551
Author: Camille Teruel <ca...@meri.co>
AuthorDate: Wed Jul 5 11:00:43 2023 +0200

    fix: Add name in gitextractor task options
    
    Frontend expects gitextractor task to have a `name` property in its options.
---
 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
         },
     )