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

   <!-- Greeting -->
   Hello @lokeshmandhare! I'm here to help you with any bugs, questions, or 
contributions you have for the repository. Let's work together to resolve the 
issue you're facing.
   
   <!-- Answer -->
   The issue you're experiencing with the 'pull_request_assignees' and 
'pull_request_reviewers' tables not containing user data from GitHub in 
DevLake's MySQL database is likely due to the migration script 
`modifyPrAssigneeAndReviewerId`. This script deletes the existing tables and 
their migration history, and then recreates them, which results in the loss of 
any previously stored data in these tables 
<sup>[[1]](https://github.com/apache/incubator-devlake/blob/main/backend/core/models/migrationscripts/20240607_modify_pr_assignees_and_reviewers_id.go)</sup>.
   
   To ensure that user data is correctly ingested into these tables, you need 
to follow the specific steps and configurations for setting up the GitHub 
integration in DevLake:
   
   1. **Add Data Connections:**
      - **Connection Name:** Unique identifier for the connection.
      - **Endpoint URL:** Use `https://api.github.com/`.
      - **Personal Access Token(s):** Ensure the token has the required 
permissions:
        - For public repositories: `repo:status`, `repo_deployment`, 
`read:user`, `read:org`.
        - For private repositories: `repo`, `read:user`, `read:org`.
      - **Use GraphQL APIs:** Enable if supported.
      - **Test and Save Connection.**
   
   2. **Add Data Scopes:**
      - Select the GitHub repositories for data collection.
   
   3. **Add Scope Config (Optional):**
      - Configure the `Code Review` section to parse PR labels.
   
   4. **Create a Project:**
      - Create a new project in the Project page.
   
   5. **Add a GitHub Connection to the Project:**
      - Add the configured GitHub connection and select repositories.
   
   6. **Set the Sync Policy:**
      - **Data Time Range:** Select the desired time range.
      - **Sync Frequency:** Choose the sync frequency.
      - **Skip Failed Tasks:** Optionally enable this.
   
   7. **Start Data Collection:**
      - Click "Collect Data" to start the process.
   
   Following these steps should ensure that DevLake correctly ingests user data 
into the `pull_request_assignees` and `pull_request_reviewers` tables 
<sup>[[2]](https://github.com/apache/incubator-devlake-website/blob/main/docs/Configuration/GitHub.md)</sup><sup>[[3]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v0.21/Configuration/GitHub.md)</sup><sup>[[4]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v0.19/Configuration/GitHub.md)</sup>.
   
   Additionally, there is a known issue in version v1.0.0 related to the 
GitExtractor task failing in GitHub blueprints, which could impact data 
collection. This issue is documented and was fixed in a later version 
<sup>[[5]](https://github.com/apache/incubator-devlake-website/blob/main/versioned_docs/version-v1.0/Troubleshooting/Configuration.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