mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 11:21:05 +01:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user