Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

twenty.com/contributors data inconsistencies #5715

Closed
Bonapara opened this issue Jun 3, 2024 · 10 comments
Closed

twenty.com/contributors data inconsistencies #5715

Bonapara opened this issue Jun 3, 2024 · 10 comments
Assignees
Labels
scope: front Issues that are affecting the frontend side only size: short type: marketing

Comments

@Bonapara
Copy link
Member

Bonapara commented Jun 3, 2024

Description

Some contributors have an incorrect number of merged PRs displayed on their profiles.

For instance, @pacyL2K19 merged #5051 three weeks ago, but it is not shown as "Merged" on his profile.

CleanShot 2024-06-03 at 13 53 05

The data from the comment we make when merging a PR also has some inconsistencies:

image

@Bonapara Bonapara added good first issue Good for newcomers scope: front Issues that are affecting the frontend side only size: minutes type: marketing labels Jun 3, 2024
Copy link
Contributor

greptile-apps bot commented Jun 3, 2024

Disclaimer: This comment was automatically generated with AI. It can give some useful hints as to where to look for, but sometimes it can also give very inaccurate answers so takes this with a pinch of salt :).

To resolve the data inconsistencies for contributors on twenty.com, follow these steps:

  1. Check the GitHub sync contributors module:

    • File: src/services/github/syncContributors.js
    • Ensure the logic for fetching PR data includes all merged PRs.
    • Verify the saveContributorData function correctly updates the contributor's profile.
  2. Review the get-contributor-activity utility function:

    • File: src/utils/getContributorActivity.js
    • Confirm it accurately processes and counts merged PRs.
  3. Update the logic if necessary:

    • Ensure merged PRs are correctly identified and counted in both the sync and utility functions.

Example code snippet to check merged PRs:

const mergedPRs = prs.filter(pr => pr.state === 'merged');

Ensure this logic is applied consistently in both the sync and utility functions.

References

@sagarhedaoo
Copy link
Contributor

Hi! Can I start working on this? @Bonapara

@Bonapara
Copy link
Member Author

Bonapara commented Jun 4, 2024

Sure @pacyL2K19, thanks for contributing!

@sagarhedaoo
Copy link
Contributor

image Hi! I am not able to see any contributor on localhost, is there any specific package I need to run to see the contributors?

@Bonapara
Copy link
Member Author

Bonapara commented Jun 5, 2024

@FelixMalfait will be able to help!

@Bonapara
Copy link
Member Author

Bonapara commented Jun 5, 2024

@sagarhedaoo, unfortunately, after discussing with the team, I realized we need to handle this issue internally since you won't be able to access the data locally. Perhaps you can take on another Good First Issue? Thanks a lot for contributing to Twenty!

@FelixMalfait
Copy link
Member

FelixMalfait commented Sep 11, 2024

@Freebios would you mind looking into this? I think it's a prod issue (cron not running or something like that). But I don't know how to access the logs

The cron should run this command I think: https://github.com/twentyhq/twenty/blob/main/packages/twenty-website/package.json#L11

@Freebios
Copy link
Contributor

@FelixMalfait the job seems to be running correctly, I do run this command every 5mn but I only get a successfull output :/
image

Could there be dirty data in database ?

@FelixMalfait
Copy link
Member

This should probably fix it #7040 ; we'll need to relaunch a full sync after it's merged (--isFullSync flag on the previous command). Could you please do it @Freebios? Thanks!

@FelixMalfait
Copy link
Member

@thomtrp ran the command. It should be working now. Closing the issue!

@github-project-automation github-project-automation bot moved this from 🔖 Planned to ✅ Done in Product development ✅ Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: front Issues that are affecting the frontend side only size: short type: marketing
Projects
Status: ✅ Done
Development

No branches or pull requests

5 participants