From 5018494069959d15925bdd24a3b66524a0bdffce Mon Sep 17 00:00:00 2001 From: Adam Moussa <166072409+amoussa1229@users.noreply.github.com> Date: Fri, 1 May 2026 16:32:50 -0400 Subject: [PATCH] Update README with CI/CD pipeline, pay commands, and Lambda inventory (#38) --- README.md | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 5e40ec8..8b6cb2c 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,10 @@ A recurring weekly schedule assigns employees to after-hours phone duty (5pm-8am | `/oncall swap @person` | Hand your shift to someone else | | `/oncall register ` | Link your Slack account to your phone extension | | `/oncall roster` | Show all employees and their link status | +| `/oncall pay` | Show last week's bonus pay summary | +| `/oncall rate` | Show current shift pay rates | +| `/oncall rate default ` | Set the default per-shift rate | +| `/oncall rate ` | Set a per-person shift rate | | `/oncall help` | Show help | Dates accept: `today`, `tomorrow`, `monday`-`sunday`, `4/5`, `2026-04-05` @@ -38,23 +42,26 @@ Single table with `PK` / `SK` keys: | `ROSTER` | `` | Employee: name, extension, slack_user_id | | `WEEKLY` | `` | Default weekly schedule: extension, name | | `OVERRIDE` | `` | Date override from pickup/drop (or `OPEN`) | -| `CONFIG` | `CONFIG` | Settings: ring_group, fallback_extension | +| `PAY` | `` | Weekly pay record (Monday date key) | +| `CONFIG` | `CONFIG` | Settings: shift_rate, fallback_extension | ## Deployment -See [SETUP.md](SETUP.md) for full deployment and Slack app creation instructions. +Merges to `main` are automatically deployed via **CodePipeline + CodeBuild**. The pipeline stack (`afterhours-shift-manager-pipeline`) watches the GitHub repo and runs `sam build && sam package` then deploys via CloudFormation changeset. -Quick reference: +For manual deploys: ```bash -# Build and deploy sam build -sam deploy --guided --stack-name afterhours-shift-manager --region us-east-1 - -# Seed initial schedule data -python scripts/seed_schedule.py +sam deploy ``` +See [SETUP.md](SETUP.md) for full deployment and Slack app creation instructions. + +### Version Bumps + +A GitHub Actions workflow runs daily at 6pm ET, collects all PRs merged since the last version tag, creates a semver patch bump (e.g. v1.6.0 → v1.6.1), updates the Slack changelog canvas, and posts a summary to the team channel. Minor bumps can be triggered manually via `workflow_dispatch`. + ### SSM Parameters | Parameter | Description | @@ -71,6 +78,14 @@ Every Monday at 7am ET, the bot posts the week's schedule to the configured chan A weekly Bonus Pay Summary email is sent via SES to payroll@seahaven.com with a table showing each employee's name, rate, and total pay for the week. +### Lambda Functions + +| Function | Trigger | Purpose | +|---|---|---| +| `afterhours-shift-manager` | API Gateway (POST /slack/events) | Slack bot — handles `/oncall` commands and interactive buttons | +| `afterhours-weekly-post` | EventBridge (Monday 7am ET) | Posts weekly schedule to Slack, sends pay report email | +| `afterhours-roster-sync` | EventBridge (daily 6am ET) | Syncs employee roster from 3CX | + ## Related - [3cx-ring-scheduler](https://github.com/Sea-Haven-Industries/3cx-ring-scheduler) — the Lambda that updates 3CX ring group routing daily