diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000000..970336ee4b --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,91 @@ +# Add a Terraform label to changes under the related folders: +# +# Folder | Labels +# --------------------------- | ------------------------------------------------ +# terraform | Terraform CE +# terraform-cdk | None +# terraform-docs-agents | Terraform agents +# terraform-docs-common | HCP Terraform +# terraform-enterprise | Terraform Enterprise +# terraform-migrate | Terraform migrate +# terraform-plugin-framework | TF Plugin Framework +# terraform-plugin-log | None +# terraform-plugin-mux | None +# terraform-plugin-sdk | None +# terraform-plugin-testing | None + +Terraform CE: +- any: + - changed-files: + - any-glob-to-any-file: [ + 'content/terraform/**' + ] + +Terraform agents: +- any: + - changed-files: + - any-glob-to-any-file: [ + 'content/terraform-docs-agents/**' + ] + +HCP Terraform: +- any: + - changed-files: + - any-glob-to-any-file: [ + 'content/terraform-docs-common/**' + ] + +Terraform Enterprise: +- any: + - changed-files: + - any-glob-to-any-file: [ + 'content/terraform-enterprise/**' + ] + +Terraform migrate: +- any: + - changed-files: + - any-glob-to-any-file: [ + 'content/terraform-migrate/**' + ] + +TF Plugin Framework: +- any: + - changed-files: + - any-glob-to-any-file: [ + 'content/terraform-plugin-framework/**' + ] + + +# Add 'Vault' label to changes under 'content/vault' +# +# Label | Rule +# --------------- | ------------------------------------------------------------ +# Vault | Default; applies to all doc updates +# Vault IC update | Updates on "Important changes" related docs + +Vault: +- any: + - changed-files: + - any-glob-to-any-file: ['content/vault/**'] + +Vault IC: +- any: + - changed-files: + - any-glob-to-any-file: [ + 'content/vault/global/partials/important-changes/**', + 'content/vault/*/content/docs/updates/change-tracker.mdx', + 'content/vault/*/content/docs/updates/important-changes.mdx', + 'content/vault/*/content/docs/updates/lts-tracker.mdx' + ] + +# Add 'WAF' label to changes under 'content/well-architected-framework' +# +# Label | Rule +# --------------- | ------------------------------------------------------------ +# WAF | Default; applies to all doc updates + +WAF: +- any: + - changed-files: + - any-glob-to-any-file: ['well-architected-framework/**'] \ No newline at end of file diff --git a/.github/workflows/label-content-prs.yml b/.github/workflows/label-content-prs.yml new file mode 100644 index 0000000000..c2561da042 --- /dev/null +++ b/.github/workflows/label-content-prs.yml @@ -0,0 +1,21 @@ +# Apply a product label based on the content files modified in the pull request +# and configuration details in .github/labeler.yml. +# +# For more information, see: https://github.com/actions/labeler + +name: 🏷️ Label content PRs + +on: [pull_request_target] + +jobs: + + label-the-pr: + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + steps: + - uses: actions/labeler@v5 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + sync-labels: true \ No newline at end of file