Repository navigation
Expand file tree
/
Copy pathwrangler.jsonc
More file actions
128 lines (128 loc) · 6.02 KB
/
Copy pathwrangler.jsonc
File metadata and controls
128 lines (128 loc) · 6.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "codercops-discord-bot",
"main": "src/index.ts",
"compatibility_date": "2026-10-01",
"observability": { "enabled": true },
// The share cards embed two fonts. Bundle them as binary data.
"rules": [{ "type": "Data", "globs": ["**/*.ttf"], "fallthrough": true }],
"triggers": {
// Every day at 04:30 UTC (10:00 IST). On Mondays it posts the leaderboards
// and the learning streaks; on any day it posts the final results of a
// program that has just ended. Keep in sync with DAILY_CRON in src/config.ts.
//
// Every minute: looks for new members to welcome. Keep in sync with
// WELCOME_CRON in src/config.ts.
"crons": ["30 4 * * *", "* * * * *"]
},
// The public pages (leaderboards and share cards) live on our own domain.
// The workers.dev address stays on for Discord and GitHub, which call it
// directly, and redirects old page links here.
"routes": [{ "pattern": "oss.codercops.com", "custom_domain": true }],
// Wrangler switches the workers.dev address off as soon as there is a route,
// unless told otherwise. Discord's interactions endpoint, the GitHub
// webhooks and the /link callback all point at it, so it has to stay on.
"workers_dev": true,
"preview_urls": false,
"kv_namespaces": [{ "binding": "STATE", "id": "a930275781aa44f682ebe9a201d217c7" }],
"vars": {
"DISCORD_APPLICATION_ID": "1192400864573403166",
"DISCORD_PUBLIC_KEY": "371c6c8be1275687285e87e2d76c1a00bb7e640f5382d2309660ac08036aad67",
"DISCORD_GUILD_ID": "1126926837239533728",
// New members get a welcome post here (#introductions). Leave empty to
// switch that off. Needs the Server Members intent on the application.
"CHANNEL_WELCOME": "1484138729256783872",
// #roadmaps, linked from the welcome post.
"CHANNEL_ROADMAPS": "1558902089051148409",
// "on" lets members link their GitHub account with /link. It also needs
// the DISCORD_CLIENT_SECRET secret and the redirect URL
// {PUBLIC_URL}/link/callback under OAuth2 > Redirects in the developer portal.
"LINKING": "on",
// Roles for linked members, by merged PRs in REPOS. The bot's own role has
// to sit above these and needs Manage Roles.
"ROLE_TIERS": [
{ "minPrs": 1, "role": "1558921141094187098", "name": "Contributor" },
{ "minPrs": 5, "role": "1558921056121651251", "name": "Top Contributor" }
],
"CHANNEL_RELEASES": "1558894544618004651",
"CHANNEL_STARTER_ISSUES": "1558894547873046598",
"CHANNEL_MERGED_PRS": "1558894551006056538",
"CHANNEL_LEADERBOARD": "1438503873064210432",
"GITHUB_ORG": "codercops",
"REPOS": "chatcops,ogcops,toolbelt,discord-bot",
"STARTER_LABELS": "good first issue,help wanted",
// Maintainers: no shoutouts and no leaderboard rows for these GitHub logins.
"EXCLUDED_USERS": "anurag629",
// Contributor programs. Each one counts merged PRs that carry `label`, in
// `repos` (default: every repo in REPOS), merged between `start` and `end`,
// and has its own page at /leaderboard/{id}. To run another one, add it
// here; the old ones stay online. `kind` is "merged-prs", the only kind
// there is so far.
"PROGRAMS": [
{
"id": "2026-10",
"title": "CODERCOPS October 2026",
"kind": "merged-prs",
"label": "hacktoberfest-accepted",
"start": "2026-10-01T00:00:00Z",
"end": "2026-10-31T23:59:59Z",
"minPrs": 5,
"topN": 5,
"reward": "a CODERCOPS T-shirt and stickers",
// The reward is ours, not Hacktoberfest's. Say so wherever the leaderboard is shown.
"note": "This swag comes from CODERCOPS's own open source program. It is separate from Hacktoberfest and its rewards."
}
],
// Added to a program's final results post.
"FINAL_RESULTS_NOTE": "Got a PR merged? That's a project for your CODERCOPS profile. Add your GitHub handle or the repo link at <https://app.codercops.com/signup>. Profiles are free.",
// Where the public pages live. Used for links in Discord messages.
"PUBLIC_URL": "https://oss.codercops.com",
// Where Discord sends members back after /link. This exact URL is listed
// under OAuth2 > Redirects in the developer portal, so change both together.
"OAUTH_REDIRECT_URL": "https://codercops-discord-bot.copscoder.workers.dev/link/callback",
// Links on the public leaderboard pages.
"DISCORD_INVITE": "https://discord.gg/mpGdJyjaRQ",
"ISSUES_URL": "https://github.com/search?q=org%3Acodercops+label%3Ahacktoberfest+state%3Aopen+no%3Aassignee+-label%3Ablocked&type=issues",
// Learning roadmaps for /checkin. `forum` is the forum channel that holds
// the log threads, `tag` the forum tag put on new threads.
"ROADMAPS": [
{
"id": "ai-engineer-100",
"name": "100 Days of AI Engineer",
"days": 100,
"url": "https://github.com/anurag629/100DaysOfAIEngineer",
"forum": "1438449770376069143",
"tag": "1558902091781513340"
},
{
"id": "system-design-60",
"name": "System Design in 60 Days",
"days": 60,
"url": "https://anurag629.github.io/system-design-60-days/",
"forum": "1558902094235308072",
"tag": "1558902094235308073"
},
{
"id": "data-science-50",
"name": "50 Days of Data Science",
"days": 50,
"url": "https://github.com/anurag629/50-Days-Data-Science",
"forum": "1558902094235308072",
"tag": "1558902094235308074"
},
{
"id": "gen-ai-21",
"name": "Gen AI Engineer in 3 Weeks",
"days": 21,
"url": "https://github.com/anurag629/gen_ai_engineer",
"forum": "1558902094235308072",
"tag": "1558902094235308075"
}
],
// A check-in day ends at midnight in this time zone. 330 = IST (UTC+5:30).
"CHECKIN_UTC_OFFSET_MINUTES": "330"
}
// Secrets, set with `wrangler secret put`:
// DISCORD_BOT_TOKEN, GITHUB_WEBHOOK_SECRET, and optionally GITHUB_TOKEN
// and DISCORD_CLIENT_SECRET (for /link)
}