-
Notifications
You must be signed in to change notification settings - Fork 11
feat: Add Microsoft Teams notifications via Graph API #118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
06685bd
f96492b
9092ad2
6eac336
0248e68
cb22ac5
4970bd5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # Decision: Ralph Watch — Local Watchdog for Teams Notifications | ||
|
|
||
| **Date:** 2026-03-12 | ||
| **Author:** Linus (Backend Developer) | ||
| **Status:** Implemented | ||
|
|
||
| ## Context | ||
|
|
||
| Shayne requested a local process (Option 1 from heartbeat discussion) to monitor GitHub activity and post to Teams. Explicitly not GitHub Actions — "do not update the gh actions heartbeat, it does nothing for us." | ||
|
|
||
| ## Decision | ||
|
|
||
| Created `ralph-watch.sh` as a local daemon that: | ||
| - Polls GitHub every N minutes (default 10) using `gh` CLI | ||
| - Tracks state in `.squad/identity/.ralph-watch-state.json` to avoid duplicate notifications | ||
| - Calls existing `teams-notify.sh` for each new event (pr_merged, issue_closed, work_complete) | ||
| - Seeds state on first run so existing activity doesn't flood Teams | ||
|
|
||
| ## Design Choices | ||
|
|
||
| 1. **State-file deduplication over timestamps:** Tracking known PR/issue numbers is more reliable than timestamp filtering when API results are paginated or delayed. | ||
| 2. **`gh api` compare endpoint for commits:** Avoids needing local git state; the API gives commit count and authors directly. | ||
| 3. **Delegates to `teams-notify.sh`:** Watchdog only detects events; formatting and posting is the notify script's job. Single responsibility. | ||
| 4. **No background daemon management:** Runs in foreground with Ctrl+C shutdown. Shayne can wrap in `nohup` or `tmux` if needed. | ||
|
|
||
| ## Impact | ||
|
|
||
| All squad members benefit from real-time Teams notifications about repo activity. No CI/CD changes required. |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,14 @@ | ||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||
| "enabled": false, | ||||||||||||||||||||||||||||||||||||||||||
| "group_id": "your-group-id-here", | ||||||||||||||||||||||||||||||||||||||||||
| "channel_id": "19:your-channel-id-here@thread.tacv2", | ||||||||||||||||||||||||||||||||||||||||||
| "channel_name": "Waza Squad", | ||||||||||||||||||||||||||||||||||||||||||
| "notify_on": { | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+1
to
+6
|
||||||||||||||||||||||||||||||||||||||||||
| "work_complete": true, | ||||||||||||||||||||||||||||||||||||||||||
| "pr_opened": true, | ||||||||||||||||||||||||||||||||||||||||||
| "pr_merged": true, | ||||||||||||||||||||||||||||||||||||||||||
| "issue_closed": true, | ||||||||||||||||||||||||||||||||||||||||||
| "decisions": true, | ||||||||||||||||||||||||||||||||||||||||||
| "ralph_status": false | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+3
to
+12
|
||||||||||||||||||||||||||||||||||||||||||
| "group_id": "your-group-id-here", | |
| "channel_id": "19:your-channel-id-here@thread.tacv2", | |
| "channel_name": "Waza Squad", | |
| "notify_on": { | |
| "work_complete": true, | |
| "pr_opened": true, | |
| "pr_merged": true, | |
| "issue_closed": true, | |
| "decisions": true, | |
| "ralph_status": false | |
| "group_id": "__DO_NOT_PUT_REAL_GROUP_ID_HERE__", | |
| "channel_id": "__DO_NOT_PUT_REAL_CHANNEL_ID_HERE__", | |
| "channel_name": "DEMO CHANNEL - REPLACE IN LOCAL UNTRACKED COPY ONLY", | |
| "notify_on": { | |
| "work_complete": true, | |
| "pr_opened": true, | |
| "pr_merged": true, | |
| "issue_closed": true, | |
| "decisions": true, | |
| "ralph_status": false |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "enabled": false, | ||
| "group_id": "your-group-id-here", | ||
| "channel_id": "19:your-channel-id-here@thread.tacv2", | ||
| "channel_name": "Your Channel Name", | ||
| "notify_on": { | ||
| "work_complete": true, | ||
| "pr_opened": true, | ||
| "pr_merged": true, | ||
| "issue_closed": true, | ||
| "decisions": true, | ||
| "ralph_status": false | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This says
.squad/identity/teams-config.jsonis “pre-existing”, but it’s introduced in this PR. Please correct the wording so the decision log matches the actual change history (and avoid implying the repo previously contained these IDs).