|
|
@@ -0,0 +1,37 @@
|
|
|
+# Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
|
+# Exceptions. See /LICENSE for license information.
|
|
|
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
+
|
|
|
+name: 'Auto label PRs'
|
|
|
+on:
|
|
|
+ pull_request_target:
|
|
|
+ types: [opened, ready_for_review]
|
|
|
+
|
|
|
+jobs:
|
|
|
+ assign_reviewer:
|
|
|
+ runs-on: ubuntu-latest
|
|
|
+ steps:
|
|
|
+ - id: filter
|
|
|
+ uses: dorny/paths-filter@v2
|
|
|
+ with:
|
|
|
+ filters: |
|
|
|
+ explorer:
|
|
|
+ - 'explorer/**'
|
|
|
+ toolchain:
|
|
|
+ - 'toolchain/**'
|
|
|
+
|
|
|
+ - id: explorer
|
|
|
+ if: steps.filter.outputs.explorer == 'true'
|
|
|
+ run: |
|
|
|
+ gh pr edit "${PR}" --add-label "explorer"
|
|
|
+ env:
|
|
|
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
+ PR: ${{ github.event.pull_request.html_url }}
|
|
|
+
|
|
|
+ - id: assign-toolchain
|
|
|
+ if: steps.filter.outputs.toolchain == 'true'
|
|
|
+ run: |
|
|
|
+ gh pr edit "${PR}" --add-label "toolchain"
|
|
|
+ env:
|
|
|
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
+ PR: ${{ github.event.pull_request.html_url }}
|