Skip to content

Fix first time contributor detection with time constraints #93

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

Merged
merged 1 commit into from
Jun 12, 2025

Conversation

amoghrajesh
Copy link
Contributor

I am attempting to fix an issue where seasoned developers are getting the first PR welcome messages from boring cyborg. Example:

apache/airflow#51568: new merge message

apache/airflow#51639: first PR message

The issue seems to be that prior to bf2ed3f#diff-2246d6bc20982f5f3edcd6f28b634c1af98104bd5700c154abc00209f9e1f454, github api was used to detect
the first contributor's, but its replaced with octokit now.

The GitHub Search API has a default ordering behaviour where

GitHub's Search API by default sorts results by defaulting to sorting by most recently created/updated first.

But octokit doesn't do that. So, using an explicit temporal constraint guarantees we only look at PRs that existed before the current one and it is a more fool-proof way too.

@amoghrajesh
Copy link
Contributor Author

CC @kaxil for reviews

@kaxil kaxil merged commit 6d555ae into kaxil:master Jun 12, 2025
4 checks passed
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 this pull request may close these issues.

2 participants