Skip to content

Commit

Permalink
Merge branch 'develop' into feat/login-component-for-user-and-admin
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhbizzle committed Jan 24, 2024
2 parents 05ac2bd + 69b8a86 commit f00b641
Show file tree
Hide file tree
Showing 324 changed files with 25,357 additions and 7,097 deletions.
6 changes: 5 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ REACT_APP_USE_RECAPTCHA=
REACT_APP_RECAPTCHA_SITE_KEY=

# has to be inserted in the env file to use plugins and other websocket based features.
REACT_APP_BACKEND_WEBSOCKET_URL=ws://localhost:4000/graphql
REACT_APP_BACKEND_WEBSOCKET_URL=ws://localhost:4000/graphql

# If you want to logs Compiletime and Runtime error , warning and info write YES or if u want to
# keep the console clean leave it blank
ALLOW_LOGS=
18 changes: 16 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,16 @@
},

// Specify the ESLint plugins tobe used
"plugins": ["react", "@typescript-eslint", "jest"],
"plugins": [
"react",
"@typescript-eslint",
"jest",
"import",
"eslint-plugin-tsdoc"
],
"rules": {
"react/destructuring-assignment": ["off"],
"@typescript-eslint/no-explicit-any": ["off"],
// "@typescript-eslint/no-explicit-any": ["off"],
"@typescript-eslint/explicit-module-boundary-types": ["off"],
"react/no-multi-comp": [
"error",
Expand All @@ -44,6 +50,14 @@
"extensions": [".tsx"]
}
],
"import/no-duplicates": "error",
"tsdoc/syntax": "error",
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/ban-types": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/array-type": "error",
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/authorized-changes-detection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@ on:
- '.github/**'
- 'env.example'
- '.husky/**'
- '.scripts/**'
- 'package.json'
- 'tsconfig.json'
- '.gitignore'
- '.eslintrc.json'
- '.eslintignore '
- 'vite.config.ts'
- 'docker-compose.yaml'
- 'Dockerfile'
- 'CODEOWNERS'
- 'LICENSE'
- 'setup.ts'

jobs:
Checking-for-unauthorized-file-changes:
Expand Down
26 changes: 22 additions & 4 deletions .github/workflows/pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Count number of lines
run: |
chmod +x ./.github/workflows/countline.py
./.github/workflows/countline.py --lines 1000 --exclude_files src/screens/LoginPage/LoginPage.tsx
./.github/workflows/countline.py --lines 600 --exclude_files src/screens/LoginPage/LoginPage.tsx
- name: Get changed TypeScript files
id: changed-files
Expand Down Expand Up @@ -103,6 +103,7 @@ jobs:
- name: Present and Upload coverage to Codecov as ${{env.CODECOV_UNIQUE_NAME}}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: false
name: '${{env.CODECOV_UNIQUE_NAME}}'
Expand All @@ -127,9 +128,26 @@ jobs:

- name: resolve dependency
run: npm install -g @graphql-inspector/cli

- name: Clone API repository
run: git clone https://github.com/PalisadoesFoundation/talawa-api && ls -a

- name: Clone API Repository
run: |
# Retrieve the complete branch name directly from the GitHub context
FULL_BRANCH_NAME=${{ github.base_ref }}
echo "FULL_Branch_NAME: $FULL_BRANCH_NAME"
# Clone the specified repository using the extracted branch name
git clone --branch $FULL_BRANCH_NAME https://github.com/PalisadoesFoundation/talawa-api && ls -a
- name: Validate Documents
run: graphql-inspector validate './src/GraphQl/**/*.ts' './talawa-api/schema.graphql'

Check-Target-Branch:
name: Check Target Branch
runs-on: ubuntu-latest
steps:
- name: Check if the target branch is develop
if: github.event.pull_request.base.ref != 'develop'
run: |
echo "Error: Pull request target branch must be 'develop'. Please refer PR_GUIDELINES.md"
exit 1
7 changes: 7 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
- name: Present and upload coverage to Codecov as ${{env.CODECOV_UNIQUE_NAME}}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: false
name: '${{env.CODECOV_UNIQUE_NAME}}'
Expand All @@ -64,6 +65,11 @@ jobs:
- name: Checkout the Repository
uses: actions/checkout@v3

- name: Node.js Version
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Restore node_modules from cache
id: cache-npm
uses: actions/cache@v3
Expand Down Expand Up @@ -137,6 +143,7 @@ jobs:
path: talawa-admin-docs

Copy-docs-to-talawa-docs:
needs: Generate-Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,7 @@ yarn-error.log*
# express setup
debug.log

.vscode
# No editor related files
.idea
.vscode
*.swp
5 changes: 5 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/talawa-admin.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ Make sure you have read the [Documentation for Setting up the Project](https://g
The process of proposing a change to Talawa Admin can be summarized as:

1. Fork the Talawa Admin repository and branch off `develop`.
1. The repository can be cloned locally using `git clone <forked repo url>`.
1. Your newly forked repository can be cloned locally using `git clone <YOUR FORKED REPO URL>`.
1. Make the Palisadoes Foundation's repo your `git upstream` for your local repo.
1. Make the desired changes to the Talawa Admin project.
1. Run the app and test your changes.
1. If you've added code, then test suites must be added.
Expand Down
15 changes: 14 additions & 1 deletion INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ This document provides instructions on how to set up and start a running instanc
- [Creating .env file](#creating-env-file)
- [Setting up REACT_APP_TALAWA_URL in .env file](#setting-up-react_app_talawa_url-in-env-file)
- [Setting up REACT_APP_RECAPTCHA_SITE_KEY in .env file](#setting-up-react_app_recaptcha_site_key-in-env-file)
- [Setting up Compiletime and Runtime logs](#setting-up-compiletime-and-runtime-logs)
- [Post Configuration Steps](#post-configuration-steps)
- [Running Talawa-Admin](#running-talawa-admin)
- [Accessing Talawa-Admin](#accessing-talawa-admin)
Expand All @@ -35,6 +36,7 @@ This document provides instructions on how to set up and start a running instanc

We recommend that you follow these steps before beginning development work on Talawa-Admin:

1. You need to have `nodejs` installed in your machine. We recommend using Node version greater than 20.0.0. You can install it either through [nvm](https://github.com/nvm-sh/nvm) (Node Version Manager) or by visiting the official [Nodejs](https://nodejs.org/download/release/v16.20.2/) website.
1. [Talawa-API](https://github.com/PalisadoesFoundation/talawa-api): (**This is mandatory**) The API system that the mobile app uses for accessing data. Setup your own **_local instance_**
1. [Talawa](https://github.com/PalisadoesFoundation/talawa): (Optional) The mobile app that people will use to access Talawa's features. This may be useful if you need to verify administrative features you have added or modified.

Expand Down Expand Up @@ -82,13 +84,21 @@ For more details please refer to the installation guidelines provided in the [of
Run the following command to install the packages and dependencies required by `talawa-admin`:

```
npm install --legacy-peer-deps
npm install
```

# Configuration

It's important to configure Talawa-Admin. Here's how to do it.

You can use our interactive setup script for the configuration. Use the following command for the same.

```
npm run setup
```

All the options in "setup" can be done manually as well and here's how to do it. - [Creating .env file](#creating-env-file)

## Creating .env file

A file named .env is required in the root directory of talawa-admin for storing environment variables used at runtime. It is not a part of the repo and you will have to create it. For a sample of `.env` file there is a file named `.env.example` in the root directory. Create a new `.env` file by copying the contents of the `.env.example` into `.env` file. Use this command:
Expand Down Expand Up @@ -140,6 +150,9 @@ Copy/paste this `reCAPTCHA site key` to the variable named `REACT_APP_RECAPTCHA_
```
REACT_APP_RECAPTCHA_SITE_KEY="this_is_the_recaptcha_key"
```
## Setting up Compiletime and Runtime logs

Set the `ALLOW_LOGS` to "YES" if you want warnings , info and error messages in your console or leave it blank if you dont need them or want to keep the console clean

# Post Configuration Steps

Expand Down
Loading

0 comments on commit f00b641

Please sign in to comment.