Skip to content

Commit 4a092cc

Browse files
committed
build: add workflow to auto-assign labels to PRs
1 parent 59b3412 commit 4a092cc

File tree

2 files changed

+96
-0
lines changed

2 files changed

+96
-0
lines changed

.github/.labeler.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#/
2+
# @license Apache-2.0
3+
#
4+
# Copyright (c) 2024 The Stdlib Authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#/
18+
19+
BLAS:
20+
- changed-files:
21+
- any-glob-to-any-file: '**/blas/**/*'
22+
23+
Math:
24+
- changed-files:
25+
- any-glob-to-any-file: '**/math/**/*'
26+
27+
Utilities:
28+
- changed-files:
29+
- any-glob-to-any-file: '**/utils/**/*'
30+
31+
C:
32+
- changed-files:
33+
- any-glob-to-any-file: '**/*.c'
34+
- any-glob-to-any-file: '**/*.h'
35+
36+
JavaScript:
37+
- changed-files:
38+
- any-glob-to-any-file: '**/*.js'
39+
40+
Documentation:
41+
- changed-files:
42+
- any-glob-to-any-file: '**/repl.txt'
43+
- any-glob-to-any-file: '**/README.md'
44+
45+

.github/workflows/labeler.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#/
2+
# @license Apache-2.0
3+
#
4+
# Copyright (c) 2024 The Stdlib Authors.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#/
18+
19+
# Workflow name:
20+
name: 'labeler'
21+
22+
# Workflow triggers:
23+
on:
24+
pull_request_target:
25+
26+
# Workflow jobs:
27+
jobs:
28+
29+
# Define a job which automatically labels pull requests based on the contents of the pull request:
30+
labeler:
31+
32+
# Define job name:
33+
name: 'Labeler'
34+
35+
# Define job permissions:
36+
permissions:
37+
contents: read
38+
pull-requests: write
39+
40+
# Define the type of virtual host machine:
41+
runs-on: ubuntu-latest
42+
43+
# Define the sequence of job steps:
44+
steps:
45+
46+
# Automatically label pull requests:
47+
- name: 'Automatically label pull requests'
48+
# Pin action to full length commit SHA
49+
uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
50+
with:
51+
configuration-path: .github/labeler.yml

0 commit comments

Comments
 (0)