Skip to content

refactor(triggers): share PM status and label decisions#1282

Merged
aaight merged 1 commit into
devfrom
feature/shared-pm-trigger-decisions
May 9, 2026
Merged

refactor(triggers): share PM status and label decisions#1282
aaight merged 1 commit into
devfrom
feature/shared-pm-trigger-decisions

Conversation

@aaight
Copy link
Copy Markdown
Collaborator

@aaight aaight commented May 9, 2026

Summary

Refactors PM status-change and ready-to-process label triggers to share decision helpers while keeping provider webhook parsing local.

Card: https://trello.com/c/69fe2a6efef948343f2eb18a

Changes

  • Added shared PM status helpers for status-to-agent resolution, onCreate/onMove gating, coalesce key construction, and dispatch result assembly.
  • Added shared PM label helpers for Trello list, JIRA status-name, and Linear state-ID agent resolution plus label dispatch result assembly.
  • Updated Trello, JIRA, and Linear status/label handlers to use the shared helpers while preserving provider-specific payload extraction and existing pipeline-capacity gate arguments.
  • Updated the trigger-event static guard to recognize centralized PM dispatch builders and added focused shared-helper tests.

Testing

  • npx vitest run --project unit-triggers tests/unit/triggers/shared/pm-status.test.ts tests/unit/triggers/shared/pm-label.test.ts tests/unit/triggers/status-changed.test.ts tests/unit/triggers/backlog-status-changed.test.ts tests/unit/triggers/merged-status-changed.test.ts tests/unit/triggers/jira-status-changed.test.ts tests/unit/triggers/linear-status-changed.test.ts tests/unit/triggers/label-added.test.ts tests/unit/triggers/jira-label-added.test.ts tests/unit/triggers/linear-label-added.test.ts
  • npm run lint:fix
  • npm run lint
  • npm run typecheck
  • npm test

Notes

npm run lint exits 0 with two pre-existing complexity warnings in src/integrations/alerting/_shared/materialize.ts and src/triggers/sentry/webhook-handler.ts. No docs updates were needed because this is an internal trigger refactor with no setup or public configuration changes.

🕵️ codex · gpt-5.5 · run details

@codecov
Copy link
Copy Markdown

codecov Bot commented May 9, 2026

Codecov Report

❌ Patch coverage is 99.33775% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/triggers/shared/pm-status.ts 98.33% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Collaborator

@nhopeatall nhopeatall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - I verified the shared PM status/label helpers preserve the provider-specific parsing and capacity-gate inputs, and the targeted PM trigger tests pass locally.

🕵️ codex · gpt-5.5 · run details

@aaight aaight merged commit 82ce18a into dev May 9, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants