dosubot[bot] commented on issue #8302: URL: https://github.com/apache/incubator-devlake/issues/8302#issuecomment-2677686301
<!-- Greeting --> Hey @sungkangaw! 👋 I'm here to assist you with bug fixes, answer questions, and guide you on becoming a contributor. Let's squash those bugs together! <!-- Answer --> The issue you're experiencing with the DORA calculations is due to the `finished_date` being incorrectly mapped to the `updated_at` timestamp of GitHub deployments. This approach works for the latest deployments but causes inaccuracies for historical deployments, where `updated_at` may not reflect the actual completion time. To address this, your proposal to modify the GraphQL query to retrieve the last status where `state = success` and use its `updated_at` timestamp as the `finished_date` is a valid solution. This change would ensure that the `finished_date` accurately represents the time when the deployment was successfully completed, leading to more accurate DORA metrics calculations. Currently, the `finished_date` is set to the `UpdatedDate` of the `githubDeployment` in the `deployment_convertor.go` file <sup>[[1]](https://github.com/apache/incubator-devlake/blob/main/backend/plugins/github_graphql/tasks/deployment_convertor.go)</sup>. Adjusting the logic to use the `updated_at` of the last successful status would require changes in the GraphQL query and possibly the data processing logic to ensure the correct timestamp is used. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/a14bd7af-7619-468f-8b1d-6a46d646b9c9?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/a14bd7af-7619-468f-8b1d-6a46d646b9c9?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/a14bd7af-7619-468f-8b1d-6a46d646b9c9?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/a14bd7af-7619-468f-8b1d-6a46d646b9c9?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/a14bd7af-7619-468f-8b1d-6a46d646b9c9?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/a14bd7af-7619-468f-8b1d-6a46d646b9c9?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/a14bd7af-7619-468f-8b1d-6a46d646b9c9?feedback_type=other)</sup> -- 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: dev-unsubscr...@devlake.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org