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/11/02 06:04:13 UTC

[GitHub] [incubator-devlake-website] klesh commented on a diff in pull request #310: update pr deploy time

klesh commented on code in PR #310:
URL: https://github.com/apache/incubator-devlake-website/pull/310#discussion_r1011223649


##########
docs/Metrics/DeployTime.md:
##########
@@ -16,11 +16,20 @@ The time it takes from when a PR is merged to when it is deployed.
 
 
 ## How is it calculated?
-You can define `deployment` based on your actual practice. For a full list of `deployment`'s definitions that DevLake support, please refer to [Deployment Frequency](/docs/Metrics/DeploymentFrequency.md).
-
+1. You can define `deployment` based on your actual practice. For a full list of `deployment`'s definitions that DevLake support, please refer to [Deployment Frequency](/docs/Metrics/DeploymentFrequency.md).
+2. Connect pr/mr to the right `deployment`
+![](/img/Metrics/pr-commit-deployment-relation.jpeg)
+   1. Use plugin `refdiff` to calculate `refs_commits_diffs` between any two consecutive deployments under the same scope,

Review Comment:
   under the same scope and environment (in terms of TESTING/STAGING/PRODUCTION)



##########
docs/Metrics/DeployTime.md:
##########
@@ -16,11 +16,20 @@ The time it takes from when a PR is merged to when it is deployed.
 
 
 ## How is it calculated?
-You can define `deployment` based on your actual practice. For a full list of `deployment`'s definitions that DevLake support, please refer to [Deployment Frequency](/docs/Metrics/DeploymentFrequency.md).
-
+1. You can define `deployment` based on your actual practice. For a full list of `deployment`'s definitions that DevLake support, please refer to [Deployment Frequency](/docs/Metrics/DeploymentFrequency.md).
+2. Connect pr/mr to the right `deployment`
+![](/img/Metrics/pr-commit-deployment-relation.jpeg)
+   1. Use plugin `refdiff` to calculate `refs_commits_diffs` between any two consecutive deployments under the same scope,
+for example, here, we will get commit-2 and commit-3 by calculating commits_diff before deployment-1 and deployment-2,
+we can say commit-2, commit-3 and commit-4 are deployed by deployment-2
+   2. Connect pr/mr and commits_diff through merge_commit or pr_commit, for example, 
+we get pr-3 connected to commit-3
+   3. Now we can get pr-3's deploy time by finish_time of deployment-2 minus merge_time of pr-3.
 <b>Data Sources Required</b>
 
-This metric relies on PR/MRs collected from GitHub or GitLab.
+This metric relies on two sources:
+1. PR/MRs collected from GitHub or GitLab.
+2. CI/CD collected from Github, Gitlab or Jenkins.

Review Comment:
   Similar to above



##########
docs/Metrics/DeployTime.md:
##########
@@ -16,11 +16,20 @@ The time it takes from when a PR is merged to when it is deployed.
 
 
 ## How is it calculated?
-You can define `deployment` based on your actual practice. For a full list of `deployment`'s definitions that DevLake support, please refer to [Deployment Frequency](/docs/Metrics/DeploymentFrequency.md).
-
+1. You can define `deployment` based on your actual practice. For a full list of `deployment`'s definitions that DevLake support, please refer to [Deployment Frequency](/docs/Metrics/DeploymentFrequency.md).
+2. Connect pr/mr to the right `deployment`
+![](/img/Metrics/pr-commit-deployment-relation.jpeg)
+   1. Use plugin `refdiff` to calculate `refs_commits_diffs` between any two consecutive deployments under the same scope,
+for example, here, we will get commit-2 and commit-3 by calculating commits_diff before deployment-1 and deployment-2,
+we can say commit-2, commit-3 and commit-4 are deployed by deployment-2
+   2. Connect pr/mr and commits_diff through merge_commit or pr_commit, for example, 
+we get pr-3 connected to commit-3
+   3. Now we can get pr-3's deploy time by finish_time of deployment-2 minus merge_time of pr-3.
 <b>Data Sources Required</b>
 
-This metric relies on PR/MRs collected from GitHub or GitLab.
+This metric relies on two sources:
+1. PR/MRs collected from GitHub or GitLab.

Review Comment:
   by enabling "Code Review" under the Data Entities section



-- 
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