Skip to content

Commit c1792eb

Browse files
committed
update token name in updateTopContributors
1 parent 9de6b38 commit c1792eb

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

.env.local.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ MONGODB_URI=mongodb+srv://<your-username>:<your-password>@cluster0.rk4resh.mongo
22
GITHUB_ID=<your-github-client-id>
33
GITHUB_SECRET=<your-github-client-secret>
44
GITHUB_TOKEN=<your_github_personal_access_token>
5+
FCM_GITHUB_TOKEN=<your_github_personal_access_token>
56
NEXTAUTH_URL=http://localhost:3000
67
NEXTAUTH_SECRET=<your-random-secret>
78
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=<your-clerk-pub-key>

.github/workflows/update-contributors.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Update Contributors
1414
run: |
1515
response=$(curl -X POST ${{ secrets.VERCEL_DEPLOYMENT_URL }}/api/updateTopContributors \
16-
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
16+
-H "Authorization: Bearer ${{ secrets.FCM_GITHUB_TOKEN }}" \
1717
-H "Content-Type: application/json" \
1818
-w "\n%{http_code}")
1919
echo "Response: $response"
@@ -22,4 +22,4 @@ jobs:
2222
exit 1
2323
fi
2424
env:
25-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
GITHUB_TOKEN: ${{ secrets.FCM_GITHUB_TOKEN }}

pages/api/updateTopContributors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default async function handler(req, res) {
1111
}
1212

1313
const token = authHeader.split(' ')[1];
14-
if (!token || token !== process.env.GITHUB_TOKEN) {
14+
if (!token || token !== process.env.FCM_GITHUB_TOKEN) {
1515
console.error('Invalid authorization token');
1616
return res.status(401).json({ error: 'Unauthorized' });
1717
}

0 commit comments

Comments
 (0)