diff --git a/.github/ISSUE_TEMPLATE/document_issue.yml b/.github/ISSUE_TEMPLATE/document_issue.yml index 505ff5de72..c4e8bcc4aa 100644 --- a/.github/ISSUE_TEMPLATE/document_issue.yml +++ b/.github/ISSUE_TEMPLATE/document_issue.yml @@ -7,6 +7,7 @@ body: attributes: label: Self Checks description: "To make sure we get to you in time, please check the following :)" + options: - label: I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. required: true - label: I confirm that I am using English to file this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). diff --git a/.github/ISSUE_TEMPLATE/help_wanted.yml b/.github/ISSUE_TEMPLATE/help_wanted.yml index c6fab6d225..1b4f08808a 100644 --- a/.github/ISSUE_TEMPLATE/help_wanted.yml +++ b/.github/ISSUE_TEMPLATE/help_wanted.yml @@ -1,5 +1,5 @@ name: "🤝 Help Wanted" -description: "Request help from the community" [please use English :)] +description: "Request help from the community [please use English :)]" labels: - help-wanted body: diff --git a/.github/linters/.hadolint.yaml b/.github/linters/.hadolint.yaml new file mode 100644 index 0000000000..27c522cc48 --- /dev/null +++ b/.github/linters/.hadolint.yaml @@ -0,0 +1 @@ +failure-threshold: "error" \ No newline at end of file diff --git a/.github/linters/.yaml-lint.yml b/.github/linters/.yaml-lint.yml new file mode 100644 index 0000000000..a169f02c7d --- /dev/null +++ b/.github/linters/.yaml-lint.yml @@ -0,0 +1,15 @@ +--- + +extends: default + +rules: + brackets: + max-spaces-inside: 1 + document-start: disable + indentation: + level: warning + line-length: disable + new-line-at-end-of-file: + level: warning + trailing-spaces: + level: warning diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 062667a745..505f65660b 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -8,8 +8,13 @@ on: branches: - deploy/dev +concurrency: + group: dep-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: test: + name: ESLint and SuperLinter runs-on: ubuntu-latest steps: @@ -32,3 +37,18 @@ jobs: run: | cd ./web yarn run lint + + - name: Super-linter + uses: super-linter/super-linter/slim@v5 + env: + BASH_SEVERITY: warning + DEFAULT_BRANCH: main + ERROR_ON_MISSING_EXEC_BIT: true + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + IGNORE_GENERATED_FILES: true + IGNORE_GITIGNORED_FILES: true + VALIDATE_BASH: true + VALIDATE_BASH_EXEC: true + VALIDATE_GITHUB_ACTIONS: true + VALIDATE_DOCKERFILE_HADOLINT: true + VALIDATE_YAML: true diff --git a/api/docker/entrypoint.sh b/api/docker/entrypoint.sh old mode 100644 new mode 100755 diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index 7b0624d9bb..12b8a4a2c0 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -251,7 +251,7 @@ services: # Set the redis password when startup redis server. command: redis-server --requirepass difyai123456 healthcheck: - test: ["CMD", "redis-cli","ping"] + test: [ "CMD", "redis-cli", "ping" ] # uncomment to expose redis port to host # ports: # - "6379:6379" diff --git a/web/docker/entrypoint.sh b/web/docker/entrypoint.sh old mode 100644 new mode 100755 index a3e72e2899..d50ac4aa71 --- a/web/docker/entrypoint.sh +++ b/web/docker/entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e @@ -20,4 +20,4 @@ fi export NEXT_PUBLIC_SENTRY_DSN=${SENTRY_DSN} export NEXT_PUBLIC_SITE_ABOUT=${SITE_ABOUT} -node ./server.js \ No newline at end of file +node ./server.js