klesh opened a new issue, #4869: URL: https://github.com/apache/incubator-devlake/issues/4869
## What and why to refactor 1. #4825 indicates that deployment might be a `cicd_pipeline` or `cicd_task` from a user's perspective. Therefore, we need to broaden the scope of the "Deployment Regex" to include the `cicd_pipeline`. 2. Jenkins deployments are not included in Change Lead Time calculation. The `cicd_pipeline_commits` consist of the repositories and commit_shas being built or deployed by a `cicd_pipeline`, we currently rely on the `repo_id` field to distinguish different repos, for data sources like github/gitlabe, filling it is not a issue. However, for specialized tool like Jenkins, it may not be possible, reliable, or easy to provide such information. In such cases, the only dependable field would be the `repo_url`. All data source plugins must be updated to populate this field. 3. There are many ways to orchestrate a deployment, making it challenging to identify all possible scenarios. We have determined that a `deployment` (new table) is a `cicd_pipeline_commit` if the corresponding `cicd_pipeline` satisfies `type=deployment` or includes any `cicd_tasks` with `type=deployment`. 4. Currently, both `refdiff` and `dora` are identifying previous deployments separately and using different methods, which can lead to issues. 5. To determine the deployment of a pull request, we must identify the commits deployed by examining its preceding SUCCESSFUL deployment. To do this, we must group the deployments by `cicd_scope_id`, `env`, and `repo_url`, then sort them by their `started date`. ## Describe the solution you'd like  ## Related issues #4825 #4810 -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
