Skip to content

Commit

Permalink
merged into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
chandel-aman committed Dec 8, 2023
2 parents ed597da + 64f3ab3 commit dcb1281
Show file tree
Hide file tree
Showing 113 changed files with 5,676 additions and 551 deletions.
5 changes: 4 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@ REACT_APP_USE_RECAPTCHA=
# from here for reCAPTCHA v2 and "I'm not a robot" Checkbox, and paste the key here.
# Note: In domains, fill localhost

REACT_APP_RECAPTCHA_SITE_KEY=
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
18 changes: 18 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Configuration for automated dependency updates using Dependabot
version: 2
updates:
# Define the target package ecosystem
- package-ecosystem: "npm"
# Specify the root directory
directory: "/"
# Schedule automated updates to run weekly
schedule:
interval: "weekly"
# Labels to apply to Dependabot PRs
labels:
- "dependencies"
# Specify the target branch for PRs
target-branch: "develop"
# Customize commit message prefix
commit-message:
prefix: "chore(deps):"
4 changes: 3 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ This section can be deleted after reading.
We employ the following branching strategy to simplify the development process and to ensure that only stable code is pushed to the `master` branch:
- `develop`: For unstable code: New features and bug fixes.
- `alpha-x.x.x`: For stability testing: Only bug fixes accepted.
- `master`: Where the stable production ready code lies. Only security related bugs.
NOTE!!!
ONLY SUBMIT PRS AGAINST OUR `DEVELOP` BRANCH. THE DEFAULT IS `MAIN`, SO YOU WILL HAVE TO MODIFY THIS BEFORE SUBMITTING YOUR PR FOR REVIEW. PRS MADE AGAINST `MAIN` WILL BE CLOSED.
-->

<!--
Expand Down
21 changes: 18 additions & 3 deletions .github/workflows/pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,22 @@ jobs:
- name: Checkout the Repository
uses: actions/checkout@v3

- name: Install Dependencies
- name: Restore node_modules from cache
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-generate-docs-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-generate-docs-${{ env.cache-name }}-
${{ runner.os }}-generate-docs-
${{ runner.os }}-
- name: Install dependencies
run: npm install --legacy-peer-deps

- name: Run linting check
Expand Down Expand Up @@ -71,8 +86,8 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: '16.14.1'
- name: resolve dependency

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

- name: Clone API repository
Expand Down
43 changes: 38 additions & 5 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,33 @@ on:
env:
CODECOV_UNIQUE_NAME: CODECOV_UNIQUE_NAME-${{ github.run_id }}-${{ github.run_number }}

jobs:
jobs:
Code-Coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install --legacy-peer-deps

- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-code-coverage-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-code-coverage-${{ env.cache-name }}-
${{ runner.os }}-code-coverage-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: List the state of node modules
run: npm install --legacy-peer-deps
- run: npm run test -- --watchAll=false --coverage
- name: Present and upload coverage to Codecov as ${{env.CODECOV_UNIQUE_NAME}}
uses: codecov/codecov-action@v3
Expand All @@ -42,9 +60,24 @@ jobs:
steps:
- name: Checkout the Repository
uses: actions/checkout@v3

- name: Install Dependencies
run: yarn install --legacy-peer-deps

- name: Restore node_modules from cache
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-generate-docs-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-generate-docs-${{ env.cache-name }}-
${{ runner.os }}-generate-docs-
${{ runner.os }}-
name: Install dependencies
run: npm install --legacy-peer-deps

- name: Install TypeScript Globally and add GraphQL tag
run: yarn global add typescript
Expand Down
19 changes: 13 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,10 @@ Make sure you are following [issue report guidelines](ISSUE_GUIDELINES.md) avail

#### Branching Strategy

For Talawa Admin, we had employed the following branching strategy to simplify the development process and to ensure that only stable code is pushed to the `master` branch:
For Talawa Admin, we had employed the following branching strategy to simplify the development process and to ensure that only stable code is pushed to the `main` branch:

- `develop`: For unstable code and bug fixing
- `alpha-x.x.x`: for stability teesting
- `master`: Where the stable production ready code lies
- `main`: Where the stable production ready code lies. This is our default branch.

#### Conflict Resolution

Expand Down Expand Up @@ -137,10 +136,18 @@ The process of proposing a change to Talawa Admin can be summarized as:
3. _Creating your code coverage account_
1. You can also see your code coverage online for your fork of the repo. This is provided by `codecov.io`
1. Go to this link: `https://app.codecov.io/gh/XXXX/YYYY` where XXXX is your GitHub account username and YYYY is the name of the repository
2. Login to `codecov.io` using your GitHub account, and add your **repo** and **branches** to the `codecov.io` dashboard.
2. Login to `codecov.io` using your GitHub account, and add your **repo** and **branches** to the `codecov.io` dashboard.
![Debugging Test Demo](/public/images/codecov/authorise-codecov-github.jpg)
3. Remember to add the `Repository Upload Token` for your forked repo. This can be found under `Settings` of your `codecov.io` account.
4. Use the value of this token to create a secret named CODE_COV for your forked repo.
5. You will see your code coverage reports with every push to your repo after following these steps
4. Click on Setup Repo option
![Debugging Test Demo](/public/images/codecov/homescrenn%20(1).jpg)
5. Use the value of this token to create a secret named CODE_COV for your forked repo.
[![Code-cov-token.jpg](/public/images/codecov/Code-cov-token.jpg)]()
[![addd-your-key.jpg](/public/images/codecov/addd-your-key.jpg)]()
6. You will see your code coverage reports with every push to your repo after following these steps
[![results.jpg](/public/images/codecov/results.jpg)]()
2. After making changes you can add them to git locally using `git add <file_name>`(to add changes only in a particular file) or `git add .` (to add all changes).
3. After adding the changes you need to commit them using `git commit -m '<commit message>'`(look at the commit guidelines below for commit messages).
4. Once you have successfully commited your changes, you need to push the changes to the forked repo on github using: `git push origin <branch_name>`.(Here branch name must be name of the branch you want to push the changes to.)
Expand Down
4 changes: 4 additions & 0 deletions PR_GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ npm run format:check
1. Please read our [CONTRIBUTING.md](CONTRIBUTING.md) document for details on our testing policy.

## Pull Request Processing
These are key guidelines for the procedure:

### Only submit PRs against our `develop` branch, not the default `main` branch

1. Only submit PRs against our `develop` branch. The default is `main`, so you will have to modify this before submitting your PR for review. PRs made against `main` will be closed.
1. We do not accept draft Pull Requests. They will be closed if submitted. We focus on work that is ready for immediate review.
1. Removing assigned reviewers from your Pull Request will cause it to be closed. The quality of our code is very important to us. Therefore we make experienced maintainers of our code base review your code. Removing these assigned persons is not in the best interest of this goal.
1. If you have not done so already, please read the `Pull Requests and Issues` and `Testing` sections above.
Expand Down
9 changes: 9 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"react-dom": "^17.0.2",
"react-google-recaptcha": "^2.1.0",
"react-i18next": "^11.18.1",
"react-icons": "^4.12.0",
"react-infinite-scroll-component": "^6.1.0",
"react-redux": "^7.2.5",
"react-router-dom": "^5.2.0",
Expand Down
56 changes: 53 additions & 3 deletions public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@
"login_to_admin_portal": "Admin Portal Login",
"OR": "OR"
},
"latestEvents": {
"eventCardTitle": "Upcoming Events",
"eventCardSeeAll": "See All",
"noEvents": "No Upcoming Events"
},
"latestPosts": {
"latestPostsTitle": "Latest Posts",
"seeAllLink": "See All",
"noPostsCreated": "No Posts Created"
},
"listNavbar": {
"talawa_portal": "Talawa Admin Portal",
"roles": "Roles",
Expand Down Expand Up @@ -55,6 +65,7 @@
"Block/Unblock": "Block/Unblock",
"Plugins": "Plugins",
"Plugin Store": "Plugin Store",
"Advertisement": "Advertisements",
"allOrganizations": "All Organizations",
"yourOrganization": "Your Organization",
"notification": "Notification",
Expand All @@ -75,6 +86,7 @@
"searchByName": "Search By Name",
"organizations": "Organizations",
"createOrganization": "Create Organization",
"createSampleOrganization": "Create Sample Organization",
"description": "Description",
"location": "Location",
"isPublic": "Is Public",
Expand All @@ -85,18 +97,22 @@
"filter": "Filter",
"cancel": "Cancel",
"noOrgErrorTitle": "Organizations Not Found",
"sampleOrgDuplicate": "Only one sample organization allowed",
"noOrgErrorDescription": "Please create an organization through dashboard",
"endOfResults": "End of results",
"manageFeatures": "Manage Features",
"manageFeaturesInfo": "Creation Successful ! Please select features that you want to enale for this organization from the plugin store.",
"goToStore": "Go to Plugin Store",
"enableEverything": "Enable Everything",
"noResultsFoundFor": "No results found for "
"noResultsFoundFor": "No results found for",
"OR": "OR",
"sampleOrgSuccess": "Sample Organization Successfully Created"
},
"orgListCard": {
"admins": "Admins",
"members": "Members",
"manage": "Manage"
"manage": "Manage",
"sampleOrganization": "Sample Organization"
},
"paginationList": {
"rowsPerPage": "rows per page",
Expand Down Expand Up @@ -125,6 +141,8 @@
"loadingUsers": "Loading Users...",
"noUserFound": "No User Found",
"sort": "Sort",
"Newest": "Newest First",
"Oldest": "Oldest First",
"filter": "Filter",
"noOrgError": "Organizations not found, please create an organization through dashboard",
"roleUpdated": "Role Updated.",
Expand Down Expand Up @@ -402,10 +420,12 @@
"settings": "Settings",
"noData": "No data",
"otherSettings": "Other Settings",
"changeLanguage": "Change Language"
"changeLanguage": "Change Language",
"manageCustomFields": "Manage Custom Fields"
},
"deleteOrg": {
"deleteOrganization": "Delete Organization",
"deleteSampleOrganization": "Delete Sample Organization",
"deleteMsg": "Do you want to delete this organization?",
"cancel": "Cancel",
"confirmDelete": "Confirm Delete",
Expand Down Expand Up @@ -642,6 +662,25 @@
"event": "Event",
"organization": "Organization"
},
"advertisement": {
"title": "Advertisements",
"pHeading": "Manage Ads",
"activeAds": "Active Campaigns",
"archievedAds": "Completed Campaigns",
"pMessage": "Ads not present for this campaign.",
"delete": "Delete",
"Rname": "Enter name of Advertisement",
"Rtype": "Select type of Advertisement",
"Rlink": "Provide a link for content to be displayed",
"RstartDate": "Select Start Date",
"RendDate": "Select End Date",
"RClose": "Close the window",
"addNew": "Create new advertisement",
"EXname": "Ex. Cookie Shop",
"EXlink": "Ex. http://yourwebsite.com/photo",
"register": "Create Advertisement",
"close": "Close "
},
"userChat": {
"chat": "Chat",
"search": "Search",
Expand All @@ -650,5 +689,16 @@
"userChatRoom": {
"selectContact": "Select a contact to start conversation",
"sendMessage": "Send Message"
},
"orgProfileField": {
"loading": "Loading...",
"noCustomField": "No custom fields available",
"customFieldName": "Field Name",
"enterCustomFieldName": "Enter Field name",
"customFieldType": "Field Type",
"saveChanges": "Save Changes",
"Remove Custom Field": "Remove Custom Field",
"fieldSuccessMessage": "Field added successfully",
"fieldRemovalSuccess": "Field removed successfully"
}
}
Loading

0 comments on commit dcb1281

Please sign in to comment.