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

Enhance fetch_squash_merged_pr_numbers_from_github to Exclude Unmerged Closed Pull Requests #104

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shimx
Copy link

@shimx shimx commented Oct 7, 2024

@motemen

The fetch_squash_merged_pr_numbers_from_github method currently includes pull requests that have been closed without being merged.
This leads to the retrieval of pull request numbers that are not part of the merged codebase, causing potential inaccuracies in processing.

Changes Proposed

  • Update the GitHub search query within the method from is:closed to is:merged.
  • Ensure that only merged pull requests are fetched, excluding those that were merely closed without merging.
# Original query includes all closed pull requests
query_base = "repo:#{repository} is:pr is:closed"

# Updated query to include only merged pull requests
query_base = "repo:#{repository} is:pr is:merged"

Rationale

Using is:merged ensures that only pull requests that have been successfully merged are included. This change improves the accuracy of the retrieved data by excluding pull requests that were closed without merging.

References

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.

1 participant