Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 28 additions & 7 deletions .github/workflows/lint-commits.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022 leha-bot and contributors
# SPDX-FileCopyrightText: 2022-2025 leha-bot and contributors
#
# SPDX-License-Identifier: BSL-1.0 OR BlueOak-1.0.0

Expand All @@ -10,20 +10,41 @@ on:
- '**'
pull_request:
branches:
- master
- dev
- 'master'
- 'dev'

jobs:
lint:
name: 'Lint'
lint-commits:
name: 'Lint commits'

runs-on: ubuntu-latest
strategy:
matrix:
system:
- ubuntu-24.04

runs-on: ${{ matrix.system }}

steps:
# Checkout whole repository
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Lint
# Get parent branch name for comparing on `push` event
- name: Get branch (push)
if: github.event_name == 'push'
run: |
echo "branch=remotes/origin/${{ github.event.repository.default_branch }}" >> $GITHUB_ENV

# Get parent branch name for comparing on `pull_request` event
- name: Get branch (pull_request)
if: github.event_name == 'pull_request'
run: |
echo "branch=remotes/origin/${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV

# Run commit linter from parent branch
- name: Lint commits
uses: remarkablemark/commitlint@v1
with:
from: ${{ env.branch }}
Loading