From 1eef964ecc5b50147bb816e1712fb89cf45ddd1e Mon Sep 17 00:00:00 2001 From: Mike Elsmore Date: Mon, 19 Dec 2022 15:57:56 +0000 Subject: [PATCH 1/9] Feat: Add the quality github actions --- .cspell.json | 73 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/bug_report.md | 38 ++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 +++++++ .github/workflows/codeql-analysis.yml | 72 ++++++++++++++++++++++ .github/workflows/dependency-review.yml | 20 +++++++ .github/workflows/typos.yml | 9 +++ 6 files changed, 232 insertions(+) create mode 100644 .cspell.json create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/workflows/codeql-analysis.yml create mode 100644 .github/workflows/dependency-review.yml create mode 100644 .github/workflows/typos.yml diff --git a/.cspell.json b/.cspell.json new file mode 100644 index 0000000..3486090 --- /dev/null +++ b/.cspell.json @@ -0,0 +1,73 @@ +{ + "version": "0.2", + "$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/master/cspell.schema.json", + "language": "en", + "words": [ + "infobip", + "ibsso" + ], + "flagWords": [], + "patterns": [ + { + "name": "Markdown links", + "pattern": "\\((.*)\\)", + "description": "" + }, + { + "name": "Markdown code blocks", + "pattern": "/^(\\s*`{3,}).*[\\s\\S]*?^\\1/gmx", + "description": "Taken from the cSpell example at https://cspell.org/configuration/patterns/#verbose-regular-expressions" + }, + { + "name": "Inline code blocks", + "pattern": "\\`([^\\`\\r\\n]+?)\\`", + "description": "https://stackoverflow.com/questions/41274241/how-to-capture-inline-markdown-code-but-not-a-markdown-code-fence-with-regex" + }, + { + "name": "Link contents", + "pattern": "\\", + "description": "" + }, + { + "name": "Snippet references", + "pattern": "-- snippet:(.*)", + "description": "" + }, + { + "name": "Snippet references 2", + "pattern": "\\<\\[sample:(.*)", + "description": "another kind of snippet reference" + }, + { + "name": "Multi-line code blocks", + "pattern": "/^\\s*```[\\s\\S]*?^\\s*```/gm" + }, + { + "name": "HTML Tags", + "pattern": "<[^>]*>", + "description": "Reference: https://stackoverflow.com/questions/11229831/regular-expression-to-remove-html-tags-from-a-string" + } + ], + "ignoreRegExpList": [ + "Markdown links", + "Markdown code blocks", + "Inline code blocks", + "Link contents", + "Snippet references", + "Snippet references 2", + "Multi-line code blocks", + "HTML Tags" + ], + "ignorePaths": [ + ".cspell.json", + "package.json", + "package-lock.json", + "yarn.lock", + "tsconfig.json", + "node_modules/**", + ".eslintrc.js", + ".vscode/settings.json", + ".gitignore", + ".github/workflows" + ] +} \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..2ef327a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: "[BUG]" +labels: bug +assignees: juliacodez + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..bbcbbe7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..410afce --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,72 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ "main" ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "main" ] + schedule: + - cron: '25 2 * * 4' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'pythong' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + + # If the Autobuild fails above, remove it and uncomment the following three lines. + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. + + # - run: | + # echo "Run, Build Application using script" + # ./location_of_script_within_repo/buildscript.sh + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 \ No newline at end of file diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml new file mode 100644 index 0000000..f5c89e3 --- /dev/null +++ b/.github/workflows/dependency-review.yml @@ -0,0 +1,20 @@ +# Dependency Review Action +# +# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging. +# +# Source repository: https://github.com/actions/dependency-review-action +# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement +name: 'Dependency Review' +on: [pull_request] + +permissions: + contents: read + +jobs: + dependency-review: + runs-on: ubuntu-latest + steps: + - name: 'Checkout Repository' + uses: actions/checkout@v3 + - name: 'Dependency Review' + uses: actions/dependency-review-action@v3 \ No newline at end of file diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml new file mode 100644 index 0000000..9c38518 --- /dev/null +++ b/.github/workflows/typos.yml @@ -0,0 +1,9 @@ +name: 'Check spelling' +on: [pull_request] + +jobs: + spellcheck: # run the action + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: streetsidesoftware/cspell-action@v2 \ No newline at end of file From c8998080288600b17ddd0b4580087c92d75b2ca0 Mon Sep 17 00:00:00 2001 From: Mike Elsmore Date: Mon, 19 Dec 2022 15:59:24 +0000 Subject: [PATCH 2/9] fix: typo in lang --- .github/workflows/codeql-analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 410afce..f3ce8c1 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -32,7 +32,7 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'pythong' ] + language: [ 'python' ] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support From c706a99502e96d9c5958f4625ca1c4bfa0acbde2 Mon Sep 17 00:00:00 2001 From: Mike Elsmore Date: Mon, 16 Jan 2023 14:19:26 +0000 Subject: [PATCH 3/9] Fix: Remove auto assignee --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 2ef327a..5b0a804 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -3,7 +3,7 @@ name: Bug report about: Create a report to help us improve title: "[BUG]" labels: bug -assignees: juliacodez +assignees: '' --- From 795f65ca65f3195f239c83cb688451edd936efa4 Mon Sep 17 00:00:00 2001 From: Mike Elsmore Date: Thu, 9 Feb 2023 09:53:46 +0000 Subject: [PATCH 4/9] Add additional OS to bug report --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 5b0a804..ba2efcd 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -24,7 +24,7 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - - OS: [e.g. iOS] + - OS: [e.g. iOS, MacOS] - Browser [e.g. chrome, safari] - Version [e.g. 22] From bb09c1425cf40eaee3dcbaefdaa6bc483b764ff0 Mon Sep 17 00:00:00 2001 From: Mike Elsmore Date: Thu, 9 Feb 2023 15:40:18 +0000 Subject: [PATCH 5/9] Allow for pre-commit checks --- .cspell.json | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/dependency-review.yml | 2 +- .github/workflows/typos.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.cspell.json b/.cspell.json index 3486090..42f973a 100644 --- a/.cspell.json +++ b/.cspell.json @@ -70,4 +70,4 @@ ".gitignore", ".github/workflows" ] -} \ No newline at end of file +} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f3ce8c1..9568b07 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -69,4 +69,4 @@ jobs: # ./location_of_script_within_repo/buildscript.sh - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 \ No newline at end of file + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index f5c89e3..b0dedc4 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -17,4 +17,4 @@ jobs: - name: 'Checkout Repository' uses: actions/checkout@v3 - name: 'Dependency Review' - uses: actions/dependency-review-action@v3 \ No newline at end of file + uses: actions/dependency-review-action@v3 diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml index 9c38518..983f5b2 100644 --- a/.github/workflows/typos.yml +++ b/.github/workflows/typos.yml @@ -6,4 +6,4 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: streetsidesoftware/cspell-action@v2 \ No newline at end of file + - uses: streetsidesoftware/cspell-action@v2 From ef6c75ff5c8c8a227959b2e6cf9c7952a6651092 Mon Sep 17 00:00:00 2001 From: Mike Elsmore Date: Thu, 9 Feb 2023 18:04:52 +0000 Subject: [PATCH 6/9] Add additional default dictionaries --- .cspell.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.cspell.json b/.cspell.json index 42f973a..f19bf64 100644 --- a/.cspell.json +++ b/.cspell.json @@ -2,6 +2,7 @@ "version": "0.2", "$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/master/cspell.schema.json", "language": "en", + "dictionaries": ["python", "en_US", "en-gb"], "words": [ "infobip", "ibsso" From 22271d197690009ab8eb92654f0c6d099725720c Mon Sep 17 00:00:00 2001 From: Mike Elsmore Date: Thu, 9 Feb 2023 18:06:21 +0000 Subject: [PATCH 7/9] Correct typo --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f47db46..24f8938 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -43,7 +43,7 @@ git fetch upstream ``` ### 🛠️ Step 2: Build Please run all tests that are in repository, all test should pass. -Please check do you need to activate some additional features that are repository or langauge specific. +Please check do you need to activate some additional features that are repository or language specific. For example in infobip-api-python-sdk, pre-commit hooks must be enabled. See Commit section below. ### 🌱 Step 3: Branch From 462ffe0daaafdab3ad283324775b2c8966e92bc3 Mon Sep 17 00:00:00 2001 From: Mike Elsmore Date: Thu, 9 Feb 2023 18:12:02 +0000 Subject: [PATCH 8/9] More safe words, dictionaries, and a little config tweaking --- .cspell.json | 17 +++++++++++++++-- .github/workflows/typos.yml | 2 ++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.cspell.json b/.cspell.json index f19bf64..a3d343c 100644 --- a/.cspell.json +++ b/.cspell.json @@ -2,10 +2,23 @@ "version": "0.2", "$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/master/cspell.schema.json", "language": "en", - "dictionaries": ["python", "en_US", "en-gb"], + "dictionaries": [ + "python", + "en_US", + "en-gb", + "companies", + "softwareTerms" + ], "words": [ "infobip", - "ibsso" + "ibsso", + "pydantic", + "formdata", + "conint", + "conlist", + "dtmf", + "msisdn", + "webrtc" ], "flagWords": [], "patterns": [ diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml index 983f5b2..c3ee919 100644 --- a/.github/workflows/typos.yml +++ b/.github/workflows/typos.yml @@ -7,3 +7,5 @@ jobs: steps: - uses: actions/checkout@v3 - uses: streetsidesoftware/cspell-action@v2 + with: + verbose: true From 2470db3260aca884e1209345660dc6b7ed2f57c1 Mon Sep 17 00:00:00 2001 From: Mike Elsmore Date: Thu, 9 Feb 2023 18:20:45 +0000 Subject: [PATCH 9/9] Add more missing terms --- .cspell.json | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/.cspell.json b/.cspell.json index a3d343c..412aebc 100644 --- a/.cspell.json +++ b/.cspell.json @@ -7,7 +7,8 @@ "en_US", "en-gb", "companies", - "softwareTerms" + "softwareTerms", + "misc" ], "words": [ "infobip", @@ -18,7 +19,42 @@ "conlist", "dtmf", "msisdn", - "webrtc" + "webrtc", + "testenv", + "WABA", + "setuptools", + "Snyk", + "Luka", + "Kilic", + "Lozina", + "Μεγαρικό", + "ψήφισμα", + "είναι", + "γνωστή", + "απόφαση", + "Εκκλησίας", + "δήμου", + "Αθηναίων", + "επιβάλει", + "αυστηρό", + "καθολικό", + "εμπάργκο", + "aabe", + "MEΓAPIKO", + "ΨHΦIΣMA", + "EINAI", + "ΓNΩΣTH", + "AΠOΦAΣH", + "EKKΛHΣIAΣ", + "ΔHMOY", + "AΘHNAIΩN", + "ΠIΘANON", + "ΓYPΩ", + "EΠIBAΛEI", + "AYΣTHPO", + "KAΘOΛIKO", + "EMΠAPΓKO", + "ijkl" ], "flagWords": [], "patterns": [