ci(sync): count only this repository's PRs toward the 100-PR cutoff

Open Beginner friendly
#131 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
github, github-actions
Domain
ci-cd

Research direction

Read .github/workflows/sync-master-into-dev.yml, especially the “Find the sync PR” step and its 100-PR completeness check. Update the query to restrict results to this repository’s owner-qualified head, then check that the existing label, author, and base filters still apply. Done when fork PRs with the same branch name do not count toward the cutoff.

Written by the indexing model from the issue text.

Description

Low priority.

In .github/workflows/sync-master-into-dev.yml, step "Find the sync PR", gh pr list --head "$BRANCH" also returns open PRs from forks whose branch has the same name. They count toward the limit=100 completeness check before the owner filter (headRepositoryOwner.login == $GITHUB_REPOSITORY_OWNER) drops them. So 100 such fork PRs would make the workflow fail on every push to master.

The failure is fail-safe (the workflow errors, it does not touch anything) and unlikely.

Fix

Query only this repository's PRs before the completeness check, with an owner-qualified head: REST GET /repos/{owner}/{repo}/pulls?head={owner}:{branch}&state=open. Keep the existing label, author and base checks on the result.

Found by Qodo on #129. Introduced by #126 (for #92).

Dominant language
C++
Stars
21
Forks
8
Avg merge
3h 42m
Merged PRs (30d)
22

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from webarkit/WebARKitLib

All issues in webarkit/WebARKitLib

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.