From 6b840f903e4f21d6dca53e12016175a1f44a7c98 Mon Sep 17 00:00:00 2001 From: Ethan Uppal <113849268+ethanuppal@users.noreply.github.com> Date: Tue, 28 Jan 2025 02:02:54 -0500 Subject: [PATCH] ci: Automate PR labeling (#17) --- .github/labels.yaml | 21 +++++++++++++++++++++ .github/workflows/labeler.yaml | 15 +++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .github/labels.yaml create mode 100644 .github/workflows/labeler.yaml diff --git a/.github/labels.yaml b/.github/labels.yaml new file mode 100644 index 0000000..853a0b1 --- /dev/null +++ b/.github/labels.yaml @@ -0,0 +1,21 @@ +"Code: Verilator": + - changed-files: + - any-glob-to-any-file: "verilator/**" + +"Code: Verilog Support": + - changed-files: + - any-glob-to-any-file: "verilog-support/**" + +"Code: Spade Support": + - changed-files: + - any-glob-to-any-file: "spade-support/**" + +"Infra: CI": + - changed-files: + - any-glob-to-any-file: ".github/workflows/*" + - any-glob-to-any-file: ".github/labels.yaml" + +"Documentation": + - changed-files: + - any-glob-to-any-file: "**/*.md" + - any-glob-to-any-file: "assets/**" diff --git a/.github/workflows/labeler.yaml b/.github/workflows/labeler.yaml new file mode 100644 index 0000000..63ff762 --- /dev/null +++ b/.github/workflows/labeler.yaml @@ -0,0 +1,15 @@ +name: "Pull Request Labeler" +on: + - pull_request_target + +jobs: + labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/labeler@v5 + with: + configuration-path: ".github/labels.yaml"