generated from ansys/template
-
Notifications
You must be signed in to change notification settings - Fork 6
89 lines (79 loc) · 3.43 KB
/
label.yml
File metadata and controls
89 lines (79 loc) · 3.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Labeler
on:
pull_request:
push:
branches: [ main ]
paths:
- '../labels.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {} # Zero permissions can be granted at the workflow level if not all jobs require permissions.
# As a good rule of thumb, this normally includes jobs that don't use secrets.
jobs:
label-syncer:
name: Syncer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: micnncim/action-label-syncer@3abd5ab72fda571e69fffd97bd4e0033dd5f495c # v1.3.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
labeler:
name: Set labels
needs: [label-syncer]
permissions:
contents: read # Required to read packages
pull-requests: write # Required to allow PR to be amended
runs-on: ubuntu-latest
steps:
# Label based on modified files
- name: Label based on changed files
uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Label based on branch name
- uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf # v1.1.3
if: |
startsWith(github.event.pull_request.head.ref, 'doc') ||
startsWith(github.event.pull_request.head.ref, 'docs')
with:
labels: documentation
- uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf # v1.1.3
if: |
startsWith(github.event.pull_request.head.ref, 'maint') ||
startsWith(github.event.pull_request.head.ref, 'no-ci') ||
startsWith(github.event.pull_request.head.ref, 'ci')
with:
labels: maintenance
- uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf # v1.1.3
if: startsWith(github.event.pull_request.head.ref, 'feat')
with:
labels: |
enhancement
- uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf # v1.1.3
if: |
startsWith(github.event.pull_request.head.ref, 'fix') ||
startsWith(github.event.pull_request.head.ref, 'patch')
with:
labels: bug
commenter:
name: Commenter to suggest adding labels
runs-on: ubuntu-latest
steps:
- name: Suggest to add labels
uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0
# Execute only when no labels have been applied to the pull request
if: toJSON(github.event.pull_request.labels.*.name) == '{}'
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
Please add one of the following labels to add this contribution to the Release Notes :point_down:
- [bug](https://github.com/ansys/pysystem-coupling/pulls?q=label%3Abug+)
- [documentation](https://github.com/ansys/pysystem-coupling/pulls?q=label%3Adocumentation+)
- [enhancement](https://github.com/ansys/pysystem-coupling/pulls?q=label%3Aenhancement+)
- [good first issue](https://github.com/ansys/pysystem-coupling/pulls?q=label%3Agood+first+issue)
- [maintenance](https://github.com/ansys/pysystem-coupling/pulls?q=label%3Amaintenance+)
- [release](https://github.com/ansys/pysystem-coupling/pulls?q=label%3Arelease+)