Skip to content

Creates track-meet.js (for USDC track meet reminders)#608

Open
derekwang99 wants to merge 8 commits into
18F:mainfrom
derekwang99:main
Open

Creates track-meet.js (for USDC track meet reminders)#608
derekwang99 wants to merge 8 commits into
18F:mainfrom
derekwang99:main

Conversation

@derekwang99

@derekwang99 derekwang99 commented May 29, 2026

Copy link
Copy Markdown

The purpose of this PR is to create a bot that automatically posts a message to #usdc-all-fellows every other Friday listing the facilitators for each track's upcoming Wednesday meet, pulling names directly from each track's Slack Canvas schedule.

Schedule logic:
Before 7/8/26: still uses the old 2nd/4th Wednesday rule
From 7/8/26 onwards: checks if the Wednesday is an even number of weeks from the 7/8 anchor — if so, it's a track meet week

The bot code was generated by Claude Sonnet 4.6 and I am not a developer--additional scrutiny is welcome!


Checklist:

  • Code has been formatted with prettier
  • The OAuth wiki
    page has been updated if Charlie needs any new OAuth events or scopes

Comment: Can't figure out how to update the Wiki, but canvases:read can be a new scope and the purpose can be "Required to read Canvas tables in track channels. Used by Track Meet Facilitator bot to fetch facilitator names for the upcoming meet."

  • The Environment Variables
    wiki page has been updated if new environment variables were introduced
    or existing ones changed

Comment: I don't think any new environment variables are introduced. Per Claude: it uses Charlie's existing SLACK_TOKEN for auth and the canvas/channel IDs are hardcoded in the script.

  • The dev wiki has been updated, e.g.:
    • local development processes have changed
    • major development workflows have changed
    • internal utilities or APIs have changed
    • testing or deployment processes have changed
  • If appropriate, the NIST 800-218 documentation has been updated

Comment: Not sure, Claude doesn't think any security practices have changed.

@derekwang99
derekwang99 requested a review from a team as a code owner May 29, 2026 22:13

@derekwang99 derekwang99 left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merges prettier fixes

@rahearn rahearn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No specific changes required to the code, but there are two failing CI checks that need to be addressed before this can be merged

Comment thread src/track-meet.js

const cron = require("node-cron");

const SHARED_CHANNEL_ID = "C05A6Q2PK6G";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[suggestion (non-blocking)] For ease of later debugging, a comment here that includes the channel name and/or a link to open the channel could be useful

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[question] has charlie been invited into this channel? It looks like it's probably a private channel, so if charlie isn't in it then this script likely won't work

Comment thread src/track-meet.js
Design: "F090GG1L478",
Product: "F090QH1MQMQ",
Software: "F0911VCAJTB",
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[question] are all of these canvases shared with the SHARED_CHANNEL_ID? If not, then you might need to double-check if charlie has access to them

Errors addressed:

Error 1 (line 8): import/no-extraneous-dependencies — node-cron not in dependencies

Error 2 (line 147): no-await-in-loop — await inside a loop
This rule flags awaiting inside a loop because it runs async operations one-at-a-time instead of in parallel.
- Bot previously announces next Wednesday but its actually next next Wednesday
- Skips announcement if there are no facilitators for every track (all 5)
Changes were from when I ran prettier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants