Skip to content

Commit 07eeabf

Browse files
Add labeler configs
Signed-off-by: Stefan Brus <[email protected]>
1 parent b7785e8 commit 07eeabf

File tree

3 files changed

+75
-0
lines changed

3 files changed

+75
-0
lines changed

.github/keylabeler.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# KeywordLabeler app configuration. For more information check:
2+
# https://github.com/ZeWaka/KeywordLabeler#readme
3+
4+
# Determines if we search the title (optional). Defaults to true.
5+
matchTitle: true
6+
7+
# Determines if we search the body (optional). Defaults to true.
8+
matchBody: true
9+
10+
# Determines if label matching is case sensitive (optional). Defaults to true.
11+
caseSensitive: true
12+
13+
# Explicit keyword mappings to labels. Form of match:label. Required.
14+
labelMappings:
15+
"part:docs": "part:docs"
16+
"part:tests": "part:tests"
17+
"part:tooling": "part:tooling"
18+
"part:❓": "part:❓"
19+
"part:protobuf": "part:protobuf"
20+
"part:python": "part:python"

.github/labeler.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Configuration for the Labeler GitHub action, executed by
2+
# .github/workflows/labeler.yml.
3+
#
4+
# The basic syntax is [label]: [path patterns].
5+
#
6+
# For more details on the configuration please see:
7+
# https://github.com/marketplace/actions/labeler
8+
9+
"part:docs":
10+
- "**/*.md"
11+
- LICENSE
12+
13+
"part:tests":
14+
- "tests/**"
15+
16+
"part:tooling":
17+
- ".git*"
18+
- ".git*/**"
19+
- "**/*.toml"
20+
- "**/*.ini"
21+
- CODEOWNERS
22+
- MANIFEST.in
23+
- "*requirements*.txt"
24+
- setup.py
25+
- setup.cfg
26+
27+
"part:protobuf":
28+
- "proto/**"
29+
30+
"part:python":
31+
- "py/**"

.github/workflows/labeler.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Pull Request Labeler
2+
3+
# XXX: !!! SECURITY WARNING !!!
4+
# pull_request_target has write access to the repo, and can read secrets. We
5+
# need to audit any external actions executed in this workflow and make sure no
6+
# checked out code is run (not even installing dependencies, as installing
7+
# dependencies usually can execute pre/post-install scripts). We should also
8+
# only use hashes to pick the action to execute (instead of tags or branches).
9+
# For more details read:
10+
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
11+
on: [pull_request_target]
12+
13+
jobs:
14+
Label:
15+
permissions:
16+
contents: read
17+
pull-requests: write
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Labeler
21+
# Only use hashes, see the security comment above
22+
uses: actions/labeler@0776a679364a9a16110aac8d0f40f5e11009e327 # 4.0.4
23+
with:
24+
repo-token: "${{ secrets.GITHUB_TOKEN }}"

0 commit comments

Comments
 (0)