Skip to content

refactor(tracker): align isBotLogin with user.type check #92

@amondnet

Description

@amondnet

Original Review Suggestion

The guidance to identify bot users via user.type == "Bot" is a robust method. However, this is inconsistent with the implementation in apps/work-please/src/tracker/github.ts, which uses a more brittle heuristic based on the username: login.endsWith('[bot]')

Reviewer: @gemini-code-assist
PR: #91
File: apps/work-please/src/tracker/github.ts (lines 367-369)
Comment: #91 (comment)

Problem

isBotLogin() uses login.endsWith('[bot]') which can miss bot accounts whose username doesn't follow that convention. WORKFLOW.md now recommends the more robust user.type == "Bot" from the API payload.

Proposed Change

Update the GraphQL query to fetch the author's __typename (or type) and use that instead of the login-based heuristic for bot detection.

Action Items

  • Update GraphQL query to include author type information
  • Replace isBotLogin(login) with type-based check
  • Add tests for bot detection

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Status
Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions