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

   <!-- Answer -->
   This happens because PR-related activities (like "Review PR" or "Open a PR") 
are only mapped to users if there are linked accounts from both gitextractor 
and GitHub GraphQL in the user_accounts table. The work logs join activities to 
users by matching account IDs from all relevant sources. If a user only has a 
gitextractor entry, only commit activities will show up; PR activities require 
a GitHub GraphQL account link as well.
   
   To ensure full activity tracking, make sure the GitHub GraphQL plugin has 
collected account data for your users, and that the ConnectUserAccountsExact 
task (part of the org plugin) has run to link users and accounts by matching 
email, full name, or username. This subtask is enabled by default and runs 
automatically when the org plugin is included in your pipeline, but you can 
also trigger it manually if needed. No other background job performs this 
linkage—so if you add users or accounts via CSV, always ensure the mapping step 
runs to link all relevant accounts for each user. If PR activities are missing, 
check that the user has both gitextractor and GitHub GraphQL account entries 
and that their emails or usernames match for linking 
([source](https://github.com/apache/incubator-devlake/blob/2c15ad880dce830c6512fa58039527cbf4745b8b/backend/plugins/org/tasks/user_account.go#L29-L110)).
   
   
   <!-- 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/706b0bef-7cce-49fa-b056-216af771eda5?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/706b0bef-7cce-49fa-b056-216af771eda5?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/706b0bef-7cce-49fa-b056-216af771eda5?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/706b0bef-7cce-49fa-b056-216af771eda5?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/706b0bef-7cce-49fa-b056-216af771eda5?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/706b0bef-7cce-49fa-b056-216af771eda5?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/706b0bef-7cce-49fa-b056-216af771eda5?feedback_type=other)</sup>
   
   [![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/b4e8e847-d479-4541-83a8-d88d83fea5c9/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20happens%20because%20PR-related%20activities%20%28like%20%22Review%20PR%22%20or%20%22Open%20a%20PR%22%29%20are%20only%20mapped%20to%20users%20if%20there%20are%20linked%20accounts%20from%20both%20gitextractor%20and%20GitHub%20GraphQL%20in%20the%20user_accounts%20table.%20The%20work%20logs%20join%20activities%20to%20users%20by%20matching%20account%20IDs%20from%20all%20relevant%20sources.%20If%20a%20user%20only%20has%20a%20gitextractor%20entry%2C%20only%20commit%20activities%20will%20show%20up%3B%20PR%20activities%20require%20a%20GitHub%20GraphQL%20account%20link%20as%20well.%0A%0ATo%20ensure%20full%20activity%20tracking%2C%20make%20sure%20the%20GitHub%20GraphQL%20plugin%20has%20collected%20account%20data%20for%20your%20users%2C%20and%20that%20t
 
he%20ConnectUserAccountsExact%20task%20%28part%20of%20the%20org%20plugin%29%20has%20run%20to%20link%20users%20and%20accounts%20by%20matching%20email%2C%20full%20name%2C%20or%20username.%20This%20subtask%20is%20enabled%20by%20default%20and%20runs%20automatically%20when%20the%20org%20plugin%20is%20included%20in%20your%20pipeline%2C%20but%20you%20can%20also%20trigger%20it%20manually%20if%20needed.%20No%20other%20background%20job%20performs%20this%20linkage%E2%80%94so%20if%20you%20add%20users%20or%20accounts%20via%20CSV%2C%20always%20ensure%20the%20mapping%20step%20runs%20to%20link%20all%20relevant%20accounts%20for%20each%20user.%20If%20PR%20activities%20are%20missing%2C%20check%20that%20the%20user%20has%20both%20gitextractor%20and%20GitHub%20GraphQL%20account%20entries%20and%20that%20their%20emails%20or%20usernames%20match%20for%20linking%C2%A0%28%5Bsource%5D%28https%3A//github.com/apache/incubator-devlake/blob/2c15ad880dce830c6512fa58039527cbf4745b8b/backend/plugins/org/tasks/user_acc
 ount.go%23L29-L110%29%29.)&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/8698)


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to