From 4c8dbb46ffe9dbf47b43131903a0860c8fb95fc1 Mon Sep 17 00:00:00 2001 From: Ankur Banerjee Date: Thu, 19 May 2022 02:27:53 +0100 Subject: [PATCH] Sync workflow files --- .../{bug_report.yml => bug-report.yml} | 65 ++++++++----------- .github/ISSUE_TEMPLATE/config.yml | 14 ++++ .github/ISSUE_TEMPLATE/feature-request.yaml | 27 ++++++++ .github/ISSUE_TEMPLATE/features_request.yaml | 50 -------------- .github/linters/.commitlint.rules.js | 37 +++++++++++ .github/linters/.golangci.yaml | 25 +++++++ .github/linters/.hadolint.yml | 15 +++++ .github/linters/.markdown-lint.yml | 2 +- .github/workflows/build.yml | 2 +- .github/workflows/dispatch.yml | 2 +- .github/workflows/lint.yml | 17 +++-- 11 files changed, 160 insertions(+), 96 deletions(-) rename .github/ISSUE_TEMPLATE/{bug_report.yml => bug-report.yml} (58%) create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature-request.yaml delete mode 100644 .github/ISSUE_TEMPLATE/features_request.yaml create mode 100644 .github/linters/.commitlint.rules.js create mode 100644 .github/linters/.golangci.yaml create mode 100644 .github/linters/.hadolint.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml similarity index 58% rename from .github/ISSUE_TEMPLATE/bug_report.yml rename to .github/ISSUE_TEMPLATE/bug-report.yml index e99f8b64..d89d2fd2 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -1,79 +1,68 @@ name: Bug Report description: File a bug report title: "[Bug]: " -labels: ["bug", "triage"] -assignees: - - Ross Power +labels: ["bug"] body: - - type: markdown - attributes: - value: | - Thanks for taking the time to fill out this bug report! - - type: input - id: contact - attributes: - label: Contact Details - description: How can we get in touch with you if we need more info? - placeholder: ex. email@example.com - validations: - required: false - type: textarea id: what-happened attributes: - label: What happened? + label: What went wrong? description: Also tell us, what did you expect to happen? - placeholder: Tell us what you see! - value: "A bug happened!" + placeholder: Tell us more about this potential bug. validations: required: true body: - type: textarea id: repro attributes: - label: Reproduction steps - description: "How do you trigger this bug? Please walk us through it step by step." + label: How can we reproduce this bug? + description: "How do you trigger this bug? Please walk us through it step-by-step." value: | 1. 2. 3. ... - render: bash - validations: - required: true - - type: input - id: prevalence - attributes: - label: Bug prevalence - description: "How often do you or others encounter this bug?" - placeholder: "Whenever I visit the user account page (1-2 times a week)" validations: required: true - type: dropdown id: environment attributes: label: Environment - description: What environment was this bug first noticed on? + description: What environment does this bug affect? options: - - testnet - - mainnet + - Mainnet + - Testnet + - Both mainnet/testnet + - Not applicable validations: required: true + - type: input + id: prevalence + attributes: + label: Bug prevalence + description: "How often do you or others encounter this bug?" + placeholder: "Whenever I visit the user account page (1-2 times a week)" - type: dropdown - id: browsers + id: app-clients attributes: - label: What browsers are you seeing the problem on? + label: Which browser/client application did you encounter the bug in? (if applicable) + description: "Tell us what app/client you found the bug in. You can select multiple options if necessary." multiple: true options: - - Firefox - - Chrome + - Chrome / Chromium + - Brave - Safari - Microsoft Edge - - Brave + - Mozilla Firefox + - API (RPC/REST/gRPC) + - Keplr/other wallet app + - Other + - Not applicable - type: textarea id: logs attributes: label: Relevant log output - description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. + description: Please copy-paste any relevant log output. This will be automatically formatted into code, so no need for backticks. render: shell - type: checkboxes id: terms diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..15ee3b08 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,14 @@ +blank_issues_enabled: true + +contact_links: + - name: System Status + url: https://status.cheqd.net + about: System status reporting tool for cheqd services + + - name: Technical Documentation + url: https://docs.cheqd.io + about: Technical Documentation for cheqd projects + + - name: Community Slack + url: http://cheqd.link/join-cheqd-slack + about: Community Slack for Q&A and discussions diff --git a/.github/ISSUE_TEMPLATE/feature-request.yaml b/.github/ISSUE_TEMPLATE/feature-request.yaml new file mode 100644 index 00000000..56ebe60c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yaml @@ -0,0 +1,27 @@ +name: Feature Request +description: Request a new feature +title: "[feature]: " +labels: ["feature-request"] +body: + - type: textarea + id: feature-info + attributes: + label: What is the feature you'd like to see? + description: Also tell what prompted this idea? + placeholder: I would like to see... + validations: + required: true + - type: textarea + id: examples + attributes: + label: Are there any examples of where similar features are available? + description: Feel free to provide any links, screenshots, mockups etc that would help illustrate this idea better. + placeholder: An example of this feature is... + - type: checkboxes + id: terms + attributes: + label: Code of Conduct + description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/cheqd/.github/blob/main/CODE_OF_CONDUCT.md) + options: + - label: I agree to follow this project's Code of Conduct + required: true diff --git a/.github/ISSUE_TEMPLATE/features_request.yaml b/.github/ISSUE_TEMPLATE/features_request.yaml deleted file mode 100644 index acb23fde..00000000 --- a/.github/ISSUE_TEMPLATE/features_request.yaml +++ /dev/null @@ -1,50 +0,0 @@ -name: Feature Request -description: Request a new feature -title: "[feature]: " -labels: ["feature", "request"] -assignees: - - Ross Power -body: - - type: markdown - attributes: - value: | - Thanks for taking the time to fill out this feature request! - - type: input - id: contact - attributes: - label: Contact Details - description: How can we get in touch with you if we need more info? - placeholder: ex. email@example.com - validations: - required: false - - type: textarea - id: feature-info - attributes: - label: What is the feature you'd like to see? - description: Also tell us, what you were doing that prompted this idea? - placeholder: Let's hear your idea! - value: "I'd love to see...!" - validations: - required: true - - type: input - id: link - attributes: - label: Link for context - description: Please provide a link of where any other projects (ideally on Cosmos) that use this feature, for better context. - placeholder: https://github.com/cheqd/cheqd-node - validations: - required: false - - type: textarea - id: logs - attributes: - label: Relevant log output - description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. - render: shell - - type: checkboxes - id: terms - attributes: - label: Code of Conduct - description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/cheqd/.github/blob/main/CODE_OF_CONDUCT.md) - options: - - label: I agree to follow this project's Code of Conduct - required: true diff --git a/.github/linters/.commitlint.rules.js b/.github/linters/.commitlint.rules.js new file mode 100644 index 00000000..7c79b050 --- /dev/null +++ b/.github/linters/.commitlint.rules.js @@ -0,0 +1,37 @@ +module.exports = { + rules: { + 'type-case': [2, 'always', 'lower-case'], + 'type-empty': [2, 'never'], + 'type-enum': [ + 2, + 'always', + [ + 'build', + 'chore', + 'ci', + 'docs', + 'feat', + 'fix', + 'perf', + 'refactor', + 'revert', + 'style', + 'test', + ], + ], + 'scope-case': [2, 'always', 'lower-case'], + 'scope-empty': [1, 'never'], + 'subject-case': [ + 2, + 'always', + ['sentence-case'], + ], + 'subject-empty': [2, 'never'], + 'subject-full-stop': [2, 'never', '.'], + 'header-max-length': [2, 'always', 100], + 'body-leading-blank': [1, 'always'], + 'body-max-line-length': [2, 'always', 100], + 'footer-leading-blank': [1, 'always'], + 'footer-max-line-length': [2, 'always', 100], + }, +}; diff --git a/.github/linters/.golangci.yaml b/.github/linters/.golangci.yaml new file mode 100644 index 00000000..606ff249 --- /dev/null +++ b/.github/linters/.golangci.yaml @@ -0,0 +1,25 @@ +run: + timeout: 5m + + +linters: + enable: + - deadcode + - errcheck + - gosimple + - gofumpt + - govet + - ineffassign + - misspell + - nestif + - staticcheck + - structcheck + - typecheck + - unused + - varcheck + + +linters-settings: + misspell: + ignore-words: + - cheqd diff --git a/.github/linters/.hadolint.yml b/.github/linters/.hadolint.yml new file mode 100644 index 00000000..4fac5559 --- /dev/null +++ b/.github/linters/.hadolint.yml @@ -0,0 +1,15 @@ +# Set threshold level (error | warning | info | style | ignore | none) +failure-threshold: warning + +# List of ignored rules +# See list for reference: https://github.com/hadolint/hadolint#rules +ignored: + +# Override default levels for specific rules +override: + error: + warning: + info: + - DL3008 + - DL3027 + style: diff --git a/.github/linters/.markdown-lint.yml b/.github/linters/.markdown-lint.yml index 21a6823c..e8b2033f 100644 --- a/.github/linters/.markdown-lint.yml +++ b/.github/linters/.markdown-lint.yml @@ -95,7 +95,7 @@ MD034: true # Horizontal rule style MD035: - style: '---' + style: 'consistent' # Emphasis used instead of a heading MD036: true diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c92e2663..8f7715c4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,4 +26,4 @@ jobs: - name: Check docker building working-directory: . - run: docker build -f docker/Dockerfile . \ No newline at end of file + run: docker build -f docker/Dockerfile . diff --git a/.github/workflows/dispatch.yml b/.github/workflows/dispatch.yml index e99de385..11a0c525 100644 --- a/.github/workflows/dispatch.yml +++ b/.github/workflows/dispatch.yml @@ -19,4 +19,4 @@ jobs: call-test: name: "Tests" needs: call-build - uses: ./.github/workflows/test.yml \ No newline at end of file + uses: ./.github/workflows/test.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 25ef0100..fb701dbc 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,5 +1,6 @@ name: "Lint" -on: workflow_call +on: + workflow_call: defaults: run: shell: bash @@ -45,10 +46,10 @@ jobs: go-version: '1.17' - name: Run golangci-lint - uses: golangci/golangci-lint-action@v2 + uses: golangci/golangci-lint-action@v3 with: version: latest - args: --timeout 5m0s + args: --config .github/linters/.golangci.yaml super-lint: name: "Super Linter" @@ -70,11 +71,17 @@ jobs: MULTI_STATUS: true VALIDATE_BASH: true + VALIDATE_DOCKERFILE_HADOLINT: true + DOCKERFILE_HADOLINT_FILE_NAME: '../linters/.hadolint.yml' VALIDATE_GITHUB_ACTIONS: true + VALIDATE_JAVASCRIPT_ES: false VALIDATE_JSON: true VALIDATE_MARKDOWN: true VALIDATE_OPENAPI: true - # VALIDATE_PROTOBUF: true - VALIDATE_PYTHON_PYLINT: true + VALIDATE_PYTHON_PYLINT: false + VALIDATE_TERRAFORM_TFLINT: false + VALIDATE_TERRAGRUNT: false + VALIDATE_TSX: false + VALIDATE_TYPESCRIPT_ES: false VALIDATE_XML: true VALIDATE_YAML: true