Skip to content
This repository was archived by the owner on Sep 18, 2025. It is now read-only.

Commit 6844e4b

Browse files
Repo Created
0 parents  commit 6844e4b

262 files changed

Lines changed: 29330 additions & 0 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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"presets": ["next/babel"],
3+
"plugins": [["styled-components", { "ssr": true }]]
4+
}

‎.eslintignore‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.next/
2+
out/
3+
node_modules/
4+
.idea_modules/
5+
.idea/

‎.eslintrc.json‎

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"root": true,
3+
"parser": "@babel/eslint-parser",
4+
"env": {
5+
"es6": true,
6+
"node": true,
7+
"browser": true
8+
},
9+
"parserOptions": {
10+
"ecmaVersion": 2018,
11+
"sourceType": "module"
12+
},
13+
"extends": [
14+
"eslint:recommended",
15+
"plugin:react/recommended",
16+
"plugin:react/jsx-runtime",
17+
"plugin:prettier/recommended"
18+
],
19+
"rules": {
20+
"no-underscore-dangle": "off",
21+
"implicit-arrow-linebreak": "off",
22+
"no-console": "warn",
23+
"import/prefer-default-export": "off",
24+
"no-unused-vars": "warn",
25+
"react/prop-types": "off"
26+
},
27+
"overrides": [
28+
{
29+
"files": ["**/*.ts", "**/*.tsx"],
30+
"env": {
31+
"es6": true,
32+
"node": true
33+
},
34+
"parserOptions": {
35+
"ecmaVersion": 2018,
36+
"sourceType": "module",
37+
"project": "./tsconfig.json"
38+
},
39+
"plugins": ["eslint-plugin-tsdoc"],
40+
"extends": [
41+
"plugin:@typescript-eslint/recommended",
42+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
43+
"plugin:@typescript-eslint/strict",
44+
"plugin:react/recommended",
45+
"plugin:react/jsx-runtime",
46+
"plugin:prettier/recommended"
47+
],
48+
"rules": {
49+
"no-underscore-dangle": "off",
50+
"implicit-arrow-linebreak": "off",
51+
"no-console": "warn",
52+
"import/prefer-default-export": "off",
53+
"no-unused-vars": "off",
54+
"@typescript-eslint/no-unused-vars": ["warn"],
55+
"tsdoc/syntax": "warn",
56+
"@typescript-eslint/consistent-indexed-object-style": [
57+
"warn",
58+
"index-signature"
59+
],
60+
"@typescript-eslint/consistent-type-definitions": ["warn", "type"],
61+
"@typescript-eslint/no-unsafe-assignment": "warn",
62+
"@typescript-eslint/no-unsafe-member-access": "warn",
63+
"@typescript-eslint/ban-ts-comment": "warn",
64+
"no-unsafe-optional-chaining": "warn"
65+
66+
}
67+
}
68+
]
69+
}

‎.github/ISSUE_TEMPLATE/feature.md‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature
3+
about: New feature template
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
## Context
11+
12+
Background information relevant to the ticket
13+
14+
## Requirements
15+
16+
What you need to implement
17+
18+
## Acceptance Criteria
19+
20+
- [ ] Criteria

‎.github/pull_request_template.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
### PR Title
2+
3+
One liner about what this PR changes and why
4+
5+
6+
#### Dev Checklist
7+
- [ ] If there was a database change, did you create an upgrade script.
8+
- [ ] Did you link the related github issue(s)?
9+
- [ ] Did you list any known issues/questions with the PR?
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Send Event Reminder
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "3 12 * * *" # Runs daily at 12:03 PM UTC (7:03 AM EST)
7+
8+
jobs:
9+
averageWeek:
10+
name: Send Reminder Emails
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Post Request
17+
env:
18+
INTERNAL_SECRET: ${{ secrets.INTERNAL_SECRET }}
19+
TIMERANGE_START: 24
20+
TIMERANGE_END: 48
21+
BASE_URL: https://dev.volunteer.bitsofgood.org
22+
run: |
23+
SECRET=${INTERNAL_SECRET}
24+
START=${TIMERANGE_START}
25+
END=${TIMERANGE_END}
26+
BASE_URL=${BASE_URL}
27+
28+
if [[ -z "$INTERNAL_SECRET" || -z "$TIMERANGE_START" || -z "$TIMERANGE_END" || -z "$BASE_URL" ]]; then
29+
echo "Error: One or more environment variables are missing or empty."
30+
echo "Debug Info:"
31+
[[ -z "$INTERNAL_SECRET" ]] && echo " - INTERNAL_SECRET is missing or empty."
32+
[[ -z "$TIMERANGE_START" ]] && echo " - TIMERANGE_START is missing or empty."
33+
[[ -z "$TIMERANGE_END" ]] && echo " - TIMERANGE_END is missing or empty."
34+
[[ -z "$BASE_URL" ]] && echo " - BASE_URL is missing or empty."
35+
exit 1
36+
fi
37+
38+
echo "Succeed: Set up env variables"
39+
40+
JSON_DATA="{ \"timeRange\": { \"start\": $START, \"end\": $END }, \"secret\": \"$SECRET\" }"
41+
echo "Succeed: Set up JSON_DATA as request body"
42+
43+
RESPONSE=$(curl -s -i -X POST -H "Content-Type: application/json" -d "$JSON_DATA" "$BASE_URL/api/registrations/reminders" -w "\nHTTP_STATUS:%{http_code}")
44+
45+
# Extract HTTP status code
46+
HTTP_STATUS=$(echo "$RESPONSE" | grep -oP 'HTTP_STATUS:\K\d+')
47+
48+
# Remove status code from response
49+
# RESPONSE=$(echo "$RESPONSE" | sed 's/HTTP_STATUS:[0-9]*//g')
50+
51+
echo "Cleaned API Response: $RESPONSE"
52+
echo "HTTP Status Code: $HTTP_STATUS"
53+
54+
if [[ $RESPONSE == *'"success":true'* ]]; then
55+
echo "POST request was successful."
56+
else
57+
ERROR_MESSAGE=$(echo $RESPONSE | jq -r '.error // "Unknown error"')
58+
echo "POST request failed. Error: $ERROR_MESSAGE"
59+
exit 1
60+
fi

0 commit comments

Comments
 (0)