Skip to content

Commit f028924

Browse files
authored
Add auto labeler workflow (opensearch-project#205)
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
1 parent 4c7be44 commit f028924

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

.github/labeler.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Default all changes to backporting to 1.x branch
2+
backport 1.x:
3+
- '*'
4+
- '*/*'
5+
- '*/**/*'
6+
- '*/**/**/*'
7+
- '*/**/**/**/*'
8+
- '*/**/**/**/**/*'
9+
- '*/**/**/**/**/**/*'
10+
- '*/**/**/**/**/**/**/*'
11+
- '*/**/**/**/**/**/**/**/*'
12+
- '*/**/**/**/**/**/**/**/**/*'
13+
- '.github/**/*'
14+
15+
# Adding "github actions" label to files in .github or its subdirectories
16+
github actions:
17+
- '.github/**/*'
18+
19+
# Adding "documentation" label to markdown files or updating release notes
20+
documentation:
21+
- '*.md'
22+
- 'release-notes/*'
23+
24+
# Adding a "dependencies" label when yarn.lock is updated
25+
dependencies:
26+
- 'yarn.lock'

.github/workflows/labeler.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: "Pull Request Labeler"
2+
on:
3+
pull_request_target:
4+
branches:
5+
- main
6+
types:
7+
- opened
8+
9+
jobs:
10+
label:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
steps:
16+
- name: GitHub App token
17+
id: github_app_token
18+
uses: tibdex/github-app-token@v1.5.0
19+
with:
20+
app_id: ${{ secrets.APP_ID }}
21+
private_key: ${{ secrets.APP_PRIVATE_KEY }}
22+
installation_id: 22958780
23+
- name: Label
24+
uses: actions/labeler@v4
25+
with:
26+
repo-token: ${{ steps.github_app_token.outputs.token }}

0 commit comments

Comments
 (0)