Skip to content

Added Kotlin formatter plugin to Gradle [#60] #84

Added Kotlin formatter plugin to Gradle [#60]

Added Kotlin formatter plugin to Gradle [#60] #84

name: 'Commit Message Check'
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
jobs:
check-commit-message:
name: Check Commit Message
runs-on: ubuntu-latest
steps:
- name: Load PR commits
id: 'get-pr-commits'
uses: tim-actions/get-pr-commits@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Subject line length
uses: tim-actions/[email protected]
with:
commits: ${{ steps.get-pr-commits.outputs.commits }}
pattern: '^.{0,75}(\n.*)*$'
error: 'Subject too long (max 75)'
- name: Subject must be an imperative statement
if: ${{ success() || failure() }}
uses: tim-actions/[email protected]
with:
commits: ${{ steps.get-pr-commits.outputs.commits }}
pattern: '^(Added|Changed|Deprecated|Removed|Fixed|Security|Bump)'
error: 'Subject must start with one of: Added, Changed, Deprecated, Removed, Fixed, Security or Bump'
- name: Subject must reference an issue number
if: ${{ success() || failure() }}
uses: tim-actions/[email protected]
with:
commits: ${{ steps.get-pr-commits.outputs.commits }}
pattern: '^.*\[\#[\d]+\](\n.*)*$'
error: 'Subject must end with the issue number being addressed'
- name: Subject must not end with a sentence
if: ${{ success() || failure() }}
uses: tim-actions/[email protected]
with:
commits: ${{ steps.get-pr-commits.outputs.commits }}
pattern: '^.+[^.][ ]+\[\#[\d]+\](\n.*)*$'
error: 'Subject must not end with a period'
- name: Check Body Line Length
if: ${{ success() || failure() }}
uses: tim-actions/[email protected]
with:
commits: ${{ steps.get-pr-commits.outputs.commits }}
pattern: '^.+(\n.{0,79})*$'
error: 'Body line too long (max 79)'