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
This commit is contained in:
Chandler Carruth
2026-04-24 19:52:07 +00:00
committed by GitHub
parent 2a059366a7
commit 824d7e3c83
5 changed files with 1015 additions and 3 deletions
+10 -3
View File
@@ -12,7 +12,7 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
import argparse
from collections.abc import Generator
import os
from typing import Optional
from typing import Optional, cast
# https://pypi.org/project/gql/
import gql # type: ignore
@@ -55,9 +55,16 @@ class Client:
)
self._client = gql.Client(transport=transport)
def execute(self, query: str) -> dict:
def execute(
self, query: str, variable_values: Optional[dict] = None
) -> dict:
"""Runs a query."""
return self._client.execute(gql.gql(query)) # type: ignore
return cast(
dict,
self._client.execute(
gql.gql(query), variable_values=variable_values
),
)
def execute_and_paginate(
self,