diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 0000000..2b122b3 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,21 @@ +--- +name: pre-commit + +on: + pull_request: + +permissions: + contents: read + +jobs: + pre-commit: + name: Run pre-commit hooks + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.x" + - uses: pre-commit/action@v3.0.1 + env: + SKIP: circleci-validate diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..d226a94 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,43 @@ +--- +repos: + - repo: https://github.com/adrienverge/yamllint + rev: v1.38.0 + hooks: + - id: yamllint + types: [yaml] + + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + + - repo: https://github.com/hadolint/hadolint + rev: v2.14.0 + hooks: + - id: hadolint-docker + types: [dockerfile] + args: [--ignore, DL3007, --ignore, DL3025, --ignore, DL3062] + + - repo: local + hooks: + - id: circleci-validate + name: CircleCI pipeline validation + language: system + entry: bash -c 'for file in "$@"; do circleci config validate --org-slug github/lightspeedretail "$file"; done' -- + pass_filenames: true + files: ^.circleci/.*\.yml$ + + - id: helm-lint + name: Helm lint (api-server chart) + language: system + files: ^api-server/charts/.*\.ya?ml$ + pass_filenames: false + entry: helm lint api-server/charts + + - id: helm-template + name: Helm template (api-server chart, all envs) + language: script + files: ^api-server/charts/.*\.ya?ml$ + pass_filenames: false + entry: api-server/scripts/check-helm-charts.sh diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 0000000..5034c51 --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,17 @@ +--- +extends: default + +ignore: | + node_modules/ + vendor/ + charts/ + +rules: + line-length: + max: 120 + level: warning + ignore: + - .circleci/*.yml + braces: + min-spaces-inside: 0 + max-spaces-inside: 2 diff --git a/scripts/start/botkit/convert-readme-to-help/tests/__snapshots__/index.spec.js.snap b/scripts/start/botkit/convert-readme-to-help/tests/__snapshots__/index.spec.js.snap index e03b84f..3d08bee 100644 --- a/scripts/start/botkit/convert-readme-to-help/tests/__snapshots__/index.spec.js.snap +++ b/scripts/start/botkit/convert-readme-to-help/tests/__snapshots__/index.spec.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`convertReadmeToHelp when able to get readme and able to parse readme provides an help message 1`] = ` -"Here's a list of available commands :information_desk_person: +"Here's a list of available commands :information_desk_person: :point_right: _*Hello*_ Some details about hello command