Skip to content

Commit 14072c3

Browse files
authored
Merge PR #108 from it-at-m/105_fixLintingErrors
Added Lint Fixing and Commit fixes
2 parents 4d6b188 + 1b98641 commit 14072c3

3 files changed

Lines changed: 26 additions & 2 deletions

File tree

.github/workflows/action-superlint.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
permissions:
16-
contents: read
16+
# to be able to commit
17+
contents: write
1718
packages: read
1819
# To report GitHub Actions status checks
1920
statuses: write
@@ -31,3 +32,22 @@ jobs:
3132
env:
3233
# To report GitHub Actions status checks
3334
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
# Fixing Lint Errors for JSONC, MARKDOWN_PRETTIER, MARKDOWN and YAML_PRETTIER
36+
FIX_JSONC_PRETTIER: true
37+
FIX_MARKDOWN_PRETTIER: true
38+
FIX_MARKDOWN: true
39+
FIX_YAML_PRETTIER: true
40+
41+
- name: Commit and push linting fixes
42+
# Run only on:
43+
# - Pull requests
44+
# - Not on the default branch
45+
if: >
46+
github.event_name == 'pull_request' &&
47+
github.ref_name != github.event.repository.default_branch
48+
uses: stefanzweifel/git-auto-commit-action@v5
49+
with:
50+
branch: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref }}
51+
commit_message: "chore: fix linting issues [skip ci]"
52+
commit_user_name: super-linter
53+
commit_user_email: super-linter@super-linter.dev

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,3 +185,7 @@ nbdist/
185185
*.njsproj
186186
*.sln
187187
*.sw?
188+
189+
# Superlinter output
190+
github_conf/
191+
super-linter-output/

docs/actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ or `curl` are missing.
181181
and jobs, based on the files modified by pull request, on a feature branch, or by the recently pushed commits.
182182

183183
<!-- prettier-ignore -->
184-
```yml
184+
```yaml
185185
- uses: it-at-m/lhm_actions/action-templates/actions/action-filter@main
186186
id: changes
187187
with:

0 commit comments

Comments
 (0)