forked from openedx/.github
-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (26 loc) · 972 Bytes
/
commitlint.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
# Run commitlint on the commit messages in a pull request.
name: Lint Commit Messages
on:
# This action is meant to be used from other actions.
# https://docs.github.com/en/actions/learn-github-actions/reusing-workflows
- workflow_call
defaults:
run:
shell: bash
jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
# Fetch 100 commits. Should be enough?
fetch-depth: 100
- name: Download a local configuration file if needed
run: |
if [[ ! -f commitlint.config.js ]] && [[ ! -f commitlint.config.cjs ]]; then
echo "Downloading the default commitlint config from edx_lint"
wget --no-verbose -O commitlint.config.cjs https://raw.githubusercontent.com/openedx/edx-lint/HEAD/edx_lint/files/commitlint.config.js
fi
- name: Run commitlint
uses: wagoid/commitlint-github-action@v6