Skip to content

detect upstream-merged PRs closed by commit#3

Open
fematarazzo wants to merge 2 commits into
f14XuanLv:mainfrom
fematarazzo:feature/detect-upstream-merged-prs
Open

detect upstream-merged PRs closed by commit#3
fematarazzo wants to merge 2 commits into
f14XuanLv:mainfrom
fematarazzo:feature/detect-upstream-merged-prs

Conversation

@fematarazzo
Copy link
Copy Markdown

Some projects (Vim, Linux, Git) don't use GitHub's native merge button — maintainers cherry-pick changes and close the PR with a reference commit. GitHub marks these as CLOSED with mergedAt: null, so they were being counted as rejected.

This adds timelineItems to the GraphQL query to fetch the ClosedEvent.closer on each PR. If the closer is a Commit, the PR was applied upstream and is now counted as merged in stats. The merged_date is set from closedAt in those cases.

Changes:

  • api/types.ts — added timelineItems field to GitHubPR
  • api/utils/github-api.ts — extended query to fetch ClosedEvent.closer.__typename
  • api/utils/inner_data_processor.ts — added isClosedByCommit() helper; mapPRStatus now returns merged for commit-closed PRs; processGitHubPRs uses closedAt as the merge date

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