Enhance PR and issue tracking in contributions script#1394
Merged
beyhan merged 1 commit intocloudfoundry:mainfrom Jan 20, 2026
Merged
Enhance PR and issue tracking in contributions script#1394beyhan merged 1 commit intocloudfoundry:mainfrom
beyhan merged 1 commit intocloudfoundry:mainfrom
Conversation
- Add GitHub Search API support for finding PR reviews - Track PR review comments using commenter search - Filter out pull requests from issue queries - Prevent duplicate reporting of PRs as issues - Improve accuracy of contribution detection
beyhan
approved these changes
Jan 19, 2026
Member
beyhan
left a comment
There was a problem hiding this comment.
I also tried the change for my user and here is one example:
- without the change: https://gist.github.com/beyhan/a363940387c7adea83e8ae1cd6191032
- and with the change: https://gist.github.com/beyhan/514437a8d9c27b4a292918bee274511a
stephanme
approved these changes
Jan 20, 2026
cweibel
approved these changes
Jan 20, 2026
Gerg
approved these changes
Jan 20, 2026
rkoster
approved these changes
Jan 20, 2026
Member
|
Thank you @anujc25 for the contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
contributions-for-user.shscript was incorrectly reporting pull requests as issues, leading to:Before this change: 0 PRs tracked, 11 items in issues (most were actually PRs) (Reference: https://gist.github.com/anujc25/ddbf3c6c686e0fa1028c72b3584c1ede)
After this change: 26 PRs properly tracked, 1 actual issue (Reference: https://gist.github.com/anujc25/f2e7ab6b2e1129769ce9f1d8003324b3)
Solution
Use GitHub Search API to find PR reviews and comments (provides complete history, not just last 90 days)
search/issues?q=repo:${repo}+type:pr+reviewed-by:${user}- finds official reviewssearch/issues?q=repo:${repo}+type:pr+commenter:${user}- finds PR comment participationFilter PRs from issue queries using
select(.pull_request == null)to prevent PRs from appearing in the issues sectionKeep Events API as fallback for recent activity