-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c760b2b
commit 6bf32ab
Showing
1 changed file
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |