Skip to content

Commit 9cdebcf

Browse files
committed
Add action to label content PRs
1 parent a74694e commit 9cdebcf

File tree

2 files changed

+112
-0
lines changed

2 files changed

+112
-0
lines changed

.github/labeler.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Add a Terraform label to changes under the related folders:
2+
#
3+
# Folder | Labels
4+
# --------------------------- | ------------------------------------------------
5+
# terraform | Terraform CE
6+
# terraform-cdk | None
7+
# terraform-docs-agents | Terraform agents
8+
# terraform-docs-common | HCP Terraform
9+
# terraform-enterprise | Terraform Enterprise
10+
# terraform-migrate | Terraform migrate
11+
# terraform-plugin-framework | TF Plugin Framework
12+
# terraform-plugin-log | None
13+
# terraform-plugin-mux | None
14+
# terraform-plugin-sdk | None
15+
# terraform-plugin-testing | None
16+
17+
Terraform CE:
18+
- any:
19+
- changed-files:
20+
- any-glob-to-any-file: [
21+
'content/terraform/**'
22+
]
23+
24+
Terraform agents:
25+
- any:
26+
- changed-files:
27+
- any-glob-to-any-file: [
28+
'content/terraform/**'
29+
]
30+
31+
HCP Terraform:
32+
- any:
33+
- changed-files:
34+
- any-glob-to-any-file: [
35+
'content/terraform/**'
36+
]
37+
38+
Terraform Enterprise:
39+
- any:
40+
- changed-files:
41+
- any-glob-to-any-file: [
42+
'content/terraform-enterprise/**'
43+
]
44+
45+
Terraform migrate:
46+
- any:
47+
- changed-files:
48+
- any-glob-to-any-file: [
49+
'content/terraform-docs-common/**'
50+
]
51+
52+
TF Plugin Framework:
53+
- any:
54+
- changed-files:
55+
- any-glob-to-any-file: [
56+
'content/terraform-plugin-framework/**'
57+
]
58+
59+
60+
# Add 'Vault' label to changes under 'content/vault'
61+
#
62+
# Label | Rule
63+
# --------------- | ------------------------------------------------------------
64+
# Vault | Default; applies to all doc updates
65+
# Vault IC update | Updates on "Important changes" related docs
66+
67+
Vault:
68+
- any:
69+
- changed-files:
70+
- any-glob-to-any-file: ['content/vault/**']
71+
72+
Vault IC:
73+
- any:
74+
- changed-files:
75+
- any-glob-to-any-file: [
76+
'content/vault/global/partials/important-changes/**',
77+
'content/vault/*/content/docs/updates/change-tracker.mdx',
78+
'content/vault/*/content/docs/updates/important-changes.mdx',
79+
'content/vault/*/content/docs/updates/lts-tracker.mdx'
80+
]
81+
82+
# Add 'WAF' label to changes under 'content/well-architected-framework'
83+
#
84+
# Label | Rule
85+
# --------------- | ------------------------------------------------------------
86+
# WAF | Default; applies to all doc updates
87+
88+
WAF:
89+
- any:
90+
- changed-files:
91+
- any-glob-to-any-file: ['well-architected-framework/**']
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Apply a product label based on the content files modified in the pull request
2+
# and configuration details in .github/labeler.yml.
3+
#
4+
# For more information, see: https://github.com/actions/labeler
5+
6+
name: 🏷️ Label content PRs
7+
8+
on: [pull_request_target]
9+
10+
jobs:
11+
12+
label-the-pr:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
steps:
18+
- uses: actions/labeler@v5
19+
with:
20+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
21+
sync-labels: true

0 commit comments

Comments
 (0)