r/github • • Oct 30 '26

Question How can I automatically measure the actual value of a developer's GitHub contributions?

Hey everyone!

I'm working on an open-source funding platform where developers can contribute to projects and potentially receive funding based on their contributions.

I'm trying to figure out how to evaluate contributions fairly using Git commits and pull requests.

For example, I'd like to automatically determine:

  • What a commit actually changes (new features, bug fixes, security fixes, refactoring, documentation, etc.).
  • How significant the change is for the project.
  • How complex or technically valuable the contribution is.
  • Whether the changes actually work and improve the project.
  • How to attribute contributions to the right developer.

I know that simply counting lines of code wouldn't work. A small security fix could be much more valuable than hundreds of lines of unnecessary code.

My questions:

  1. Are there existing tools, libraries, or APIs that can analyze Git commits and estimate their impact?
  2. Could AST analysis, automated tests, and AI-based code review help determine the type and quality of a contribution?
  3. How would you design a fair scoring system that doesn't reward developers just for writing more code?
  4. Are there any existing projects trying to solve this problem?
  5. What problems or ways of gaming the system should I watch out for, especially if the results influence real financial rewards?

I'd love to hear about existing solutions, technical approaches, or lessons from people who've worked on similar systems.

Thanks!

0 Upvotes

8 comments sorted by

10

u/SheriffRoscoe Oct 30 '26

You can't.

1

u/bwmat Oct 30 '26

Companies around the world have been trying to figure this out for decades lmao

1

u/Immediate_Wheel1953 Oct 30 '26

I would score merged work, not commits, and let a maintainer's approval carry most of the weight. I once tried ranking by lines changed and it rewarded a big refactor that nobody needed, while a tiny fix that stopped a crash barely registered. If money is involved, I would cap the score per PR and keep the score as a starting point for a human decision, not the payout itself, because otherwise people will optimise for the metric fast.

1

u/Geraldwelly Oct 31 '26

I'd stop trying to score commits and score merged PRs instead, with the maintainer's review carrying most of the weight. Anything you can compute (lines changed, files touched, AST complexity, even an AI review) gets gamed fast once money is attached. People split one fix into ten PRs, pad tests, or mass-open typo PRs.

What's held up for me as a tech lead:

- Let automation classify, not value. Conventional-commit labels or an LLM can tag a PR as fix, feature, docs or security pretty reliably. Deciding it's worth $X should stay with someone who knows the codebase.

- Weight by what happens after merge: did it close a linked issue, did it get reverted within 30 days, did later work build on it.

- Run security fixes through a separate bounty path, because they look tiny by every metric.

- For attribution, use the PR author plus Co-authored-by trailers, not commit authors, since squash merges rewrite those.

The first gaming you'll see is the Hacktoberfest kind: low-effort PRs farmed for rewards. Requiring a maintainer-approved issue before work starts cuts most of it.

1

u/tautality 24d ago edited 24d ago

Your best option would be to use an LLM for that. Decision models are cheaper and can help you categorize commits in terms of contribution. I don't see any other automated way of doing it, and even that might be like 70% reliable at most, because you can't determine how much actual business value each commit had. Not to mention how much preliminary or invisible work has been done. Or the work that was done but didn't end up getting merged for other legit reasons.