diff --git a/.github/labeler-pull-request-triage.yml b/.github/labeler-pull-request-triage.yml deleted file mode 100644 index 5617f62d0..000000000 --- a/.github/labeler-pull-request-triage.yml +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) HashiCorp, Inc. -# SPDX-License-Identifier: MPL-2.0 - -dependencies: - - 'vendor/**/*' -documentation: - - '**/*.md' - - 'examples/**/*' - - 'website/**/*' -provider: - - '.github/**/*' - - '.gitignore' - - '.go-version' - - '*.md' - - 'docs/**/*' - - 'GNUmakefile' - - 'main.go' - - 'vsphere/**/*' - - 'website/docs/index.html.markdown' diff --git a/.github/labeler-pull-requests.yml b/.github/labeler-pull-requests.yml new file mode 100644 index 000000000..575ee7861 --- /dev/null +++ b/.github/labeler-pull-requests.yml @@ -0,0 +1,42 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +chore: + - changed-files: + - any-glob-to-any-file: + - ".github/**/*" + - ".gitignore" + - ".release" + - "scripts/**/*" + - ".go-version" + - "go.mod" + - "go.sum" +dependencies: + - changed-files: + - any-glob-to-any-file: + - ".go-version" + - "go.mod" + - "go.sum" +documentation: + - changed-files: + - any-glob-to-any-file: + - "**/*.md" + - "website/**/*" +github-actions: + - changed-files: + - any-glob-to-any-file: + - ".github/workflows/**/*" +needs-review: + - changed-files: + - any-glob-to-any-file: + - "**" +provider: + - changed-files: + - any-glob-to-any-file: + - "acctests/**/*" + - "vsphere/**/*" + - ".go-version" + - "GNUmakefile" + - "go.mod" + - "go.sum" + - "main.go" diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 3fed1a15b..724ecc66a 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -1,11 +1,25 @@ -name: "Pull Request Triage" +name: "Pull Request Labels" -on: [pull_request_target] +on: + pull_request_target: + branches: + - main + types: + - opened + - synchronize + - reopened + - edited + - ready_for_review jobs: - triage: + labeler: + name: Labeler runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write steps: + - name: Apply Labels - uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0 with: configuration-path: .github/labeler-pull-request-triage.yml