dosubot[bot] commented on issue #8542:
URL: 
https://github.com/apache/incubator-devlake/issues/8542#issuecomment-3198833579

   <!-- Greeting -->
   Hi @CVidCev! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the 
incubator-devlake team.
   
   <!-- Answer -->
   The pr_coding_time value is calculated as the time between the first commit 
in the MR's branch and the creation of the MR itself. If the first commit is 
pushed right before opening the MR (which is common when working locally and 
pushing everything at once), pr_coding_time will be zero or missing, even if 
the actual coding took longer. This is a known limitation—DevLake relies on the 
timestamps in Git for this calculation and can't infer time spent coding 
locally before the first push. To ensure pr_coding_time is captured, it's best 
to create a feature branch and make at least one commit before opening the MR, 
but even then, if the commit and MR creation are close together, the value may 
still be very small or zero. There is currently no built-in way to improve this 
measurement in DevLake for GitLab MRs 
[reference](https://github.com/apache/incubator-devlake/discussions/8440).
   
   Edge cases like single-commit MRs, MRs created directly on main, or missing 
commit metadata can also result in missing or zero pr_coding_time 
[reference](https://github.com/apache/incubator-devlake/blob/2c15ad880dce830c6512fa58039527cbf4745b8b/backend/core/models/domainlayer/code/pull_request.go).
 No recent changes have altered this logic.
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/54b52e99-077f-42be-8d3b-d24315097450?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/54b52e99-077f-42be-8d3b-d24315097450?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/54b52e99-077f-42be-8d3b-d24315097450?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/54b52e99-077f-42be-8d3b-d24315097450?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/54b52e99-077f-42be-8d3b-d24315097450?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/54b52e99-077f-42be-8d3b-d24315097450?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/54b52e99-077f-42be-8d3b-d24315097450?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat
 with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/b4e8e847-d479-4541-83a8-d88d83fea5c9/ask?utm_source=githu
 b)&nbsp;[![Join 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/incubator-devlake/issues/8542)


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

Reply via email to