-
Couldn't load subscription status.
- Fork 87
[Github Actions] Make workflow configurable in pipeline config #118
Description
Describe the context of this enhancement
Currently for Github Actions project, by default for backend it will fetch all workflow for the repo. However in some cases not all workflow are meaningful and never be cared to visualize (e.g. scanning, specific testing, spiking ,etc.). If we could exclude these unimportant workflows, we could speed up the data sync as well as reduce some potential issue may have due to them.
Describe the solution you'd like
Enable workflow configuration in the pipeline config.
Task 1: Specify workflows when create Github Actions pipeline
- (FE) Enhance the pipeline config UI with a section below Personal Access Token
- (FE) Once user clicks Verify button and verify successfully, a workflow API is also triggered to visualize the list of existing workflows
- (FE) User is able to select the workflows that they are interested in
- (BE)
createPipeline(POST /project/{projectId}/pipeline) API accepts the additional configuration about workflow selections and store into DB
Task 2: Update workflows when configure Github Actions pipeline
- (FE) Display workflow config once Pipeline config popup is triggered, and initially fetch the latest workflow list
- (FE) User is able to update the workflow select and make an update
- (FE) Once URL/Personal Access Token is updated, the "Verify" triggering will update the workflow list accordingly
- (BE)
getPipeline(GET /project/{projectId}/pipeline/{pipelineId}) API returns the additional configuration about workflow selections from DB - (BE)
updatePipeline(PUT /project/{projectId}/pipeline/{pipelineId}) API accepts the additional configuration about workflow selections and store into DB
Task 3: Sync data with only configured workflows
- (BE) Replace querying all runs to query only the configured workflows' run by the workflow run API
- (BE) For compatibility, if workflows are not configured yet when the sync is triggered, keep to query all runs
Additional context
The config of workflow need to store both workflow name and workflow id.
