petkostas opened a new pull request, #8552:
URL: https://github.com/apache/incubator-devlake/pull/8552

   ### Summary
   Summary of the reviewer’s concern
   - DevLake deliberately excludes the very first `deployment_commit` in a 
scope when mapping PRs to deployments using commit diffs, because:
     - Data is typically collected within a time window.
     - For the first deployment in that window, there is no previous deployment 
to diff against, so its set of deployed commits is unknown.
     - If included, the first deployment could incorrectly swallow many 
unrelated PRs merged between an unknown previous deployment and that first one.
   
   This PR:
   Adjusts `getDeploymentCommit` to use a two-phase strategy:
     1) Direct match: if there exists a successful PRODUCTION deployment in the 
project whose `commit_sha` equals the PR’s merge commit, return it. This is 
precise and does not risk the first deployment over mapping problem.
     2) Fallback to diff-based mapping: retain the current strategy (including 
the filter `dc.prev_success_deployment_commit_id <> ''`) to avoid mapping to 
the first deployment via diffs
   
   
   ### Does this close any open issues?
   Closes #8188 
   
   ### Screenshots
   ⚠️ Test pending
   
   


-- 
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-unsubscr...@devlake.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to