generated from nhcarrigan/template
Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 85a982c03e | |||
| a9c7ebf74d | |||
|
0b19d91444
|
|||
|
74bccd903d
|
|||
|
402acffb5c
|
|||
| a8a58faf3c | |||
| 579dfe96f5 | |||
| 47dd385f05 | |||
| 2851693a70 | |||
| 6ee8189edd | |||
| aaa710eba4 | |||
|
e6112f57cb
|
|||
|
72b7571b92
|
|||
| 6e35d49a34 | |||
|
9c53c22130
|
|||
|
9d9d0809d7
|
|||
|
53274ec38c
|
|||
| 9ada4b9cbe | |||
| 34d71c73aa | |||
| 532461202a | |||
| 50e46368ed |
+14
-5
@@ -8,22 +8,31 @@ on:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint and Test
|
||||
ci:
|
||||
name: CI
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Source Files
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use Node.js v22
|
||||
- name: Use Node.js v24
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
node-version: 24
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 9
|
||||
version: 10
|
||||
|
||||
- name: Ensure Dependencies are Pinned
|
||||
uses: naomi-lgbt/dependency-pin-check@main
|
||||
with:
|
||||
language: javascript
|
||||
dev-dependencies: true
|
||||
peer-dependencies: true
|
||||
optional-dependencies: true
|
||||
|
||||
- name: Install Dependencies
|
||||
run: pnpm install
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
name: Security Scan and Upload
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
schedule:
|
||||
- cron: '0 0 * * 1'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
security-audit:
|
||||
name: Security & DefectDojo Upload
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# --- AUTO-SETUP PROJECT ---
|
||||
- name: Ensure DefectDojo Product Exists
|
||||
env:
|
||||
DD_URL: ${{ secrets.DD_URL }}
|
||||
DD_TOKEN: ${{ secrets.DD_TOKEN }}
|
||||
PRODUCT_NAME: ${{ github.repository }}
|
||||
PRODUCT_TYPE_ID: 1
|
||||
run: |
|
||||
sudo apt-get install jq -y > /dev/null
|
||||
|
||||
echo "Checking connection to $DD_URL..."
|
||||
|
||||
# Check if product exists - capture HTTP code to debug connection issues
|
||||
RESPONSE=$(curl --write-out "%{http_code}" --silent --output /tmp/response.json \
|
||||
-H "Authorization: Token $DD_TOKEN" \
|
||||
"$DD_URL/api/v2/products/?name=$PRODUCT_NAME")
|
||||
|
||||
# If response is not 200, print error
|
||||
if [ "$RESPONSE" != "200" ]; then
|
||||
echo "::error::Failed to query DefectDojo. HTTP Code: $RESPONSE"
|
||||
cat /tmp/response.json
|
||||
exit 1
|
||||
fi
|
||||
|
||||
COUNT=$(cat /tmp/response.json | jq -r '.count')
|
||||
|
||||
if [ "$COUNT" = "0" ]; then
|
||||
echo "Creating product '$PRODUCT_NAME'..."
|
||||
curl -s -X POST "$DD_URL/api/v2/products/" \
|
||||
-H "Authorization: Token $DD_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{ "name": "'"$PRODUCT_NAME"'", "description": "Auto-created by Gitea Actions", "prod_type": '$PRODUCT_TYPE_ID' }'
|
||||
else
|
||||
echo "Product '$PRODUCT_NAME' already exists."
|
||||
fi
|
||||
|
||||
# --- 1. TRIVY (Dependencies & Misconfig) ---
|
||||
- name: Install Trivy
|
||||
run: |
|
||||
sudo apt-get install wget apt-transport-https gnupg lsb-release -y
|
||||
wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | sudo apt-key add -
|
||||
echo "deb https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main" | sudo tee -a /etc/apt/sources.list.d/trivy.list
|
||||
sudo apt-get update && sudo apt-get install trivy -y
|
||||
|
||||
- name: Run Trivy (FS Scan)
|
||||
run: |
|
||||
trivy fs . --scanners vuln,misconfig --format json --output trivy-results.json --exit-code 0
|
||||
|
||||
- name: Upload Trivy to DefectDojo
|
||||
env:
|
||||
DD_URL: ${{ secrets.DD_URL }}
|
||||
DD_TOKEN: ${{ secrets.DD_TOKEN }}
|
||||
run: |
|
||||
echo "Uploading Trivy results..."
|
||||
# Generate today's date in YYYY-MM-DD format
|
||||
TODAY=$(date +%Y-%m-%d)
|
||||
|
||||
HTTP_CODE=$(curl --write-out "%{http_code}" --output response.txt --silent -X POST "$DD_URL/api/v2/import-scan/" \
|
||||
-H "Authorization: Token $DD_TOKEN" \
|
||||
-F "active=true" \
|
||||
-F "verified=true" \
|
||||
-F "scan_type=Trivy Scan" \
|
||||
-F "engagement_name=CI/CD Pipeline" \
|
||||
-F "product_name=${{ github.repository }}" \
|
||||
-F "scan_date=$TODAY" \
|
||||
-F "auto_create_context=true" \
|
||||
-F "file=@trivy-results.json")
|
||||
|
||||
if [[ "$HTTP_CODE" != "200" && "$HTTP_CODE" != "201" ]]; then
|
||||
echo "::error::Upload Failed with HTTP $HTTP_CODE"
|
||||
echo "--- SERVER RESPONSE ---"
|
||||
cat response.txt
|
||||
echo "-----------------------"
|
||||
exit 1
|
||||
else
|
||||
echo "Upload Success!"
|
||||
fi
|
||||
|
||||
# --- 2. GITLEAKS (Secrets) ---
|
||||
- name: Install Gitleaks
|
||||
run: |
|
||||
wget -qO gitleaks.tar.gz https://github.com/gitleaks/gitleaks/releases/download/v8.18.0/gitleaks_8.18.0_linux_x64.tar.gz
|
||||
tar -xzf gitleaks.tar.gz
|
||||
sudo mv gitleaks /usr/local/bin/ && chmod +x /usr/local/bin/gitleaks
|
||||
|
||||
- name: Run Gitleaks
|
||||
run: gitleaks detect --source . -v --report-path gitleaks-results.json --report-format json --no-git || true
|
||||
|
||||
- name: Upload Gitleaks to DefectDojo
|
||||
env:
|
||||
DD_URL: ${{ secrets.DD_URL }}
|
||||
DD_TOKEN: ${{ secrets.DD_TOKEN }}
|
||||
run: |
|
||||
echo "Uploading Gitleaks results..."
|
||||
TODAY=$(date +%Y-%m-%d)
|
||||
|
||||
HTTP_CODE=$(curl --write-out "%{http_code}" --output response.txt --silent -X POST "$DD_URL/api/v2/import-scan/" \
|
||||
-H "Authorization: Token $DD_TOKEN" \
|
||||
-F "active=true" \
|
||||
-F "verified=true" \
|
||||
-F "scan_type=Gitleaks Scan" \
|
||||
-F "engagement_name=CI/CD Pipeline" \
|
||||
-F "product_name=${{ github.repository }}" \
|
||||
-F "scan_date=$TODAY" \
|
||||
-F "auto_create_context=true" \
|
||||
-F "file=@gitleaks-results.json")
|
||||
|
||||
if [[ "$HTTP_CODE" != "200" && "$HTTP_CODE" != "201" ]]; then
|
||||
echo "::error::Upload Failed with HTTP $HTTP_CODE"
|
||||
echo "--- SERVER RESPONSE ---"
|
||||
cat response.txt
|
||||
echo "-----------------------"
|
||||
exit 1
|
||||
else
|
||||
echo "Upload Success!"
|
||||
fi
|
||||
|
||||
# --- 3. SEMGREP (SAST) ---
|
||||
- name: Install Semgrep (via pipx)
|
||||
run: |
|
||||
sudo apt-get install pipx -y
|
||||
pipx install semgrep
|
||||
# Add pipx binary path to GITHUB_PATH so next steps can see 'semgrep'
|
||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Run Semgrep
|
||||
run: semgrep scan --config=p/security-audit --config=p/owasp-top-ten --json --output semgrep-results.json . || true
|
||||
|
||||
- name: Upload Semgrep to DefectDojo
|
||||
env:
|
||||
DD_URL: ${{ secrets.DD_URL }}
|
||||
DD_TOKEN: ${{ secrets.DD_TOKEN }}
|
||||
run: |
|
||||
echo "Uploading Semgrep results..."
|
||||
TODAY=$(date +%Y-%m-%d)
|
||||
|
||||
HTTP_CODE=$(curl --write-out "%{http_code}" --output response.txt --silent -X POST "$DD_URL/api/v2/import-scan/" \
|
||||
-H "Authorization: Token $DD_TOKEN" \
|
||||
-F "active=true" \
|
||||
-F "verified=true" \
|
||||
-F "scan_type=Semgrep JSON Report" \
|
||||
-F "engagement_name=CI/CD Pipeline" \
|
||||
-F "product_name=${{ github.repository }}" \
|
||||
-F "scan_date=$TODAY" \
|
||||
-F "auto_create_context=true" \
|
||||
-F "file=@semgrep-results.json")
|
||||
|
||||
if [[ "$HTTP_CODE" != "200" && "$HTTP_CODE" != "201" ]]; then
|
||||
echo "::error::Upload Failed with HTTP $HTTP_CODE"
|
||||
echo "--- SERVER RESPONSE ---"
|
||||
cat response.txt
|
||||
echo "-----------------------"
|
||||
exit 1
|
||||
else
|
||||
echo "Upload Success!"
|
||||
fi
|
||||
@@ -0,0 +1,25 @@
|
||||
# Package Manager Configuration
|
||||
# Force pnpm usage - breaks npm/yarn intentionally
|
||||
node-linker=pnpm
|
||||
|
||||
# Security: Disable all lifecycle scripts
|
||||
ignore-scripts=true
|
||||
enable-pre-post-scripts=false
|
||||
|
||||
# Security: Require packages to be 10+ days old before installation
|
||||
minimum-release-age=14400
|
||||
|
||||
# Security: Verify package integrity hashes
|
||||
verify-store-integrity=true
|
||||
|
||||
# Security: Enforce strict trust policies
|
||||
trust-policy=strict
|
||||
|
||||
# Security: Strict peer dependency resolution
|
||||
strict-peer-dependencies=true
|
||||
|
||||
# Performance: Use symlinks for node_modules
|
||||
symlink=true
|
||||
|
||||
# Lockfile: Ensure lockfile is not modified during install
|
||||
frozen-lockfile=false
|
||||
@@ -18,7 +18,7 @@ This page is currently deployed. [View the live website.]
|
||||
|
||||
## Feedback and Bugs
|
||||
|
||||
If you have feedback or a bug report, please feel free to open a GitHub issue!
|
||||
If you have feedback or a bug report, please [log a ticket on our forum](https://support.nhcarrigan.com).
|
||||
|
||||
## Contributing
|
||||
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@
|
||||
"@nhcarrigan/discord-analytics": "0.0.6",
|
||||
"@nhcarrigan/logger": "1.1.1",
|
||||
"@retroachievements/api": "2.6.0",
|
||||
"discord.js": "14.22.0",
|
||||
"discord.js": "14.25.1",
|
||||
"fastify": "5.5.0",
|
||||
"node-schedule": "2.1.1",
|
||||
"octokit": "5.0.3",
|
||||
|
||||
Generated
+34
-32
@@ -10,7 +10,7 @@ importers:
|
||||
dependencies:
|
||||
'@nhcarrigan/discord-analytics':
|
||||
specifier: 0.0.6
|
||||
version: 0.0.6(@nhcarrigan/logger@1.1.1)(discord.js@14.22.0)
|
||||
version: 0.0.6(@nhcarrigan/logger@1.1.1)(discord.js@14.25.1)
|
||||
'@nhcarrigan/logger':
|
||||
specifier: 1.1.1
|
||||
version: 1.1.1
|
||||
@@ -18,8 +18,8 @@ importers:
|
||||
specifier: 2.6.0
|
||||
version: 2.6.0
|
||||
discord.js:
|
||||
specifier: 14.22.0
|
||||
version: 14.22.0
|
||||
specifier: 14.25.1
|
||||
version: 14.25.1
|
||||
fastify:
|
||||
specifier: 5.5.0
|
||||
version: 5.5.0
|
||||
@@ -62,8 +62,8 @@ packages:
|
||||
resolution: {integrity: sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
|
||||
'@discordjs/builders@1.11.3':
|
||||
resolution: {integrity: sha512-p3kf5eV49CJiRTfhtutUCeivSyQ/l2JlKodW1ZquRwwvlOWmG9+6jFShX6x8rUiYhnP6wKI96rgN/SXMy5e5aw==}
|
||||
'@discordjs/builders@1.13.1':
|
||||
resolution: {integrity: sha512-cOU0UDHc3lp/5nKByDxkmRiNZBpdp0kx55aarbiAfakfKJHlxv/yFW1zmIqCAmwH5CRlrH9iMFKJMpvW4DPB+w==}
|
||||
engines: {node: '>=16.11.0'}
|
||||
|
||||
'@discordjs/collection@1.5.3':
|
||||
@@ -74,16 +74,16 @@ packages:
|
||||
resolution: {integrity: sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
'@discordjs/formatters@0.6.1':
|
||||
resolution: {integrity: sha512-5cnX+tASiPCqCWtFcFslxBVUaCetB0thvM/JyavhbXInP1HJIEU+Qv/zMrnuwSsX3yWH2lVXNJZeDK3EiP4HHg==}
|
||||
'@discordjs/formatters@0.6.2':
|
||||
resolution: {integrity: sha512-y4UPwWhH6vChKRkGdMB4odasUbHOUwy7KL+OVwF86PvT6QVOwElx+TiI1/6kcmcEe+g5YRXJFiXSXUdabqZOvQ==}
|
||||
engines: {node: '>=16.11.0'}
|
||||
|
||||
'@discordjs/rest@2.6.0':
|
||||
resolution: {integrity: sha512-RDYrhmpB7mTvmCKcpj+pc5k7POKszS4E2O9TYc+U+Y4iaCP+r910QdO43qmpOja8LRr1RJ0b3U+CqVsnPqzf4w==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
'@discordjs/util@1.1.1':
|
||||
resolution: {integrity: sha512-eddz6UnOBEB1oITPinyrB2Pttej49M9FZQY8NxgEvc3tq6ZICZ19m70RsmzRdDHk80O9NoYN/25AqJl8vPVf/g==}
|
||||
'@discordjs/util@1.2.0':
|
||||
resolution: {integrity: sha512-3LKP7F2+atl9vJFhaBjn4nOaSWahZ/yWjOvA4e5pnXkt2qyXRCHLxoBQy81GFtLGCq7K9lPm9R517M1U+/90Qg==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
'@discordjs/ws@1.2.3':
|
||||
@@ -1062,11 +1062,11 @@ packages:
|
||||
resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
discord-api-types@0.38.20:
|
||||
resolution: {integrity: sha512-wJSmFFi8eoFL/jIosUQLoXeCv7YK+l7joKmFCsnkx7HWSFt5xScNQdhvILLxC0oU6J5bK0ppR7GZ1d4NJScSNQ==}
|
||||
discord-api-types@0.38.38:
|
||||
resolution: {integrity: sha512-7qcM5IeZrfb+LXW07HvoI5L+j4PQeMZXEkSm1htHAHh4Y9JSMXBWjy/r7zmUCOj4F7zNjMcm7IMWr131MT2h0Q==}
|
||||
|
||||
discord.js@14.22.0:
|
||||
resolution: {integrity: sha512-IDSeDdWSEA4DoOyspekbetcFKkEonJO09cxR+kqQQlTWd5CTm/3Z48I4Te+EL8uxn52s718FZ0rI2dLxRkTpwg==}
|
||||
discord.js@14.25.1:
|
||||
resolution: {integrity: sha512-2l0gsPOLPs5t6GFZfQZKnL1OJNYFcuC/ETWsW4VtKVD/tg4ICa9x+jb9bkPffkMdRpRpuUaO/fKkHCBeiCKh8g==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
doctrine@2.1.0:
|
||||
@@ -2400,12 +2400,12 @@ snapshots:
|
||||
|
||||
'@babel/helper-validator-identifier@7.27.1': {}
|
||||
|
||||
'@discordjs/builders@1.11.3':
|
||||
'@discordjs/builders@1.13.1':
|
||||
dependencies:
|
||||
'@discordjs/formatters': 0.6.1
|
||||
'@discordjs/util': 1.1.1
|
||||
'@discordjs/formatters': 0.6.2
|
||||
'@discordjs/util': 1.2.0
|
||||
'@sapphire/shapeshift': 4.0.0
|
||||
discord-api-types: 0.38.20
|
||||
discord-api-types: 0.38.38
|
||||
fast-deep-equal: 3.1.3
|
||||
ts-mixer: 6.0.4
|
||||
tslib: 2.8.1
|
||||
@@ -2414,33 +2414,35 @@ snapshots:
|
||||
|
||||
'@discordjs/collection@2.1.1': {}
|
||||
|
||||
'@discordjs/formatters@0.6.1':
|
||||
'@discordjs/formatters@0.6.2':
|
||||
dependencies:
|
||||
discord-api-types: 0.38.20
|
||||
discord-api-types: 0.38.38
|
||||
|
||||
'@discordjs/rest@2.6.0':
|
||||
dependencies:
|
||||
'@discordjs/collection': 2.1.1
|
||||
'@discordjs/util': 1.1.1
|
||||
'@discordjs/util': 1.2.0
|
||||
'@sapphire/async-queue': 1.5.5
|
||||
'@sapphire/snowflake': 3.5.3
|
||||
'@vladfrangu/async_event_emitter': 2.4.6
|
||||
discord-api-types: 0.38.20
|
||||
discord-api-types: 0.38.38
|
||||
magic-bytes.js: 1.12.1
|
||||
tslib: 2.8.1
|
||||
undici: 6.21.3
|
||||
|
||||
'@discordjs/util@1.1.1': {}
|
||||
'@discordjs/util@1.2.0':
|
||||
dependencies:
|
||||
discord-api-types: 0.38.38
|
||||
|
||||
'@discordjs/ws@1.2.3':
|
||||
dependencies:
|
||||
'@discordjs/collection': 2.1.1
|
||||
'@discordjs/rest': 2.6.0
|
||||
'@discordjs/util': 1.1.1
|
||||
'@discordjs/util': 1.2.0
|
||||
'@sapphire/async-queue': 1.5.5
|
||||
'@types/ws': 8.18.1
|
||||
'@vladfrangu/async_event_emitter': 2.4.6
|
||||
discord-api-types: 0.38.20
|
||||
discord-api-types: 0.38.38
|
||||
tslib: 2.8.1
|
||||
ws: 8.18.3
|
||||
transitivePeerDependencies:
|
||||
@@ -2639,10 +2641,10 @@ snapshots:
|
||||
|
||||
'@jridgewell/sourcemap-codec@1.5.5': {}
|
||||
|
||||
'@nhcarrigan/discord-analytics@0.0.6(@nhcarrigan/logger@1.1.1)(discord.js@14.22.0)':
|
||||
'@nhcarrigan/discord-analytics@0.0.6(@nhcarrigan/logger@1.1.1)(discord.js@14.25.1)':
|
||||
dependencies:
|
||||
'@nhcarrigan/logger': 1.1.1
|
||||
discord.js: 14.22.0
|
||||
discord.js: 14.25.1
|
||||
node-schedule: 2.1.1
|
||||
|
||||
'@nhcarrigan/eslint-config@5.2.0(@typescript-eslint/utils@8.40.0(eslint@9.33.0)(typescript@5.9.2))(eslint@9.33.0)(playwright@1.54.2)(react@19.1.1)(typescript@5.9.2)(vitest@3.2.4(@types/node@24.3.0))':
|
||||
@@ -3443,18 +3445,18 @@ snapshots:
|
||||
dependencies:
|
||||
path-type: 4.0.0
|
||||
|
||||
discord-api-types@0.38.20: {}
|
||||
discord-api-types@0.38.38: {}
|
||||
|
||||
discord.js@14.22.0:
|
||||
discord.js@14.25.1:
|
||||
dependencies:
|
||||
'@discordjs/builders': 1.11.3
|
||||
'@discordjs/builders': 1.13.1
|
||||
'@discordjs/collection': 1.5.3
|
||||
'@discordjs/formatters': 0.6.1
|
||||
'@discordjs/formatters': 0.6.2
|
||||
'@discordjs/rest': 2.6.0
|
||||
'@discordjs/util': 1.1.1
|
||||
'@discordjs/util': 1.2.0
|
||||
'@discordjs/ws': 1.2.3
|
||||
'@sapphire/snowflake': 3.5.3
|
||||
discord-api-types: 0.38.20
|
||||
discord-api-types: 0.38.38
|
||||
fast-deep-equal: 3.1.3
|
||||
lodash.snakecase: 4.1.1
|
||||
magic-bytes.js: 1.12.1
|
||||
|
||||
+25
-1
@@ -6,15 +6,26 @@
|
||||
|
||||
export const ids = {
|
||||
channels: {
|
||||
formSubmissions: "1410435042898874471",
|
||||
accessibilityForum: "1451006622838030509",
|
||||
billingQuestions: "1451010972771811480",
|
||||
bugReports: "1447723804330823763",
|
||||
communityFeedback: "1447726591189975210",
|
||||
featureRequests: "1447726510369931295",
|
||||
formSubmissions: "1448445144071147520",
|
||||
gaming: "1385797656307175468",
|
||||
general: "1385797320389431336",
|
||||
legalNotices: "1451009920479793254",
|
||||
marketingProposals: "1451012386327756902",
|
||||
menteeChat: "1400589073613062204",
|
||||
mentorshipGoalForum: "1400629118110011526",
|
||||
mentorshipProjectForum: "1400616702265266186",
|
||||
naomiDiscussionForum: "1408154690121633917",
|
||||
news: "1407804798677418198",
|
||||
partnershipRequests: "1451009066355654829",
|
||||
policyIdeation: "1417294974046965842",
|
||||
pressInquiries: "1451011543482368163",
|
||||
resumeReviewForum: "1407807555266154496",
|
||||
technicalSupport: "1451014823440678972",
|
||||
},
|
||||
guilds: {
|
||||
nhcarrigan: "1354624415861833870",
|
||||
@@ -41,6 +52,19 @@ export const ids = {
|
||||
member: "1407807699718111292",
|
||||
naomi: "1407807752549699727",
|
||||
},
|
||||
unanswered: {
|
||||
accessibilityForum: "1451008476779122869",
|
||||
billingQuestions: "1451011252301205524",
|
||||
bugReports: "1447726213446500555",
|
||||
communityFeedback: "1447726807595094036",
|
||||
featureRequests: "1447726899919978677",
|
||||
legalNotices: "1451010521687130313",
|
||||
marketingProposals: "1451012664858906720",
|
||||
partnershipRequests: "1451009530459586650",
|
||||
policyIdeation: "1447755602318196828",
|
||||
pressInquiries: "1451012067841544223",
|
||||
technicalSupport: "1451015143646298132",
|
||||
},
|
||||
},
|
||||
users: {
|
||||
amari: "1406431359345496255",
|
||||
|
||||
@@ -3,25 +3,47 @@
|
||||
* @license Naomi's Public License
|
||||
* @author Naomi Carrigan
|
||||
*/
|
||||
import type { ProgressReminder } from "../interfaces/reminder.js";
|
||||
|
||||
interface Channel {
|
||||
channelId: string;
|
||||
roleId: string;
|
||||
name: string;
|
||||
createThread: boolean;
|
||||
}
|
||||
|
||||
const nhcarriganMentorshipChannels: Array<Channel> = [
|
||||
|
||||
const nhcarriganMentorshipChannels: Array<ProgressReminder> = [
|
||||
{
|
||||
channelId: "1400630073010163792",
|
||||
createThread: true,
|
||||
name: "accountability",
|
||||
roleId: "1400588705273745550",
|
||||
},
|
||||
];
|
||||
const freeCodeCampSprintChannels: Array<Channel> = [
|
||||
|
||||
const freeCodeCampSprintChannels: Array<ProgressReminder> = [
|
||||
{
|
||||
channelId: "1424801426160488520",
|
||||
createThread: true,
|
||||
name: "JS Objects/Arrays/Loops",
|
||||
roleId: "1425506225453273224",
|
||||
},
|
||||
{
|
||||
channelId: "1424801426160488520",
|
||||
createThread: true,
|
||||
name: "Python Basics",
|
||||
roleId: "1450187499912695838",
|
||||
},
|
||||
{
|
||||
channelId: "1424801426160488520",
|
||||
createThread: true,
|
||||
name: "Miscellaneous Sprints",
|
||||
roleId: "1450672361291513916",
|
||||
},
|
||||
{
|
||||
channelId: "1442575112384811158",
|
||||
createThread: false,
|
||||
name: "Alpha and Omega",
|
||||
roleId: "1458984977101230196",
|
||||
},
|
||||
];
|
||||
|
||||
/**
|
||||
* The channels to post progress reminders in.
|
||||
*/
|
||||
export const progressReminders: Array<Channel> = [
|
||||
export const progressReminders: Array<ProgressReminder> = [
|
||||
...nhcarriganMentorshipChannels,
|
||||
...freeCodeCampSprintChannels,
|
||||
];
|
||||
|
||||
+55
-23
@@ -5,23 +5,23 @@
|
||||
*/
|
||||
|
||||
import { DiscordAnalytics } from "@nhcarrigan/discord-analytics";
|
||||
import { Client,
|
||||
import {
|
||||
Client,
|
||||
GatewayIntentBits,
|
||||
Events,
|
||||
Partials,
|
||||
MessageFlags } from "discord.js";
|
||||
MessageFlags,
|
||||
} from "discord.js";
|
||||
import { scheduleJob } from "node-schedule";
|
||||
import { App } from "octokit";
|
||||
import { ids } from "./config/ids.js";
|
||||
import { handleMessageCreate } from "./events/handleMessageCreate.js";
|
||||
import { cacheData } from "./modules/cacheData.js";
|
||||
import { checkRetroAchievements } from "./modules/checkAchievements.js";
|
||||
import { getForumTagId } from "./modules/getForumTagId.js";
|
||||
import { logMenteeJoin } from "./modules/logMenteeJoin.js";
|
||||
import { logMenteeLeave } from "./modules/logMenteeLeave.js";
|
||||
import {
|
||||
postFreeCodeCampNews,
|
||||
postHackerNews,
|
||||
} from "./modules/postNews.js";
|
||||
import { postFreeCodeCampNews, postHackerNews } from "./modules/postNews.js";
|
||||
import { postProgressReminders } from "./modules/postProgressReminders.js";
|
||||
import { processMentorshipRole } from "./modules/processMentorshipRole.js";
|
||||
import { processUserGuildTag } from "./modules/processUserGuildTag.js";
|
||||
@@ -30,8 +30,10 @@ import { instantiateServer } from "./server/serve.js";
|
||||
import { logger } from "./utils/logger.js";
|
||||
import type { Amari } from "./interfaces/amari.js";
|
||||
|
||||
if (process.env.GH_CLIENT_ID === undefined
|
||||
|| process.env.GH_PRIVATE_KEY === undefined) {
|
||||
if (
|
||||
process.env.GH_CLIENT_ID === undefined
|
||||
|| process.env.GH_PRIVATE_KEY === undefined
|
||||
) {
|
||||
throw new Error("Cannot initialise GitHub!");
|
||||
}
|
||||
|
||||
@@ -41,17 +43,22 @@ const githubApp = new App({
|
||||
});
|
||||
const octokit = await githubApp.getInstallationOctokit(83_119_105);
|
||||
const { data } = await octokit.rest.apps.getAuthenticated();
|
||||
await logger.log("debug", `Authenticated to GitHub as ${data?.name ?? "unknown"}`);
|
||||
await logger.log(
|
||||
"debug",
|
||||
`Authenticated to GitHub as ${data?.name ?? "unknown"}`,
|
||||
);
|
||||
|
||||
const amari: Amari = {
|
||||
discord: new Client({ intents: [
|
||||
GatewayIntentBits.Guilds,
|
||||
GatewayIntentBits.GuildMessages,
|
||||
GatewayIntentBits.MessageContent,
|
||||
GatewayIntentBits.GuildMembers,
|
||||
GatewayIntentBits.DirectMessages,
|
||||
],
|
||||
partials: [ Partials.Channel ] }),
|
||||
discord: new Client({
|
||||
intents: [
|
||||
GatewayIntentBits.Guilds,
|
||||
GatewayIntentBits.GuildMessages,
|
||||
GatewayIntentBits.MessageContent,
|
||||
GatewayIntentBits.GuildMembers,
|
||||
GatewayIntentBits.DirectMessages,
|
||||
],
|
||||
partials: [ Partials.Channel ],
|
||||
}),
|
||||
github: octokit,
|
||||
lastRssItems: {
|
||||
freeCodeCamp: null,
|
||||
@@ -63,8 +70,10 @@ const amari: Amari = {
|
||||
const analytics = new DiscordAnalytics(amari.discord, logger);
|
||||
|
||||
amari.discord.once(Events.ClientReady, () => {
|
||||
void logger.log("debug",
|
||||
`Authenticated to Discord as ${amari.discord.user?.username ?? "unknown"}`);
|
||||
void logger.log(
|
||||
"debug",
|
||||
`Authenticated to Discord as ${amari.discord.user?.username ?? "unknown"}`,
|
||||
);
|
||||
void cacheData(amari);
|
||||
analytics.startCron();
|
||||
scheduleJob("post news", "0 * * * *", async() => {
|
||||
@@ -98,10 +107,10 @@ amari.discord.on(Events.InteractionCreate, (interaction) => {
|
||||
void analytics.logGatewayEvent(Events.InteractionCreate, { ...interaction });
|
||||
if (interaction.isButton() && interaction.customId === "resolve") {
|
||||
if (interaction.user.id !== ids.users.naomi) {
|
||||
return void interaction.reply(
|
||||
{ content: "Who are you????",
|
||||
flags: [ MessageFlags.Ephemeral ] },
|
||||
);
|
||||
return void interaction.reply({
|
||||
content: "Who are you????",
|
||||
flags: [ MessageFlags.Ephemeral ],
|
||||
});
|
||||
}
|
||||
return void interaction.message.delete();
|
||||
}
|
||||
@@ -114,6 +123,29 @@ amari.discord.on(Events.InteractionCreate, (interaction) => {
|
||||
});
|
||||
});
|
||||
|
||||
amari.discord.on(Events.ThreadCreate, (thread) => {
|
||||
if (thread.parent?.isThreadOnly() !== true) {
|
||||
return;
|
||||
}
|
||||
const { bugReports, communityFeedback, featureRequests, policyIdeation }
|
||||
= ids.channels;
|
||||
if (
|
||||
![ bugReports,
|
||||
communityFeedback,
|
||||
featureRequests,
|
||||
policyIdeation ].includes(
|
||||
thread.parent.id,
|
||||
)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
const tagId = getForumTagId(thread.parent.id);
|
||||
if (tagId === null) {
|
||||
return;
|
||||
}
|
||||
void thread.setAppliedTags([ tagId ]);
|
||||
});
|
||||
|
||||
amari.discord.on(Events.UserUpdate, (_oldUser, updatedUser) => {
|
||||
void processUserGuildTag(amari, updatedUser);
|
||||
});
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
* @author Naomi Carrigan
|
||||
*/
|
||||
|
||||
/* eslint-disable @typescript-eslint/naming-convention -- Baserow uses snake case */
|
||||
|
||||
export interface FormSubmission {
|
||||
table_id: number;
|
||||
items: Array<{ id: number }>;
|
||||
[key: string]: unknown;
|
||||
id: number;
|
||||
manualSort: number;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* @copyright nhcarrigan
|
||||
* @license Naomi's Public License
|
||||
* @author Naomi Carrigan
|
||||
*/
|
||||
|
||||
export interface ProgressReminder {
|
||||
channelId: string;
|
||||
roleId: string;
|
||||
name: string;
|
||||
createThread: boolean;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* @copyright NHCarrigan
|
||||
* @license Naomi's Public License
|
||||
* @author Naomi Carrigan
|
||||
*/
|
||||
|
||||
import { ids } from "../config/ids.js";
|
||||
|
||||
/**
|
||||
* Grabs the "unanswered" tag ID for a given forum channel ID.
|
||||
* @param id - The ID of the forum channel.
|
||||
* @returns The ID of the "unanswered" tag, or null if not found.
|
||||
*/
|
||||
// eslint-disable-next-line complexity -- This is less complex than trying to narrow the type...
|
||||
export const getForumTagId = (id: string): string | null => {
|
||||
switch (id) {
|
||||
case ids.channels.bugReports:
|
||||
return ids.tags.unanswered.bugReports;
|
||||
case ids.channels.communityFeedback:
|
||||
return ids.tags.unanswered.communityFeedback;
|
||||
case ids.channels.featureRequests:
|
||||
return ids.tags.unanswered.featureRequests;
|
||||
case ids.channels.policyIdeation:
|
||||
return ids.tags.unanswered.policyIdeation;
|
||||
case ids.channels.accessibilityForum:
|
||||
return ids.tags.unanswered.accessibilityForum;
|
||||
case ids.channels.marketingProposals:
|
||||
return ids.tags.unanswered.marketingProposals;
|
||||
case ids.channels.technicalSupport:
|
||||
return ids.tags.unanswered.technicalSupport;
|
||||
case ids.channels.billingQuestions:
|
||||
return ids.tags.unanswered.billingQuestions;
|
||||
case ids.channels.pressInquiries:
|
||||
return ids.tags.unanswered.pressInquiries;
|
||||
case ids.channels.partnershipRequests:
|
||||
return ids.tags.unanswered.partnershipRequests;
|
||||
case ids.channels.legalNotices:
|
||||
return ids.tags.unanswered.legalNotices;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
};
|
||||
@@ -40,13 +40,5 @@ export const logMenteeJoin = async(
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
await channel.send({
|
||||
content: `Hey <@${member.id}>~!
|
||||
|
||||
Welcome to our community! It looks like you may have applied for our mentorship programme!
|
||||
|
||||
If that is correct, you should ping Naomi to grant your role and begin onboarding! <a:love:1364089736557494353>`,
|
||||
});
|
||||
await logger.metric("processed_mentee_join", 1, { user: member.id });
|
||||
};
|
||||
|
||||
@@ -123,6 +123,13 @@ const postHackerNews = async(amari: Amari): Promise<void> => {
|
||||
}
|
||||
await Promise.all(
|
||||
latestPosts.map(async(post) => {
|
||||
if (
|
||||
hasNaughtyWords(post.title)
|
||||
|| hasNaughtyWords(post.contentSnippet)
|
||||
|| hasNaughtyWords(post.content)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
const sent = await channel.send(post.link);
|
||||
if (channel.type === ChannelType.GuildAnnouncement) {
|
||||
await sent.crosspost();
|
||||
|
||||
@@ -3,70 +3,79 @@
|
||||
* @license Naomi's Public License
|
||||
* @author Naomi Carrigan
|
||||
*/
|
||||
import { ChannelType } from "discord.js";
|
||||
import { ChannelType, type TextChannel } from "discord.js";
|
||||
import { progressReminders } from "../config/progressReminders.js";
|
||||
import { logger } from "../utils/logger.js";
|
||||
import type { Amari } from "../interfaces/amari.js";
|
||||
import type { ProgressReminder } from "../interfaces/reminder.js";
|
||||
|
||||
/**
|
||||
* Posts a daily progress check-in reminder in configured channels.
|
||||
* @param amari - Amari's instance.
|
||||
*/
|
||||
// eslint-disable-next-line max-lines-per-function -- shut up
|
||||
export const postProgressReminders = async(
|
||||
amari: Amari,
|
||||
): Promise<void> => {
|
||||
export const postProgressReminders = async(amari: Amari): Promise<void> => {
|
||||
try {
|
||||
const mapped = await Promise.all(
|
||||
progressReminders.map(async(channel) => {
|
||||
progressReminders.map(async(reminder) => {
|
||||
const fetched = await amari.discord.channels.
|
||||
fetch(channel.channelId).
|
||||
fetch(reminder.channelId).
|
||||
catch(() => {
|
||||
void logger.log("warn", `Failed to fetch channel ${channel.name}.`);
|
||||
void logger.log(
|
||||
"warn",
|
||||
`Failed to fetch channel ${reminder.name}.`,
|
||||
);
|
||||
return null;
|
||||
});
|
||||
if (!fetched) {
|
||||
await logger.log("warn", `Channel ${channel.name} not found.`);
|
||||
return null;
|
||||
await logger.log("warn", `Channel ${reminder.name} not found.`);
|
||||
return { channel: null, reminder: reminder };
|
||||
}
|
||||
if (fetched.type !== ChannelType.GuildText) {
|
||||
await logger.log(
|
||||
"warn",
|
||||
`Channel ${channel.name} is not a text channel.`,
|
||||
`Channel ${reminder.name} is not a text channel.`,
|
||||
);
|
||||
return null;
|
||||
return { channel: null, reminder: reminder };
|
||||
}
|
||||
return fetched;
|
||||
return { channel: fetched, reminder: reminder };
|
||||
}),
|
||||
);
|
||||
const filtered = mapped.filter((channel) => {
|
||||
const filtered: Array<{
|
||||
channel: TextChannel;
|
||||
reminder: ProgressReminder;
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- Filter is dumb.
|
||||
}> = mapped.filter(({ channel }) => {
|
||||
return channel !== null;
|
||||
});
|
||||
}) as Array<{
|
||||
channel: TextChannel;
|
||||
reminder: ProgressReminder;
|
||||
}>;
|
||||
await Promise.all(
|
||||
filtered.map(async(channel) => {
|
||||
const isThread = progressReminders.find((c) => {
|
||||
return c.channelId === channel.id;
|
||||
})?.createThread ?? false;
|
||||
const sent = await channel.
|
||||
send({ allowedMentions: {
|
||||
parse: [ "roles" ],
|
||||
},
|
||||
content:
|
||||
`Good morning <@&${
|
||||
progressReminders.find((c) => {
|
||||
return c.channelId === channel.id;
|
||||
})?.roleId ?? channel.guildId
|
||||
}> It is time for your daily progress update. Please share the following in ${isThread
|
||||
? "the thread attached to this message"
|
||||
: "this channel"}:
|
||||
filtered.map(async(reminder) => {
|
||||
const isThread
|
||||
= progressReminders.find((c) => {
|
||||
return c.channelId === reminder.channel.id;
|
||||
})?.createThread ?? false;
|
||||
const sent = await reminder.channel.
|
||||
send({
|
||||
allowedMentions: {
|
||||
parse: [ "roles" ],
|
||||
},
|
||||
content: `Good morning <@&${reminder.reminder.roleId}> It is time for your daily progress update. Please share the following in ${
|
||||
isThread
|
||||
? "the thread attached to this message"
|
||||
: "this channel"
|
||||
}:
|
||||
|
||||
1️⃣ What did you accomplish yesterday?
|
||||
2️⃣ What are you working on today?
|
||||
3️⃣ Are there any blockers or issues you need help with?` }).
|
||||
3️⃣ Are there any blockers or issues you need help with?`,
|
||||
}).
|
||||
catch(() => {
|
||||
void logger.log(
|
||||
"warn",
|
||||
`Failed to send progress reminder in channel ${channel.name}.`,
|
||||
`Failed to send progress reminder in channel ${reminder.channel.name}.`,
|
||||
);
|
||||
return null;
|
||||
});
|
||||
@@ -79,7 +88,7 @@ export const postProgressReminders = async(
|
||||
catch(() => {
|
||||
void logger.log(
|
||||
"warn",
|
||||
`Failed to start thread in channel ${channel.name}.`,
|
||||
`Failed to start thread in channel ${reminder.channel.name}.`,
|
||||
);
|
||||
return null;
|
||||
});
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
|
||||
import { MessageFlags } from "discord.js";
|
||||
import { formIds } from "../config/forms.js";
|
||||
import { ids } from "../config/ids.js";
|
||||
import { logger } from "../utils/logger.js";
|
||||
import type { Amari } from "../interfaces/amari.js";
|
||||
@@ -21,18 +20,26 @@ import type { FastifyRequest, FastifyReply } from "fastify";
|
||||
// eslint-disable-next-line max-lines-per-function -- only long because of analytics.
|
||||
export const processFormSubmission = async(
|
||||
amari: Amari,
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention -- Fastify standard.
|
||||
request: FastifyRequest<{ Body: FormSubmission }>,
|
||||
request: FastifyRequest<{
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention -- Fastify standard.
|
||||
Body: Array<FormSubmission>;
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention -- Fastify standard.
|
||||
Querystring: { form?: string };
|
||||
}>,
|
||||
response: FastifyReply,
|
||||
): Promise<void> => {
|
||||
const { secret } = request.headers;
|
||||
if (secret !== process.env.BASEROW_SECRET
|
||||
|| process.env.BASEROW_SECRET === undefined) {
|
||||
const { authorization: secret } = request.headers;
|
||||
if (
|
||||
secret !== process.env.BASEROW_SECRET
|
||||
|| secret === undefined
|
||||
) {
|
||||
await response.status(403).send({ message: "Invalid Secret Provided." });
|
||||
return;
|
||||
}
|
||||
const { form } = request.query;
|
||||
await response.status(204).send();
|
||||
const channel = amari.discord.channels.cache.get(ids.channels.formSubmissions)
|
||||
const channel
|
||||
= amari.discord.channels.cache.get(ids.channels.formSubmissions)
|
||||
?? await amari.discord.channels.fetch(ids.channels.formSubmissions);
|
||||
if (channel?.isSendable() !== true) {
|
||||
await logger.log(
|
||||
@@ -41,16 +48,16 @@ export const processFormSubmission = async(
|
||||
);
|
||||
return;
|
||||
}
|
||||
const { table_id: table, items } = request.body;
|
||||
const rowIds = items.map((item) => {
|
||||
return item.id;
|
||||
}).join(", ");
|
||||
const tableName = formIds[table];
|
||||
const submissionIds = request.body.map((item) => {
|
||||
return `${item.id.toString()} (${item.manualSort.toString()})`;
|
||||
});
|
||||
await channel.send({
|
||||
components: [
|
||||
{
|
||||
content: `${tableName ?? "Unknown Form"} Submission Received!\n\nRow ID(s): ${rowIds}`,
|
||||
type: 10,
|
||||
content: `${
|
||||
form ?? "Unknown Form"
|
||||
} Submission Received!\n\nRow ID(s): ${submissionIds.join(", ")}`,
|
||||
type: 10,
|
||||
},
|
||||
{
|
||||
components: [
|
||||
@@ -68,5 +75,7 @@ export const processFormSubmission = async(
|
||||
],
|
||||
flags: [ MessageFlags.IsComponentsV2 ],
|
||||
});
|
||||
await logger.metric("processed_form_submission", 1, { table: String(table) });
|
||||
await logger.metric("processed_form_submission", 1, {
|
||||
table: String(request.body),
|
||||
});
|
||||
};
|
||||
|
||||
@@ -46,11 +46,11 @@ export const processMentorshipRole = async(
|
||||
|
||||
Welcome to our mentorship programme! We are excited to have you here and help you grow and reach success.
|
||||
|
||||
To get started, please make sure you have accepted the GitHub invite for your dedicated repository under the [NHCarrigan Mentorship organsation](<https://github.com/nhcarrigan-mentorship>).
|
||||
To get started, please ping Naomi with your GitHub username and your first and last name. She will invite you to your dedicated repository in the [NHCarrigan Mentorship organsation](<https://github.com/nhcarrigan-mentorship>) where you can work on your flagship project.
|
||||
|
||||
Once you have done this, your next step is to read our [wiki](<https://nhcarrigan.notion.site/mentorship-wiki>). Then, create your post in <#1400629118110011526> as outlined in the wiki.
|
||||
Once you have done this, your next step is to read our [wiki](<https://docs.nhcarrigan.com/mentorship/00-faq/>). Then, create your goal-setting post in <#1400629118110011526> and your project-planning post in <#1400616702265266186> as outlined in the wiki.
|
||||
|
||||
Naomi will follow up with you from there! Best of luck on your journey~! <a:love:1364089736557494353>`,
|
||||
If at any time you need some guidance, support, or review, please ping Naomi! She's always happy to help you succeed in your mentorship! Best of luck on your journey~! <a:love:1364089736557494353>`,
|
||||
});
|
||||
await logger.metric("processed_mentorship_role", 1, {
|
||||
user: updatedMember.id,
|
||||
|
||||
+13
-10
@@ -70,7 +70,7 @@ export const instantiateServer = (amari: Amari): void => {
|
||||
});
|
||||
|
||||
server.post<{
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention -- Fastify standard.
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention -- Fastify standard.
|
||||
Body: GithubPayload;
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention -- Fastify standard.
|
||||
Querystring: { secret: string };
|
||||
@@ -87,16 +87,19 @@ export const instantiateServer = (amari: Amari): void => {
|
||||
|
||||
server.
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention -- Fastify standard.
|
||||
post<{ Body: FormSubmission }>("/form", async(request, response) => {
|
||||
try {
|
||||
await processFormSubmission(amari, request, response);
|
||||
} catch (error) {
|
||||
if (!(error instanceof Error)) {
|
||||
return;
|
||||
post<{ Body: Array<FormSubmission>; Querystring: { form: string } }>(
|
||||
"/form",
|
||||
async(request, response) => {
|
||||
try {
|
||||
await processFormSubmission(amari, request, response);
|
||||
} catch (error) {
|
||||
if (!(error instanceof Error)) {
|
||||
return;
|
||||
}
|
||||
await logger.error("/form route", error);
|
||||
}
|
||||
await logger.error("/form route", error);
|
||||
}
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
server.listen({ port: 7044 }, (error) => {
|
||||
if (error) {
|
||||
|
||||
Reference in New Issue
Block a user