Skip to content

[Please Review] Hour Request Approval Feature#2

Open
Jupiterian wants to merge 5 commits into
Project-NexTech:mainfrom
Jupiterian:main
Open

[Please Review] Hour Request Approval Feature#2
Jupiterian wants to merge 5 commits into
Project-NexTech:mainfrom
Jupiterian:main

Conversation

@Jupiterian
Copy link
Copy Markdown

Please review and test this feature one more time before PR.
Any changes have been reflected in an updated README.md and CLAUDE.md

Copilot AI review requested due to automatic review settings May 31, 2026 02:44
@danieleremin danieleremin self-assigned this May 31, 2026
@danieleremin danieleremin requested review from Copilot and danieleremin and removed request for Copilot May 31, 2026 03:24
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds an optional automated hour approval workflow that polls the Hour Verification Google Sheet, DMs approvers with approval controls, and writes results back to Sheets. It also wires the feature into Discord interaction handling and documents the setup.

Changes:

  • Adds Hour Verification polling, approver resolution, DM buttons/modals, and sheet update helpers.
  • Registers hour approval startup and interaction/modal handlers.
  • Adds configuration/docs plus tester/debug scripts for the new workflow.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
utils/sheets.js Adds Hour Verification grid parsing, confirmer column resolution, status writes, and approver lookup helpers.
utils/hourApprovalSync.js Implements polling, DM notifications, button handling, modal handling, and notified-row persistence.
events/ready.js Starts hour approval polling when enabled.
events/interactionCreate.js Routes hour approval button interactions before existing button handlers.
events/modalSubmit.js Routes hour approval modal submissions before existing modal handling.
index.js Initializes the in-memory hour approval session map.
README.md Documents the optional hour approval feature and related sheet/config setup.
CLAUDE.md Adds developer context for the hour approval sync workflow.
.env.example Adds hour approval configuration variables.
package.json Adds a tester startup script.
scripts/print-row-3109.js Adds an ad-hoc script for inspecting a specific Hour Verification row.
scripts/debug-pending.js Adds an ad-hoc script for inspecting pending hour approval rows.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node index.js",
"start-tester": "ENV_FILE=.env.tester node index.js",
Comment thread README.md
### Data Writing
- **User verification** - Logs new member verification data
- **Left users tracking** - Marks users who left the server (red background)
- **Hour verification** - Updates verdict (column C) and approver name (column F) when leadership approves via DM
Comment thread utils/hourApprovalSync.js
Comment on lines +245 to +246
if (notifiedRows.has(request.rowNumber)) {
continue;
Comment thread utils/sheets.js
Comment on lines +522 to +528
for (const [headerName, columnIndex] of confirmerColumnMap.entries()) {
if (normalized.includes(headerName) || headerName.includes(normalized)) {
return columnIndex;
}
}

return this.findConfirmerColumnByFuzzyHeader(normalized, confirmerColumnMap);
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.

3 participants