-
Notifications
You must be signed in to change notification settings - Fork 4
34 lines (32 loc) · 1.08 KB
/
Copy pathpr-title-lint.yml
File metadata and controls
34 lines (32 loc) · 1.08 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
---
name: PR Title Lint
on: # yamllint disable-line rule:truthy
workflow_call:
inputs:
requested:
description: Run this workflow for an authorized /citest command
required: true
type: boolean
pr_title:
description: Pull request title to validate
required: true
type: string
permissions:
contents: read
pull-requests: read
jobs:
commit-checks:
if: inputs.requested || github.event_name != 'issue_comment'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
fetch-depth: 0
- name: Install pr_title_lint.py
run: curl -o pr_title_lint.py https://raw.githubusercontent.com/linux-system-roles/auto-maintenance/main/pr_title_lint.py
- name: Run pr_title_lint.py on PR title
env:
PR_TITLE: ${{ inputs.pr_title || github.event.pull_request.title }}
# Echo from env variable to avoid bash errors with extra characters
run: python3 pr_title_lint.py "${PR_TITLE}"