forked from patternfly/patternfly-elements
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (48 loc) · 1.47 KB
/
Copy pathlabel.yml
File metadata and controls
56 lines (48 loc) · 1.47 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
# This workflow will triage pull requests and apply a label based on the
# paths that are modified in the pull request.
#
# To view the configuration, go to: .github/labeler.yml
name: Auto-label PRs
on:
pull_request:
types:
- opened
- convert_to_draft
- ready_for_review
pull_request_review:
types: [submitted]
env:
TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# Separate jobs can run concurrently
jobs:
triage:
name: Apply triage labels
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v3
with:
repo-token: ${{ env.TOKEN }}
mergeable:
name: Flag a PR ready to merge
runs-on: ubuntu-latest
steps:
- name: Flag ready to merge
# Add a ready to merge label if the PR is approved and the test suite has passed
if: |
!contains(github.event.pull_request.labels.*.name, 'on hold') &&
!contains(github.event.pull_request.labels.*.name, 'work in progress') &&
github.event.review.state == 'approved'
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ env.TOKEN }}
labels: ready to merge
in-progress:
name: Flag a PR as work-in-progress if in draft
runs-on: ubuntu-latest
steps:
- name: Flag work in progress
if: github.event.pull_request.draft == true
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ env.TOKEN }}
labels: work in progress