Commit Graph
6 Commits
Author SHA1 Message Date
Chandler Carruth b7ea32c3a4 Support re-checking, overriding, and requiring the PR dependency check (#8120)
There are a world of reasons why the dependent state check can be wrong
or get stuck. We need ways to manually override inaccurate findings or
trigger a re-check when things change.

Overriding: removing the `dependent` label causes the job to run and
immediately report success to unblock merging. The `workflow_dispatch`
can also run with an `override` mode. This requires adding more tracked
state in the form of _ignored_ PRs that would otherwise be considered
dependencies.

Re-checking: the job now makes the status have a `Details` link that can
be used to re-run it, and editing the PR description also re-runs it.
However, adding the `dependent` label or doing an explicit
`workflow_dispatch` with mode `recheck` goes further: it drops any
overrides and recomputes the open dependencies from the current commits,
keeping the record of merged dependencies.

Hiding the comment still clears _all_ of the tracked state for the PR,
so the next check starts completely from scratch.

Lastly, this extends the workflow to support being marked as required by
letting it run in the merge queue and report success.

Works to keep the changes to `_process_pr` organized so that we first
collect and analyze the state, and only at the end mutate the PR's state
to the new configuration. Adds relevant unit tests for the new features.
Also added some basic documentation of this so that folks have a
reference when it has issues.

I considered the alternative of parsing mentions out of comments
(dependabot-style), but it ended up significantly more complicated and
brittle, so instead went with basing each change on an operation on the
PR that is already mechanically available.

Assisted-by: Antigravity with Opus
2026-11-13 05:19:44 +00:00
Chandler Carruth 3ef128ac91 Switch to Astral Python tools: ruff and ty (#7243)
This replaces black, flake8, and mypy with the more modern and efficient
tools `ruff` and `ty` from Astral.

Assisted-by: Antigravity with Gemini
2026-05-29 22:56:27 +00:00
Richard Smith c6253b93f9 Don't identify sibling PRs as dependencies. (#7145)
Also, when constructing the diff link, make sure we pick a commit that's
on the current PR's branch as the starting point. github wasn't able to
properly process the links we were creating before, if the last
dependency PR had commits that weren't on the current PR.

Fix a couple of tests that were broken by a prior change.

Assisted-by: Gemini via Antigravity
2026-05-02 01:12:04 +00:00
Chandler Carruth bb228dbcfb Fix computing the maximum merged PR (#7127)
Assisted-by: Antigravity with Gemini
2026-04-28 18:15:43 +00:00
Chandler Carruth 0e308e0739 Switch to a manual check status for dependent PRs (#7117)
The labeling script will now directly set a check status for the PR as
`pending` when it marks something as dependent, and clear it when it no
longer is. This emulates a check that starts when marked as dependent
and runs until the last dependency lands, allowing automerge and other
workflows to work cleanly.

The branch protection rule will have to be updated to the new spelling.

This should do the same key thing as #7113, but integrated to the new
script.

Assisted-by: Antigravity with Gemini
2026-04-28 02:01:57 +00:00
Chandler Carruth 824d7e3c83 Create a GitHub action to automatically handle dependent PRs (#7101)
This should detect when a PR has a dependency of another open PR and add
a comment and label describing it. The comment will even do a
best-effort to compute the best starting commit for review.

Whenever PRs are closed, it will also scan the open depnedent PRs and
try to either remove the PRs in the comment or if it reaches zero the
label.

It works to update a single comment on a PR rather than adding more
comments.

Assisted-by: Antigravity with Gemini
2026-04-24 19:52:07 +00:00