You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by GitBox <gi...@apache.org> on 2022/08/10 06:36:08 UTC

[GitHub] [incubator-devlake] abeizn opened a new pull request, #2722: feat: api to get pipeline list of blueprints by blueprint_id

abeizn opened a new pull request, #2722:
URL: https://github.com/apache/incubator-devlake/pull/2722

   # Summary
   Add a new api /blueprints/{id}/pipelines, to return pipelines triggered by blueprints.
   
   results:
   `
   [
     {
       "id": 2,
       "createdAt": "2022-08-08T10:22:21.21404+08:00",
       "updatedAt": "2022-08-08T10:22:56.061223+08:00",
       "name": "MY BLUEPRINT 1659925341201",
       "blueprintId": 2,
       "plan": [
         [
           {
             "plugin": "jira",
             "options": {
               "boardId": 88,
               "connectionId": 1,
               "transformationRules": {
                 "epicKeyField": "",
                 "typeMappings": {},
                 "storyPointField": "",
                 "remotelinkCommitShaPattern": ""
               }
             },
             "subtasks": [
               "collectStatus",
               "extractStatus",
               "collectProjects",
               "extractProjects",
               "collectBoard",
               "extractBoard",
               "collectIssueTypes",
               "extractIssueType",
               "collectIssues",
               "extractIssues",
               "collectIssueChangelogs",
               "extractIssueChangelogs",
               "collectAccounts",
               "collectWorklogs",
               "extractWorklogs",
               "collectRemotelinks",
               "extractRemotelinks",
               "collectSprints",
               "extractSprints",
               "convertBoard",
               "convertIssues",
               "convertWorklogs",
               "convertIssueChangelogs",
               "convertSprints",
               "convertSprintIssues",
               "convertIssueCommits",
               "extractAccounts",
               "convertAccounts"
             ]
           }
         ]
       ],
       "totalTasks": 1,
       "finishedTasks": 1,
       "beganAt": "2022-08-08T10:22:22.208869+08:00",
       "finishedAt": "2022-08-08T10:22:56.055201+08:00",
       "status": "TASK_COMPLETED",
       "message": "",
       "spentSeconds": 34,
       "stage": 1
     },
     {
       "id": 3,
       "createdAt": "2022-08-08T11:31:24.656209+08:00",
       "updatedAt": "2022-08-08T11:32:01.493431+08:00",
       "name": "MY BLUEPRINT 1659929482363",
       "blueprintId": 2,
       "plan": [
         [
           {
             "plugin": "jira",
             "options": {
               "boardId": 88,
               "connectionId": 1,
               "transformationRules": {
                 "epicKeyField": "",
                 "typeMappings": {},
                 "storyPointField": "",
                 "remotelinkCommitShaPattern": ""
               }
             },
             "subtasks": [
               "collectStatus",
               "extractStatus",
               "collectProjects",
               "extractProjects",
               "collectBoard",
               "extractBoard",
               "collectIssueTypes",
               "extractIssueType",
               "collectIssues",
               "extractIssues",
               "collectIssueChangelogs",
               "extractIssueChangelogs",
               "collectAccounts",
               "collectWorklogs",
               "extractWorklogs",
               "collectRemotelinks",
               "extractRemotelinks",
               "collectSprints",
               "extractSprints",
               "convertBoard",
               "convertIssues",
               "convertWorklogs",
               "convertIssueChangelogs",
               "convertSprints",
               "convertSprintIssues",
               "convertIssueCommits",
               "extractAccounts",
               "convertAccounts"
             ]
           }
         ]
       ],
       "totalTasks": 1,
       "finishedTasks": 1,
       "beganAt": "2022-08-08T11:31:24.871005+08:00",
       "finishedAt": "2022-08-08T11:32:01.492442+08:00",
       "status": "TASK_COMPLETED",
       "message": "",
       "spentSeconds": 37,
       "stage": 1
     },
     {
       "id": 4,
       "createdAt": "2022-08-09T14:05:35.224233+08:00",
       "updatedAt": "2022-08-09T14:06:09.299871+08:00",
       "name": "MY BLUEPRINT 1660025112440",
       "blueprintId": 2,
       "plan": [
         [
           {
             "plugin": "jira",
             "options": {
               "boardId": 88,
               "connectionId": 1,
               "transformationRules": {
                 "epicKeyField": "",
                 "typeMappings": {},
                 "storyPointField": "",
                 "remotelinkCommitShaPattern": ""
               }
             },
             "subtasks": [
               "collectStatus",
               "extractStatus",
               "collectProjects",
               "extractProjects",
               "collectBoard",
               "extractBoard",
               "collectIssueTypes",
               "extractIssueType",
               "collectIssues",
               "extractIssues",
               "collectIssueChangelogs",
               "extractIssueChangelogs",
               "collectAccounts",
               "collectWorklogs",
               "extractWorklogs",
               "collectRemotelinks",
               "extractRemotelinks",
               "collectSprints",
               "extractSprints",
               "convertBoard",
               "convertIssues",
               "convertWorklogs",
               "convertIssueChangelogs",
               "convertSprints",
               "convertSprintIssues",
               "convertIssueCommits",
               "extractAccounts",
               "convertAccounts"
             ]
           }
         ]
       ],
       "totalTasks": 1,
       "finishedTasks": 1,
       "beganAt": "2022-08-09T14:05:35.838847+08:00",
       "finishedAt": "2022-08-09T14:06:09.299122+08:00",
       "status": "TASK_COMPLETED",
       "message": "",
       "spentSeconds": 34,
       "stage": 1
     }
   ]
   `
   
   ### Does this close any open issues?
   close #2664 
   
   ### Screenshots
   Include any relevant screenshots here.
   
   ### Other Information
   Any other information that is important to this PR.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] abeizn commented on a diff in pull request #2722: feat: api to get pipeline list of blueprints by blueprint_id

Posted by GitBox <gi...@apache.org>.
abeizn commented on code in PR #2722:
URL: https://github.com/apache/incubator-devlake/pull/2722#discussion_r943068673


##########
services/blueprint.go:
##########
@@ -342,3 +342,14 @@ func TriggerBlueprint(id uint64) (*models.Pipeline, error) {
 	// done
 	return pipeline, err
 }
+
+// GetBlueprintPipelines returns a list of pipelines based on blueprint id
+func GetBlueprintPipelines(id uint64) ([]*models.Pipeline, error) {

Review Comment:
   updated



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] klesh merged pull request #2722: feat: api to get pipeline list of blueprints by blueprint_id

Posted by GitBox <gi...@apache.org>.
klesh merged PR #2722:
URL: https://github.com/apache/incubator-devlake/pull/2722


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] klesh commented on a diff in pull request #2722: feat: api to get pipeline list of blueprints by blueprint_id

Posted by GitBox <gi...@apache.org>.
klesh commented on code in PR #2722:
URL: https://github.com/apache/incubator-devlake/pull/2722#discussion_r943039142


##########
services/blueprint.go:
##########
@@ -342,3 +342,14 @@ func TriggerBlueprint(id uint64) (*models.Pipeline, error) {
 	// done
 	return pipeline, err
 }
+
+// GetBlueprintPipelines returns a list of pipelines based on blueprint id
+func GetBlueprintPipelines(id uint64) ([]*models.Pipeline, error) {

Review Comment:
   We should extend the `GetPipelines` and re-use it instead of creating a new function.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org