Skip to content

Commit 6b1a09d

Browse files
authored
Auto label PRs that may require extra checks (rust-lang#2785)
Add a new workflow that automatically adds the label "Z-BenchCI" to PRs that touch compiler, toolchain, dependencies and driver files that invoke our dependencies. I also removed the label from the toolchain update job since this workflow will add the label once the PR is created.
1 parent e95a7bb commit 6b1a09d

File tree

3 files changed

+46
-1
lines changed

3 files changed

+46
-1
lines changed

.github/labeler.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright Kani Contributors
2+
# SPDX-License-Identifier: Apache-2.0 OR MIT
3+
#
4+
# Configuration for auto-labeling PRs
5+
#
6+
# Note that we enable dot, so "**" matches all files in a folder
7+
8+
Z-BenchCI:
9+
- kani-compiler/**
10+
- rust-toolchain.toml
11+
- kani-dependencies
12+
- kani-driver/src/call-*
13+
- Cargo.lock
14+
- cprover_bindings/**
15+
- library/**
16+

.github/workflows/labeler.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Copyright Kani Contributors
2+
# SPDX-License-Identifier: Apache-2.0 OR MIT
3+
#
4+
# Auto label PRs based on the files that were changed
5+
#
6+
# This PR runs on `pull_request_target` because it needs extra write permission.
7+
#
8+
# Thus, we keep this workflow minimal, and the only action used here is from a
9+
# verified publisher.
10+
#
11+
# See <https://github.com/actions/labeler/issues/121> for more details.
12+
13+
name: Auto Label
14+
on: pull_request_target
15+
16+
jobs:
17+
auto-label:
18+
permissions:
19+
contents: read
20+
pull-requests: write
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout Kani
24+
uses: actions/checkout@v3
25+
26+
- name: Label PR
27+
uses: actions/labeler@v4
28+
with:
29+
dot: true
30+

.github/workflows/toolchain-upgrade.yml

-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ jobs:
7474
branch: toolchain-${{ env.next_toolchain_date }}
7575
delete-branch: true
7676
title: 'Automatic toolchain upgrade to nightly-${{ env.next_toolchain_date }}'
77-
labels: Z-BenchCI
7877
body: >
7978
Update Rust toolchain from nightly-${{ env.current_toolchain_date }} to
8079
nightly-${{ env.next_toolchain_date }} without any other source changes.

0 commit comments

Comments
 (0)