From 6cf873f98a5629fc5876dc4d6cbc430f7557bd65 Mon Sep 17 00:00:00 2001 From: Artem Antonenko Date: Tue, 23 Jun 2026 09:30:17 -0400 Subject: [PATCH 1/4] LSR-38278: add pre-commit, yamllint, and GHA workflow --- .github/workflows/pre-commit.yml | 15 +++++++ .pre-commit-config.yaml | 43 +++++++++++++++++++ .yamllint.yaml | 17 ++++++++ .../tests/__snapshots__/index.spec.js.snap | 2 +- 4 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pre-commit.yml create mode 100644 .pre-commit-config.yaml create mode 100644 .yamllint.yaml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 0000000..ee2b61b --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,15 @@ +name: pre-commit + +on: + pull_request: + +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 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 From 09cbd89ffce35c09e6ce1270e5baad2e8c3368af Mon Sep 17 00:00:00 2001 From: artemantonenko-lshq Date: Tue, 23 Jun 2026 09:54:49 -0400 Subject: [PATCH 2/4] fix: correct on/permissions structure in pre-commit workflow --- .github/workflows/pre-commit.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index ee2b61b..55631a7 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -1,8 +1,12 @@ +--- name: pre-commit on: pull_request: +permissions: + contents: read + jobs: pre-commit: name: Run pre-commit hooks From 583b1e1d2b61575a34236eee5d914f943fb0828c Mon Sep 17 00:00:00 2001 From: artemantonenko-lshq Date: Tue, 23 Jun 2026 15:25:43 -0400 Subject: [PATCH 3/4] fix: correct on/permissions structure in pre-commit workflow --- .github/workflows/pre-commit.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 55631a7..2b122b3 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -17,3 +17,5 @@ jobs: with: python-version: "3.x" - uses: pre-commit/action@v3.0.1 + env: + SKIP: circleci-validate From 575ea58fbd60053b447641229585407b5fd8eac0 Mon Sep 17 00:00:00 2001 From: artemantonenko-lshq Date: Tue, 23 Jun 2026 15:35:47 -0400 Subject: [PATCH 4/4] fix: correct on/permissions structure in pre-commit workflow