From 6e65419e574d1ec12478a38c3138bc3324325ff0 Mon Sep 17 00:00:00 2001 From: sailajakommineni Date: Thu, 30 Nov 2023 13:41:06 +0000 Subject: [PATCH] feat(shared): Implement GitHub Spellcheck and grammar linting for Pull request. This pull request implements the GitHub Spellcheck feature to automatically check the spelling and grammar in commit messages for all Pull Requests (PRs). Changes Made: - modified the code to check the grammar errors at exact line numbers. -In docs/README.md file corrected the grammar errors. Fixes: #2327 Signed-off-by: sailajakommineni --- .github/.wordlist.txt | 128 +++++++++++++++++++++++++++ .github/workflows/grammarcheck.yaml | 73 +++++++++++++++ .github/workflows/spellcheck.yaml | 51 ++--------- docs/README.md | 35 ++++---- docs/source/compatibilitytable.md | 2 +- docs/source/contributing.md | 8 +- docs/source/faq.md | 30 +++---- docs/source/glossary.md | 30 +++---- docs/source/introduction.md | 10 +-- docs/source/prerequisites.md | 6 +- docs/source/prerequisites_machine.md | 4 +- 11 files changed, 270 insertions(+), 107 deletions(-) create mode 100644 .github/workflows/grammarcheck.yaml diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 2c27005a337..52455bba435 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -41,3 +41,131 @@ py md pre html +http +www +rst +toctree +reStructuredText +DCO +UI +Blockchain +DigitalOcean +GCP +repo +APIs +readme +https +EKS +yaml +microservices +Modularity +Scalability +readthedocs +roadmap +Jira +CLI +ansible +kubectl +gitops +CRD +CustomResourceDefinition +fluxcd +github +TBD +trainings +HashiCorp +upto +HelmRelease +hackathon +Hashicorp +Authenticator +JSON +ajv +cli +npm +NPM +MacOS +jq +openshift +Homebrew +validator +blockchain +GitOps +VM +backend +DNS +HAProxy +POC +dev +url +cryptographically +BaaS +OpenShift +BYOI +architected +TCP +scalable +MSP +SDK +MSPs +kubeconfig +TLS +PV +RPC +CorDapps +JVM +CA’s +PKI +KUBECONFIG +DDO +DIDs +NYM +rpc +MTA +memcached +auditable +config +IAM +IOT +IoT +kubelet +Kubeconfig +PersistentVolume +lifecycle +cryptographic +decrypting +SCM +SHA +Brandl +Georg +LDAP +Chaincode +chaincode +subnet +Orderer +permissioned +Zkkafka +zkkafka +servlet +CA’s +NetworkMap +Networkmap +interoperable +merkle +Verinym +Sovrin +Prover +Anonym +DKMS +Enode +privateFor +Ethereum +geth +pluggable +Hostnames +crypto +parallelization +kube +PV's +CorDapp +storageclass diff --git a/.github/workflows/grammarcheck.yaml b/.github/workflows/grammarcheck.yaml new file mode 100644 index 00000000000..0dbea3daaf8 --- /dev/null +++ b/.github/workflows/grammarcheck.yaml @@ -0,0 +1,73 @@ +--- +name: grammer check +on: + workflow_dispatch: + inputs: + grammar_check_disabled: + description: 'Disable grammar check' + default: 'false' + required: false + push: + branches: + - "**" + pull_request: + paths: + - 'docs/*.md' + types: [opened, edited, updated] + +env: + GRAMMAR_CHECK_DISABLED: ${{ github.event.inputs.grammar_check_disabled || 'false' }} + +jobs: + check-grammar: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + # Install the dependencies for grammer check + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools + pip install --user --upgrade language_tool_python + + # To check the grammatical mistakes of the given files and folders. + - name: Run grammar check + if: ${{ env.GRAMMAR_CHECK_DISABLED == 'false' }} + run: | + python - <= 0.12.0)** and some collections and jq. +Also, Ansible k8s module requires the **openshift python package (>= 0.12.0)** and some collections and jq. ```bash pip3 install openshift==0.13.1 @@ -43,4 +43,4 @@ Read more about Ansible inventory [here](https://docs.ansible.com/ansible/latest Hyperledger Bevel provides the feature of automated validation of the configuration file (network.yaml), this is done using ajv (JSON schema validator) cli. The deployment scripts install ajv using npm module which requires npm as prerequisite. -You can install the latest NPM version from offical [site](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). +You can install the latest NPM version from official [site](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm).