Skip to content

Stop counting draft PRs as open Dependicus items for review#63

Merged
anjoola merged 2 commits into
mainfrom
ag-cursor/skip-draft-prs-from-search-f07c
May 26, 2026
Merged

Stop counting draft PRs as open Dependicus items for review#63
anjoola merged 2 commits into
mainfrom
ag-cursor/skip-draft-prs-from-search-f07c

Conversation

@anjoola
Copy link
Copy Markdown
Contributor

@anjoola anjoola commented May 26, 2026

What's changing

The previous pass over-corrected: searchDependicusIssues was changed to drop every pull request returned by GitHub's issues endpoint, draft or not. That made the notification bot's job impossible — it couldn't see the open Dependicus PRs that legitimately needed review, and it kept honking :package: 54 open Dependicus PRs for Editor Media Management because the count was still being padded by drafts coming in from elsewhere.

This PR puts searchDependicusIssues back where it belongs:

  • Skip draft PRs only. A draft is explicitly not "open for review", so it shouldn't count.
  • Return ready-for-review PRs alongside regular issues. Each entry now carries an isPullRequest boolean so callers can tell them apart.
  • Still skip anything flagged as a draft (PR or otherwise) defensively, so non-PR draft items can't sneak through.

The reconciler picks up the new flag and uses it to keep treating a PR title as "something already exists, don't create a duplicate", while never mutating the PR via octokit.issues.update (which would clobber the PR's title and body, since GitHub gives PRs and issues a shared numbering scheme).

Tests

  • New test asserts a draft PR is dropped while a ready-for-review PR is returned with isPullRequest: true.
  • New test asserts non-PR matches are flagged with isPullRequest: false.
  • Existing tests updated for the new field.
  • Full suite passes (the unrelated HtmlWriter.test.ts failure on browser-bundle.asset.js reproduces on main without my changes — it needs a build first).

Waterfowl moment

The goose finally stops honking at perfectly good ducks paddling in the review pond. Only the ducklings still tucked under the wing get left alone.

Slack Thread

Open in Web Open in Cursor 

The previous pass over-corrected and made searchDependicusIssues drop
every pull request returned by GitHub's issues endpoint. That left
notification bots with no way to distinguish a fresh, ready-for-review PR
from a half-finished draft, and they kept honking '54 open Dependicus
PRs' because they were still reaching for the count via other channels.

Now the helper:

- Skips draft PRs only — a draft is explicitly not open for review.
- Returns ready-for-review PRs alongside regular issues, with a new
  isPullRequest flag so callers can tell them apart.
- Still skips anything flagged as a draft defensively.

The reconciler uses the new flag to keep treating PR titles as
'something already exists, don't create a duplicate', while never
mutating the PR via octokit.issues.update (which would clobber the PR's
title and body since GitHub gives PRs and issues a shared numbering
scheme).

So the goose finally stops honking at perfectly good ducks paddling in
the review pond — only the ducklings still tucked under the wing get
left alone.

Co-authored-by: Angela Gong <anjoola@users.noreply.github.com>
@anjoola anjoola self-assigned this May 26, 2026
@anjoola anjoola requested review from mblair and rzeng95 May 26, 2026 18:38
@anjoola anjoola marked this pull request as ready for review May 26, 2026 18:38
CI's lockfile-consistency check started failing because semver@7.8.1 and
undici@6.26.0 were published upstream and the ^7.3.5 / ^6.25.0 ranges
now resolve to the newer versions. Running 'mise update-all-lockfiles'
produces only this lockfile refresh — no source changes.

Co-authored-by: Angela Gong <anjoola@users.noreply.github.com>
@anjoola anjoola merged commit 91314f0 into main May 26, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants