fix(sissue_router): migrate to GraphQL work items API

What & why

The sissue router silently stopped routing new Request For Help tickets. RFH now creates tickets as a custom work item type ("Request For Help"), which is not part of the REST issue_type family (issue/incident/test_case/task). The REST GET /projects/:id/issues endpoint — used by python-gitlab's project.issues.list() — structurally never returns custom types, so the router found 0 candidates and reported "no issues to assign" while real tickets went unassigned (e.g. request-for-help#5038).

Change

  • Fetch + assignment now use the GraphQL work items API instead of REST issues, so all work item types are visible.
  • Server-side type filter: work item type names are resolved to their global IDs (workItemTypeIds) and passed to project.workItems. Defaults to Request For Help; override with --work-item-type (repeatable).
  • Assignment via workItemUpdate + createNote mutations; every mutation's errors array is checked explicitly (GitLab returns these in a 200 response).
  • Fail-loud guards so a future type rename can't fail silently: aborts if a configured type name is missing (listing available types), and logs the work-item-count-by-type distribution.
  • New --dry-run flag: reports the assignments it would make without mutating.
  • requirements.txt regenerated with the python-gitlab[graphql] extra (pinned on python:3.12 to match CI).

Notes for reviewers

  • The CI token now needs work item read + write scope on gitlab-com/request-for-help.
  • Load-balancing logic (least-loaded pick, automation-tag accounting) is unchanged; only the fetch/assign layer was swapped.

Verification

  • python -m py_compile + --help pass on python:3.12 against the pinned deps.
  • --dry-run --verbose run confirmed against the live API.

🤖 Generated with Claude Code

Merge request reports

Loading