Skip to content

fix: set request in hook context before send request, in case of error #168

fix: set request in hook context before send request, in case of error

fix: set request in hook context before send request, in case of error #168

Workflow file for this run

name: Check PR title
on:
pull_request:
types:
- opened
- reopened
- edited
- synchronize
permissions:
pull-requests: read
issues: read
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: checkout
uses: actions/checkout@v4
- name: Cache node modules
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Check if PR title follows conventional commit guidelines
env:
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
npm i -g @commitlint/[email protected] @commitlint/[email protected]
echo "$PR_TITLE" | commitlint