Skip to content

Commit dd95496

Browse files
authored
Merge branch 'main' into CURA-12236_expose-preferred-travel-area-in-combing
2 parents 3244e4f + dd8f8b8 commit dd95496

File tree

1 file changed

+7
-36
lines changed

1 file changed

+7
-36
lines changed
Lines changed: 7 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,17 @@
11
name: lint-formatter
22

33
on:
4-
workflow_dispatch:
5-
64
push:
75
paths:
86
- 'include/**/*.h*'
97
- 'src/**/*.c*'
108

9+
pull_request:
10+
types: [ opened ]
11+
paths:
12+
- 'include/**/*.h*'
13+
- 'src/**/*.c*'
14+
1115
jobs:
1216
lint-formatter-job:
13-
name: Auto-apply clang-format
14-
15-
runs-on: ubuntu-latest
16-
steps:
17-
- name: Checkout
18-
uses: actions/checkout@v4
19-
20-
- uses: greguintow/get-diff-action@v7
21-
with:
22-
PATTERNS: |
23-
include/**/*.h*
24-
src/**/*.c*
25-
26-
- name: Setup Python and pip
27-
if: env.GIT_DIFF && !env.MATCHED_FILES # If nothing happens with python and/or pip after, the clean-up crashes.
28-
uses: actions/setup-python@v5
29-
with:
30-
python-version: 3.11.x
31-
cache: 'pip'
32-
cache-dependency-path: .github/workflows/requirements-linter.txt
33-
34-
- name: Install Python requirements for runner
35-
if: env.GIT_DIFF && !env.MATCHED_FILES
36-
run: pip install -r .github/workflows/requirements-linter.txt
37-
38-
- name: Format file
39-
if: env.GIT_DIFF && !env.MATCHED_FILES
40-
run: |
41-
clang-format -i ${{ env.GIT_DIFF_FILTERED }}
42-
43-
- uses: stefanzweifel/git-auto-commit-action@v4
44-
if: env.GIT_DIFF && !env.MATCHED_FILES
45-
with:
46-
commit_message: "Applied clang-format."
17+
uses: ultimaker/cura-workflows/.github/workflows/lint-formatter.yml@main

0 commit comments

Comments
 (0)