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

   <!-- Answer -->
   If the `pull_request_files` table is not present in your database, you can 
use the `commit_files` table, which is collected by the `gitextractor` plugin, 
to find the names of files that were updated in the pull requests. This table 
contains information about the files changed in each commit, which can be 
linked to pull requests through the `pull_request_commits` table.
   
   Here is a SQL query example to achieve this:
   
   ```sql
   SELECT cf.file_path
   FROM commit_files cf
   JOIN pull_request_commits prc ON cf.commit_sha = prc.commit_sha
   JOIN pull_requests pr ON prc.pull_request_id = pr.id
   WHERE pr.id = <your_pull_request_id>;
   ```
   
   Replace `<your_pull_request_id>` with the actual pull request ID you are 
interested in. This query joins the `commit_files` table with the 
`pull_request_commits` table to get the file paths of the files changed in the 
specified pull request 
<sup>[[1]](https://github.com/apache/incubator-devlake-website/blob/main/docs/Overview/SupportedDataSources.md)</sup>.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   


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