Skip to content

Commit 5f6aaec

Browse files
committed
Merge branch 'development' into Jay_Modify_Badge_Amount
2 parents 252b334 + e4db703 commit 5f6aaec

1,369 files changed

Lines changed: 144856 additions & 33218 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.babelrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
{
2-
"presets": ["react-app"]
2+
"presets": ["react-app"],
3+
"plugins": [
4+
"@babel/plugin-proposal-optional-chaining",
5+
"@babel/plugin-proposal-nullish-coalescing-operator"
6+
]
37
}

.circleci/config.yml

Lines changed: 0 additions & 132 deletions
This file was deleted.

.eslintignore

Lines changed: 17 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,26 @@
1-
*.png
2-
*.svg
3-
*.test.js
4-
*.test.jsx
5-
src/actions/**
6-
src/App.css
7-
src/config.json
1+
# =======================================================================
2+
# ⚠️ DO NOT ADD NEW ENTRIES ⚠️
3+
# Only the files and folders listed below are allowed to be ignored.
4+
# This .gitignore is locked down to maintain consistency across the team.
5+
# To propose changes, please open a discussion or PR with justification.
6+
# =======================================================================
87

9-
src/index.js
10-
src/reducers/**
11-
src/styles.js
12-
src/utils/**
13-
src/__tests__/**
8+
# Ignore build folders
9+
/node_modules/
10+
/public/
11+
/build/
1412

13+
# Ignore test files inside /src/components
14+
src/components/BMDashboard/_tests_/BMDashboard.test.jsx
15+
src/components/Reports/PeopleReport/components/PeopleTasksPieChart.test.jsx
1516

16-
17-
src/components/App.jsx
18-
src/components/AutoReload/**
17+
# Ignore folders in /src
1918
src/components/Badge/**
20-
src/components/common/**
21-
src/components/Header/**
22-
src/components/BMDashboard/BMHeader/**
23-
src/components/MonthlyEffort/**
24-
25-
src/components/PermissionsManagement/**
26-
# src/components/PopUpBar/**
27-
src/components/ProfileLinks/**
19+
src/components/Dashboard/**
2820
src/components/Projects/**
29-
src/components/Reports/**
30-
src/components/SetupProfile/**
31-
src/components/SummaryBar/**
3221
src/components/SummaryManagement/**
33-
src/components/TaskEditSuggestions/**
3422
src/components/TeamMemberTasks/**
35-
src/components/Teams/**
36-
src/components/TeamLocations/**
37-
src/components/Timelog/**
38-
src/components/UpdatePassword/**
23+
src/components/Teams/TeamMembersPopup.jsx
3924
src/components/UserManagement/**
4025
src/components/UserProfile/**
26+
src/components/Announcements/index.jsx

.eslintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,13 @@ module.exports = {
4848
'react/display-name': 'off',
4949
'react/no-direct-mutation-state': 'off',
5050
'react/no-unknown-property': 'off',
51+
'react/destructuring-assignment': 'off',
5152
'react/react-in-jsx-scope': 'off',
5253
'import/no-duplicates': 'off',
5354
'import/no-named-as-default': 'off',
55+
'jsx-a11y/label-has-associated-control': 'off',
56+
'jsx-a11y/no-static-element-interactions': 'off',
57+
'jsx-a11y/click-events-have-key-events': 'off',
5458
'no-alert': 'error',
5559
'no-console': 'error',
5660
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],

.eslintrc.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"extends": [
3+
"airbnb",
4+
"prettier"
5+
],
6+
"plugins": [
7+
"prettier"
8+
],
9+
"rules": {
10+
"prettier/prettier": "error",
11+
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }]
12+
},
13+
"env": {
14+
"browser": true,
15+
"es2021": true
16+
},
17+
"parserOptions": {
18+
"ecmaFeatures": {
19+
"jsx": true
20+
},
21+
"ecmaVersion": 12,
22+
"sourceType": "module"
23+
}
24+
}

.gitattributes

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
* text=auto eol=lf
2-
*.png binary
1+
# * text=auto eol=lf
2+
# *.png binary

.github/pull_request_template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ To test this backend PR you need to checkout the #XXX frontend PR.
2121
4. log as admin user
2222
5. go to dashboard→ Tasks→ task→…
2323
6. verify function “A” (feel free to include screenshot here)
24+
7. verify this new feature works in [dark mode](https://docs.google.com/document/d/11OXJfBBedK6vV-XvqWR8A9lOH0BsfnaHx01h1NZZXfI)
2425

2526
## Screenshots or videos of changes:
2627

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Close PRs from Forks
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- synchronize
8+
9+
jobs:
10+
check-fork:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
pull-requests: write
14+
steps:
15+
- name: Check if PR is from a fork
16+
id: check
17+
run: |
18+
echo "PR head repo: ${{ github.event.pull_request.head.repo.full_name }}"
19+
echo "Base repo: ${{ github.event.repository.full_name }}"
20+
if [[ "${{ github.event.pull_request.head.repo.full_name }}" != "${{ github.event.repository.full_name }}" ]]; then
21+
echo "PR is from a fork"
22+
echo "is_fork=true" >> $GITHUB_ENV
23+
else
24+
echo "PR is not from a fork"
25+
echo "is_fork=false" >> $GITHUB_ENV
26+
fi
27+
28+
- name: Close PR and add comment
29+
if: env.is_fork == 'true'
30+
run: |
31+
PR_NUMBER=${{ github.event.pull_request.number }}
32+
GH_REPO=${{ github.repository }}
33+
echo "Closing PR #$PR_NUMBER in repository $GH_REPO"
34+
gh pr close \
35+
"$PR_NUMBER" \
36+
--repo "${{ github.repository }}" \
37+
--comment "This PR has been closed because PRs from forks are not allowed. Please create a branch directly off the origin repository and resubmit your PR."
38+
env:
39+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/deploy.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Build and Deploy
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- development
7+
concurrency:
8+
group: Build and Deploy / ${{ github.ref_name == 'main' && 'Production' || 'Development' }}
9+
cancel-in-progress: true
10+
jobs:
11+
# Build
12+
build:
13+
name: Build
14+
strategy:
15+
matrix:
16+
environment: ${{ github.ref_name == 'main' && fromJson('["Production", "Beta"]') || fromJson('["Development"]') }}
17+
environment: ${{ matrix.environment }}
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout Repository
21+
uses: actions/checkout@v4
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 14
26+
cache: 'npm'
27+
- name: Install Dependencies
28+
run: npm ci
29+
# We don't run tests here since we assume it's already done during PR process.
30+
# - name: Update Browser List
31+
# run: npx browserslist@latest --update-db
32+
- name: Build React App
33+
run: npm run build && cp build/index.html build/200.html
34+
env:
35+
NODE_ENV: ${{ github.ref_name == 'main' && 'production' || 'development' }}
36+
REACT_APP_APIENDPOINT: ${{ vars.REACT_APP_API_ENDPOINT }}
37+
GENERATE_SOURCEMAP: ${{ github.ref_name != 'main' }}
38+
- name: Upload Build Artifact
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: ${{ matrix.environment }} Build
42+
path: ./build
43+
# Deployment
44+
deployment-surge:
45+
name: Deploy to Surge
46+
needs: build
47+
runs-on: ubuntu-latest
48+
strategy:
49+
matrix:
50+
environment: ${{ github.ref_name == 'main' && fromJson('["Production", "Beta"]') || fromJson('["Development"]') }}
51+
environment: ${{ matrix.environment }}
52+
if: ${{ success() }}
53+
steps:
54+
- name: Download Build Artifact
55+
uses: actions/download-artifact@v4
56+
with:
57+
name: ${{ matrix.environment }} Build
58+
path: ./build
59+
- name: Deploy to Surge
60+
uses: dswistowski/surge-sh-action@v1
61+
with:
62+
domain: ${{ vars.SURGE_DOMAIN }}
63+
project: './build'
64+
login: ${{ secrets.SURGE_LOGIN }}
65+
token: ${{ secrets.SURGE_TOKEN }}

.github/workflows/node.js.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)