Improve /check and preserve free-text report statuses#63
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Slack /check (list-missing) flow so members with imported GitLab/GitHub MR/PR activity are not incorrectly flagged as missing, by considering both Slack author_id signals and fuzzy name matches against fetched item authors.
Changes:
- Load all weekly work items for
/checkand derive a unique set of reported author names from them. - Treat a member as “reported” if their Slack user ID appears on a Slack-sourced item or their Slack profile name fuzzily matches a fetched item author.
- Add unit test coverage for the new
memberReportedThisWeekhelper.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| internal/integrations/slack/slack.go | Enhances /check missing-member detection to include fetched MR/PR activity via author-name matching and adds helper utilities. |
| internal/integrations/slack/slack_logic_test.go | Adds focused unit test for memberReportedThisWeek. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
internal/integrations/slack/slack.go
Outdated
| for _, uid := range memberIDs { | ||
| if reportedAuthorIDs[uid] { | ||
| user, err := api.GetUserInfo(uid) | ||
| nameCandidates := []string{uid} | ||
| if err == nil { |
There was a problem hiding this comment.
handleListMissing now calls api.GetUserInfo(uid) for every team member before checking whether they’re already reported. This adds N Slack API calls per /check and increases latency/rate-limit risk. Consider deriving nameCandidates from the existing cached users list (getCachedUsers/api.GetUsers) or only fetching user info for members that are still potentially missing after the author_id check.
There was a problem hiding this comment.
@copilot open a new pull request to apply changes based on this feedback
…dleListMissing Co-authored-by: WZ <719869+WZ@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
fix: use cached user list in /check instead of per-member GetUserInfo calls
What changed
(no change)toAuto(resolved in session; root cause analysis in progress)Tests
go test ./...