Skip to content

Commit 1bbbd39

Browse files
Add CLA Assistant retry workflow
1 parent cb92b6f commit 1bbbd39

6 files changed

Lines changed: 439 additions & 0 deletions

File tree

.cargo/config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ rustflags = ["--cfg", "tokio_unstable"]
55
bump-versions = "run -p upgrade-version --"
66
llm = "run --package xtask-llm-benchmark --bin llm_benchmark --"
77
ci = "run -p ci --"
8+
xtask = "run -p xtask --"
89
regen = "run -p regen --"
910
smoketest = "ci smoketests --"
1011
smoketests = "smoketest"
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Retry CLA Assistant
2+
3+
# CLA Assistant publishes `license/cla` as a commit status, not a check run.
4+
# If its webhook handler misses a PR update, GitHub branch protection can wait
5+
# forever even after every real CI check has passed. This workflow nudges CLA
6+
# Assistant only when that status is the sole remaining non-green signal.
7+
#
8+
# SECURITY: This workflow uses pull_request_target so it can inspect PR status
9+
# for forks, but it must never check out, build, or execute code from the PR.
10+
11+
on:
12+
pull_request_target:
13+
types: [opened, reopened, synchronize, ready_for_review]
14+
workflow_run:
15+
workflows:
16+
- CI
17+
- Internal Tests
18+
- CodeQL
19+
- Check merge labels
20+
- Review Checks
21+
types: [completed]
22+
workflow_dispatch:
23+
inputs:
24+
pr_number:
25+
description: "Pull request number to check"
26+
required: true
27+
type: number
28+
29+
permissions:
30+
actions: read
31+
checks: read
32+
contents: read
33+
pull-requests: read
34+
statuses: read
35+
36+
concurrency:
37+
group: retry-cla-assistant-${{ github.event.pull_request.number || github.event.inputs.pr_number || github.run_id }}
38+
cancel-in-progress: false
39+
40+
jobs:
41+
retry-cla:
42+
name: Retry CLA Assistant if it is the only blocker
43+
runs-on: ubuntu-latest
44+
45+
steps:
46+
- name: Check out trusted base code
47+
uses: actions/checkout@v4
48+
with:
49+
ref: ${{ github.event.repository.default_branch }}
50+
51+
- uses: dsherret/rust-toolchain-file@v1
52+
53+
- uses: Swatinem/rust-cache@v2
54+
with:
55+
cache-all-crates: true
56+
57+
- name: Recheck CLA Assistant
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
INPUT_PR_NUMBER: ${{ inputs.pr_number }}
61+
run: cargo xtask retry-cla-assistant

Cargo.lock

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ members = [
6666
"tools/generate-client-api",
6767
"tools/gen-bindings",
6868
"tools/regen",
69+
"tools/xtask",
6970
"tools/xtask-llm-benchmark",
7071
"crates/bindings-typescript/test-app/server",
7172
"crates/bindings-typescript/test-react-router-app/server",

tools/xtask/Cargo.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[package]
2+
name = "xtask"
3+
version = "0.1.0"
4+
edition.workspace = true
5+
6+
[dependencies]
7+
anyhow.workspace = true
8+
chrono = { workspace = true, features = ["clock"] }
9+
clap.workspace = true
10+
reqwest = { workspace = true, features = ["blocking", "json"] }
11+
serde.workspace = true
12+
serde_json.workspace = true

0 commit comments

Comments
 (0)