Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .github/scripts/copy-prod-db/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ async function main() {
UPDATE \"DiscordClubMetadata\" m
SET
\"guildId\" = '1389762654452580373',
\"leaderboardChannelId\" = '1401739528057655436'
\"leaderboardChannelId\" = '1417161536014778388'
FROM \"DiscordClub\" c
WHERE c.\"id\" = m.\"discordClubId\"
AND c.\"name\" = 'Patina Network';
Expand All @@ -113,10 +113,19 @@ async function main() {
UPDATE \"DiscordClubMetadata\" m
SET
\"guildId\" = '1389762654452580373',
\"leaderboardChannelId\" = '1401739528057655436'
\"leaderboardChannelId\" = '1417161536014778388'
FROM \"DiscordClub\" c
WHERE c.\"id\" = m.\"discordClubId\"
AND c.\"name\" = 'MHC++';

-- Update DiscordClubMetadata for 'GWC - Hunter College'
UPDATE \"DiscordClubMetadata\" m
SET
\"guildId\" = '1389762654452580373',
\"leaderboardChannelId\" = '1417161536014778388'
FROM \"DiscordClub\" c
WHERE c.\"id\" = m.\"discordClubId\"
AND c.\"name\" = 'GWC - Hunter College';
"`;

await sendMessage(prId, `Database copy command completed successfully!`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private void sendLeaderboardCompletedDiscordMessage(final DiscordClub club) {

The new leaderboard just started, so best of luck to everyone!

View the full leaderboard for %s users at https://codebloom.patinanetwork.org/leaderboard?%s=true
View the full leaderboard for %s users at %s/leaderboard/%s?%s=true

Happy LeetCoding,
Codebloom
Expand All @@ -115,6 +115,8 @@ private void sendLeaderboardCompletedDiscordMessage(final DiscordClub club) {
.map(String::valueOf)
.orElse("N/A"),
club.getName(),
serverUrlUtils.getUrl(),
currentLeaderboard.getId(),
club.getTag().name().toLowerCase(),
serverUrlUtils.getUrl());

Expand Down Expand Up @@ -181,7 +183,7 @@ private void sendWeeklyLeaderboardUpdateDiscordMessage(final DiscordClub club) {

Just as a reminder, there's %d day(s), %d hour(s), and %d minute(s) left until the leaderboard closes, so keep grinding!

View the full leaderboard for %s users at https://codebloom.patinanetwork.org/leaderboard?%s=true
View the full leaderboard for %s users at %s/leaderboard?%s=true


See you next week!
Expand Down Expand Up @@ -210,6 +212,7 @@ private void sendWeeklyLeaderboardUpdateDiscordMessage(final DiscordClub club) {
hoursLeft,
minutesLeft,
club.getName(),
serverUrlUtils.getUrl(),
club.getTag().name().toLowerCase(),
serverUrlUtils.getUrl());

Expand Down