-
Notifications
You must be signed in to change notification settings - Fork 15
36 lines (33 loc) · 1015 Bytes
/
on-pr-open.yml
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
# This workflow runs when a pull request is opened.
#
# - Job 1:
# - Check the PR title follows conventional commit spec.
# - Job 2:
# - Label the PR based on the rules in .github/pr-labeler.yml
name: Open Pull Request Workflow
on:
pull_request:
branches:
- master
types:
- opened
jobs:
good-pr-title:
name: Ensure Conventional PR Title
runs-on: ubuntu-latest
steps:
- name: Ensure PR title follows conventional commits specification
uses: aslafy-z/conventional-pr-title-action@v3
with:
success-state: Conventional commits compliant title detected.
failure-state: Pull request title is not conventional commits compliant!
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pr-labeler:
name: Label Pull Request from Branch Name
runs-on: ubuntu-latest
steps:
- name: Apply Labels to PR
uses: TimonVS/pr-labeler-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}