Closed kontu closed 2 weeks ago
I believe what you are seeing here is that there are things that count as contributions that you wouldn't expect. ie. more than code commits.
Here is the github api endpoint we are using. Notice in the api response example it says "contributions: 32". That is the number we are relaying into this action.
The value of contribution has a list of things that increase that count.
- Committing to a repository's default branch or gh-pages branch
- Creating a branch
- Opening an issue
- Opening a discussion
- Answering a discussion
- Proposing a pull request
- Submitting a pull request review
I do not believe what I am seeing is the difference. In my example pic showing 476 contributions as the top contributor, it is impossible that these other items make up the difference. That repo is rarely used, only has 2 people who commit to it. Rarely PR's, never issues or discussions or other items. Certainly not 468 other actions in that week timespan defined. The user has made roughly ~450 commits to the repo since it's inception some years back though, which is more inline to the value returned.
Hmm interesting! Let me take a look a few other places to see what I can find.
I don't see anywhere in the code where the contributions are filtered down by the dates given.
contributor = contributor_stats.ContributorStats( user.login, False, user.avatar_url, user.contributions_count, commit_url, "", )
And user.contributions_count
is set by the GitHub Python api wrapper directly without considering start and end date variables.
Our options are either to switch to commit counts or relabel the data to all time contributions.
Looks awesome can't wait to see it in a release!
Just released!!
Ran using @1.5.0, doesn't seem to have fixed the issue quite. I should have under 20 contributions; and 528 matches the result from action contributors@1.4.3
Yeah, we changed the column headers to reflect that these are all time commits. We couldn't fix the commit numbers due to limitations in the GitHub API.
Describe the bug
When generating the report against an Organization using start_date and end_date, the Contributions Count is equal to the all time contributions for any repos in the report
In a report created, Top contributor has contributed to one repo in the time span. See screenshots for I would expect their Contribution Count to be ~8 in the report; not 476
To Reproduce
permissions: contents: read
jobs: contributor_report: name: contributor report runs-on: ubuntu-latest permissions: issues: write