mirror of
https://github.com/jeffvli/feishin.git
synced 2026-11-20 00:51:26 -08:00
ci: skip weblate commits and fetch pre-push tip
Weblate translation pushes are not conventional, so ignore them. After a force-push the pre-push tip is unreachable from any ref, so commitlint cannot resolve the range without an explicit fetch.
This commit is contained in:
1 parent
50420be0c9
commit
1e294c77f8
3 files changed
+7
No files matched your search
@@ -38,6 +38,10 @@ jobs:
|
||||
if: github.event_name == 'pull_request'
|
||||
run: pnpm exec commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
|
||||
|
||||
- name: Fetch pre-push tip (unreachable after force-push)
|
||||
if: github.event_name == 'push' && github.event.before != '0000000000000000000000000000000000000000'
|
||||
run: git fetch origin ${{ github.event.before }}
|
||||
|
||||
- name: Lint push commits
|
||||
if: github.event_name == 'push'
|
||||
run: |
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/** @type {import('@commitlint/types').UserConfig} */
|
||||
const config = {
|
||||
extends: ['@commitlint/config-conventional'],
|
||||
ignores: [(commit) => commit.includes('Translated using Weblate')],
|
||||
rules: {
|
||||
'scope-enum': [
|
||||
2,
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
Conventional Commits for history that can feed release notes and scoped changelogs. Enforced by commitlint (`commitlint.config.mjs`) and the Test workflow.
|
||||
|
||||
Automatic Weblate translation commits (subject `Translated using Weblate`) are skipped via the config's `ignores` list, since they do not follow the conventional format.
|
||||
|
||||
## Format
|
||||
|
||||
```
|
||||
|
||||
Reference in new issue
Block a user