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

Support for tracking commits pushed directly to branch #373

Open
2 tasks
rithviknishad opened this issue Mar 11, 2024 · 9 comments · May be fixed by #428
Open
2 tasks

Support for tracking commits pushed directly to branch #373

rithviknishad opened this issue Mar 11, 2024 · 9 comments · May be fixed by #428
Assignees

Comments

@rithviknishad
Copy link
Member

Problem

In certain cases, contributions are made to a project by pushing a commit to a branch. Leaderboard currently does not track such activities performed by the contributor.

image

Action Items

  • Update scraper to track commits pushed to a branch by a contributor. Tag those activities if it was made to the default branch or not.
  • Update the contributor page to reflect the new information being captured.
@dgparmar14
Copy link
Contributor

I want to work on this issue.

@dgparmar14
Copy link
Contributor

image

@rithviknishad Please review the logic and the method used to fetch the default branch name in the provided code snippet.

@rithviknishad
Copy link
Member Author

rithviknishad commented Mar 22, 2024

Do events show PushEvents from forked repos?

If not, I don't think this will be a great value addition since most of the contributions are from forked repos.

@dgparmar14
Copy link
Contributor

Okay, So I need to track also a commits from contributors forked repositories and also show them in profile page, right ?

@rithviknishad
Copy link
Member Author

Yeah, but is it possible?

@dgparmar14
Copy link
Contributor

dgparmar14 commented Mar 22, 2024

Yup, It's possible
Here are the steps

  1. Fetch the main repository: First, fetch information about the main repository.
  2. Fetch the forks of the main repository
  3. Iterate through forks: For each fork, fetch the commits made by the contributors in their forked repositories.

Screenshot 2024-03-22 191640
Screenshot 2024-03-22 191651

We can create these two functions or one by merging these two and call this from scrapper function.

@dgparmar14
Copy link
Contributor

@rithviknishad Even if we utilize the GraphQL API, we still encounter the same issue. We'd need to initially retrieve all repositories and their associated forks before we can access their commits. While pagination can help mitigate rate limit problems, it may not be applicable in this scenario since we're scraping data.

@dgparmar14
Copy link
Contributor

@rithviknishad
In profile page we are showing currently working on feature , in profile page.
So, my idea is that when pr opend from than we will start tracking commits of that pr because i think it is more better and meaning full.another thing is currently working on, feature is shwoing scrapped data now. So i thought to change it to Api request when user hit the route . So is it fine to do this to fixes the issue?

@rithviknishad
Copy link
Member Author

Yeah that'd be nice. That'd also bring ability to blend viewing of scrapped data with data from other sources

@dgparmar14 dgparmar14 linked a pull request Apr 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants