-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DX: lint PRs with
@compwa/commitlint-config
(#186)
* FEAT: automatically update `pr-linting.yml` * FIX: update `release_drafter` module description
- Loading branch information
Showing
10 changed files
with
51 additions
and
25 deletions.
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,5 +1,3 @@ | ||
# cspell:ignore agilepathway commitlint kode | ||
|
||
name: PR linting | ||
on: | ||
pull_request: | ||
|
@@ -16,7 +14,7 @@ jobs: | |
name: Check labels | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: docker://agilepathway/pull-request-label-checker:latest | ||
- uses: docker://agilepathway/pull-request-label-checker:latest # cspell:ignore agilepathway | ||
with: | ||
any_of: >- | ||
🐛 Bug,✨ Feature,⚙️ Enhancement,⚠️ Interface,❗ Behavior,📝 Docs,🔨 Maintenance,🖱️ DX | ||
|
@@ -28,5 +26,8 @@ jobs: | |
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: npm install @commitlint/config-conventional | ||
- uses: JulienKode/[email protected] | ||
- run: npm install @compwa/commitlint-config | ||
- name: Create commitlint config | ||
run: | | ||
echo "module.exports = {extends: ['@compwa/commitlint-config']}" > commitlint.config.js | ||
- uses: JulienKode/[email protected] # cspell:ignore kode |
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 |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
*.xml | ||
*.yaml | ||
*.yml | ||
commitlint.config.js | ||
|
||
# Build files | ||
*.egg-info/ | ||
|
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../.github/workflows/pr-linting.yml |
This file was deleted.
Oops, something went wrong.
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,6 +1,16 @@ | ||
"""Check :file:`commitlint.config.js` config file.""" | ||
from repoma.utilities import CONFIG_PATH, update_file | ||
"""Remove :file:`commitlint.config.js` config file. | ||
See https://github.com/ComPWA/repo-maintenance/issues/177. | ||
""" | ||
import os | ||
|
||
from repoma.errors import PrecommitError | ||
|
||
|
||
def main() -> None: | ||
update_file(CONFIG_PATH.commitlint, in_template_folder=True) | ||
path = "commitlint.config.js" | ||
if not os.path.exists(path): | ||
return | ||
os.remove(path) | ||
msg = f"Remove outdated {path}" | ||
raise PrecommitError(msg) |
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
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
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