Skip to content

Commit

Permalink
build: override commitlint action
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorrusakov committed May 18, 2023
1 parent c760b2b commit 6bf32ab
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,37 @@
# Run commitlint on the commit messages in a pull request.

# Currently overrides openedx commitlint action to avoid bug with tsconfig.json by deleting it before running commitlint
# Read more here: https://github.com/wagoid/commitlint-github-action/issues/560

name: Lint Commit Messages

on:
- pull_request

jobs:
commitlint:
uses: openedx/.github/.github/workflows/commitlint.yml@master
runs-on: ubuntu-20.04
steps:
- name: Check out the repo
uses: actions/checkout@v3
with:
# Fetch 100 commits. Should be enough?
fetch-depth: 100

- name: Check for a local configuration file
id: check
run: |
if [[ ! -f commitlint.config.js ]]; then
echo "::set-output name=need::yes"
fi
- name: Download configuration if needed
if: steps.check.outputs.need == 'yes'
run: |
wget --no-verbose -O commitlint.config.js https://raw.githubusercontent.com/openedx/edx-lint/HEAD/edx_lint/files/commitlint.config.js
- name: Delete local tsconfig.js file
run: rm tsconfig.json

- name: Run commitlint
uses: wagoid/commitlint-github-action@v5

0 comments on commit 6bf32ab

Please sign in to comment.