chore: add pre-commit hooks

chore: add pre-commit hooks

chore: add pre-commit hooks

chore: add pre-commit hooks

chore: add pre-commit hooks
This commit is contained in:
Nanne Baars
2023-12-06 16:10:19 +01:00
committed by Nanne Baars
parent d913967ec5
commit 17acef57b4
305 changed files with 1573 additions and 1656 deletions

2
.github/FUNDING.yml vendored
View File

@ -1 +1 @@
custom: https://owasp.org/donate/?reponame=www-project-webgoat&title=OWASP+WebGoat
custom: https://owasp.org/donate/?reponame=www-project-webgoat&title=OWASP+WebGoat

View File

@ -12,4 +12,3 @@ updates:
directory: "/"
schedule:
interval: "weekly"

View File

@ -51,4 +51,4 @@ jobs:
file: ./Dockerfile_desktop
push: false
build-args: |
webgoat_version=${{ env.WEBGOAT_MAVEN_VERSION }}
webgoat_version=${{ env.WEBGOAT_MAVEN_VERSION }}

29
.github/workflows/pre-commit.yaml vendored Normal file
View File

@ -0,0 +1,29 @@
name: Pre-commit check
on:
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
pre-commit:
name: Pre-commit check
runs-on: ubuntu-latest
steps:
- name: Checkout git repository
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Pre-commit checks
uses: pre-commit/action@v3.0.0
- name: pre-commit-ci-lite
uses: pre-commit-ci/lite-action@v1.0.1
if: always()

View File

@ -46,7 +46,7 @@ jobs:
files: |
target/webgoat-${{ env.WEBGOAT_MAVEN_VERSION }}.jar
body: |
## Version ${{ github.ref_name }}
## Version ${{ github.ref_name }}
### New functionality
@ -55,8 +55,8 @@ jobs:
### Bug fixes
- [#743 - Character encoding errors](https://github.com/WebGoat/WebGoat/issues/743)
Full change log: https://github.com/WebGoat/WebGoat/compare/${{ github.ref_name }}...${{ github.ref_name }}
Full change log: https://github.com/WebGoat/WebGoat/compare/${{ github.ref_name }}...${{ github.ref_name }}
## Contributors
@ -147,4 +147,3 @@ jobs:
github_token: "${{ secrets.GITHUB_TOKEN }}"
title: ${{ github.event.commits[0].message }}
target_branch: main