You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 78f81c2
Browse filesBrowse the repository at this point in the historyBrowse files
Count DRI re-assignments via an hourly ledger; add /sponsor quota self-check
Notion doesn't date people-property edits, so PERBot now keeps a `DRI assigned`
ledger on each Pipeline deal (one "<user id> <ISO>" line per current DRI), kept
current by a new hourly DRI sync (jobs/driSync.ts + sponsorship-dri-sync.yml):
new DRIs are stamped when noticed, removed ones dropped, pre-ledger deals
backfilled with their creation time, and createPipelineDeal seeds it. The quota
audit now counts by these stamps (fallback: creation time), so being added as
DRI on an existing deal counts in the week it happened.
/sponsor quota (ephemeral): the caller's count for the in-progress window with
the deals that counted and how many more they need, plus the roster's standing —
same roster/window/rule as the Saturday audit.
Claude-Session: https://claude.ai/code/session_01G6RNPBbjLS6V7Drtfkbop2
@@ -128,6 +149,45 @@ export function buildQuotaPost(
128
149
returnlines.join('\n');
129
150
}
130
151
152
+
/**
153
+
* Ephemeral `/sponsor quota` text: the caller's own standing first (if they're on the
154
+
* roster), then the whole team's, so anyone can see where things stand before Saturday.
155
+
*/
156
+
exportfunctionformatQuotaStanding(
157
+
results: QuotaAuditResult[],
158
+
window: AuditWindow,
159
+
quota: number,
160
+
callerNotionId: string|null
161
+
): string{
162
+
constheader=`*Sponsor quota — week of ${fmtDate(window.weekStartIso)} → ${fmtDate(window.weekEndIso)}* (audited Sat 10am ET, posted to #${config.sponsorship.quotaChannel})`;
lines.push('_Counts Pipeline deals you were made DRI on this week (new or re-assigned). `/sponsor claim <company>` or `/sponsor add <company> @you` to add one._');
0 commit comments