HOMELAB-548: feat(pipeline): add auto-ticket creation for alert-triggered pipelines #142

Open
aaron wants to merge 1 commit from plane/HOMELAB-548-alert-auto-ticket-creation into live
Owner

Summary

  • Add auto-create-ticket.py script for tracker stage
  • Implements Plane ticket auto-creation when alerts fire
  • Includes smart prioritization based on alert types
  • Provides comprehensive documentation and integration guide
  • Solves "Could not load ticket" issue in TICKET tab

Problem

Alert-triggered pipelines use alert names (e.g., "PodOOMKilled") as ticket_id but no actual Plane ticket is created. The TICKET tab shows "Could not load ticket."

Solution

Implemented auto-ticket creation logic in tracker stage:

  1. Check for existing tickets matching the alert name
  2. Create new ticket if none found, with:
    • Alert details and researcher findings
    • Smart priority mapping (urgent/high/medium)
    • Structured description with next steps
  3. Return ticket_id for executor stage use

Files Added

  • scripts/pipeline/auto-create-ticket.py - Main auto-creation script
  • scripts/pipeline/README.md - Usage documentation
  • scripts/pipeline/tracker-integration.md - Integration guide

Test Plan

  • Python syntax validation
  • Test with mock alert scenario
  • Verify Plane API integration
  • Test tracker stage integration
  • Validate executor stage receives correct ticket_id

Benefits

  • Visibility: All alerts tracked in Plane
  • Compliance: Satisfies "no work without a ticket"
  • Searchability: Alert history becomes searchable
  • Collaboration: Team can add comments, assign ownership

Resolves HOMELAB-548

🤖 Generated with Claude Code

## Summary - Add auto-create-ticket.py script for tracker stage - Implements Plane ticket auto-creation when alerts fire - Includes smart prioritization based on alert types - Provides comprehensive documentation and integration guide - Solves "Could not load ticket" issue in TICKET tab ## Problem Alert-triggered pipelines use alert names (e.g., "PodOOMKilled") as `ticket_id` but no actual Plane ticket is created. The TICKET tab shows "Could not load ticket." ## Solution Implemented auto-ticket creation logic in tracker stage: 1. **Check for existing tickets** matching the alert name 2. **Create new ticket** if none found, with: - Alert details and researcher findings - Smart priority mapping (urgent/high/medium) - Structured description with next steps 3. **Return ticket_id** for executor stage use ## Files Added - `scripts/pipeline/auto-create-ticket.py` - Main auto-creation script - `scripts/pipeline/README.md` - Usage documentation - `scripts/pipeline/tracker-integration.md` - Integration guide ## Test Plan - [x] Python syntax validation - [ ] Test with mock alert scenario - [ ] Verify Plane API integration - [ ] Test tracker stage integration - [ ] Validate executor stage receives correct ticket_id ## Benefits - ✅ Visibility: All alerts tracked in Plane - ✅ Compliance: Satisfies "no work without a ticket" - ✅ Searchability: Alert history becomes searchable - ✅ Collaboration: Team can add comments, assign ownership Resolves HOMELAB-548 🤖 Generated with [Claude Code](https://claude.com/claude-code)
HOMELAB-548: feat(pipeline): add auto-ticket creation for alert-triggered pipelines
Some checks failed
0/0 projects applied successfully.
CI Review / ai-review (pull_request) Has been cancelled
CI Review / helm-validate (pull_request) Has been cancelled
CI Review / pr-title (pull_request) Has been cancelled
Lint & Validate / shellcheck (pull_request) Has been cancelled
Lint & Validate / yaml-lint (pull_request) Has been cancelled
Lint & Validate / terraform-validate (pull_request) Has been cancelled
1e63782b77
- Add auto-create-ticket.py script for tracker stage
- Implements Plane ticket auto-creation when alerts fire
- Includes smart prioritization based on alert types
- Provides comprehensive documentation and integration guide
- Solves 'Could not load ticket' issue in TICKET tab

Resolves alert-triggered pipelines not having corresponding Plane tickets for visibility and 'no work without a ticket' compliance.
Some checks failed
0/0 projects applied successfully.
CI Review / ai-review (pull_request) Has been cancelled
CI Review / helm-validate (pull_request) Has been cancelled
CI Review / pr-title (pull_request) Has been cancelled
Lint & Validate / shellcheck (pull_request) Has been cancelled
Lint & Validate / yaml-lint (pull_request) Has been cancelled
Lint & Validate / terraform-validate (pull_request) Has been cancelled
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin plane/HOMELAB-548-alert-auto-ticket-creation:plane/HOMELAB-548-alert-auto-ticket-creation
git switch plane/HOMELAB-548-alert-auto-ticket-creation
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aaron/infra-core!142
No description provided.