Commit ba3cf86
authored
feat(autoTriage): Enable auto-apply, security handling, and team config (#222)
* feat(autoTriage): Enable auto-apply, security handling, and team config
- Add --apply flag to auto-triage workflow to actually apply labels/assignees
- Add security issue detection with keyword matching and LLM analysis
- Security issues auto-assign to Johan (pontemonti) with P1 priority
- Update team-members.json with expertise for all engineers
- Add escalation_chain (Sella + Johan as leads, Tahir as manager)
- Add SLA hours config (P0:6h, P1:12h, P2:24h, P3/P4:72h)
- Add Mrunal as Backend Engineer
- Promote Johan to Tech Lead
- Add PRD (design.md), tasks.md, and roadmap.md documentation
* fix(autoTriage): Fix config loading and since_time bug
- Fix get_default_config() to use _default_config() instead of missing sample-config.yml
- Initialize since_time at start to fix UnboundLocalError when using issue_numbers mode
* feat(autoTriage): Add re-triage on issue edits, labels, and comments (Phase 4)
- Add triggers: issues.edited, issues.labeled, issue_comment.created
- Add bot skip condition to prevent infinite loops
- Add --retriage flag with 5-minute cooldown
- Add was_recently_triaged() to check recent triage
- Add update_or_add_triage_comment() to prevent duplicate comments
* feat(autoTriage): Add daily issue report workflow with GitHub Summary
* feat(autoTriage): Add SLA escalation and daily report (Phase 3)
- Add escalation_service.py with SLA breach detection
- Add escalation_check.py CLI for hourly SLA checks
- Add escalate-stale-issues.yml workflow (hourly cron)
- Add daily_report.py CLI for daily issue reports
- Add daily-issue-report.yml workflow (daily at 9 AM UTC)
- Add daily_report_service.py for report generation
- Update team-members.json with new SLA hours (P0:24h, P1:48h, P2:72h, P3/P4:120h)
- Add sla_hours and escalation_chain to TeamConfig model
* fix(autoTriage): Change SLA escalation to daily instead of hourly
* docs(autoTriage): Add comments for Teams/email setup
* fix(autoTriage): Remove unused timedelta import
* fix(autoTriage): Address code review comments and sync documentation
- Remove emojis from Python output (use text indicators like [OK], [WARNING], [CRITICAL])
- Fix duplicate ERROR text in escalation_check.py
- Simplify redundant if/else in auto-triage-issues.yml
- Update SLA fallback defaults to match config (P0:24h, P1:48h, P2:72h, P3/P4:120h)
- Sync design.md and tasks.md with actual implementation status
- Fix escalation_chain format in design.md (lead is now an array)
- Centralize get_sla_hours() to avoid duplication
- Add TODO for placeholder Teams models
- Update tasks.md: Phases 1,3,4,5,6 Complete; Phases 2,7 Not Started
* fix(autoTriage): Address remaining Copilot code review comments
- Use updated_at instead of created_at for SLA calculation in daily report
- Use updated_at in was_recently_triaged to handle edited comments
- Remove unused Any import from teams_service.py
- Add sla_hours and escalation_chain to ConfigParser.parse()
- Fix status_emoji -> status_indicator in Teams card
- Fix wording 'Reassigning' -> 'Adding as assignee' for accuracy
* fix(autoTriage): Address Copilot code review comments (round 2)
- Remove eval from workflow, use bash array for safer command building
- Remove Teams webhook from daily report (blocked by DLP)
- Use SecurityConfig dataclass properly instead of dict
- Update FR status in design.md (FR2,4,5,6,7 COMPLETE)
- Fix SLA table in roadmap.md to match implementation (24/48/72/120)
- Use exact matching for bot user detection (not substring)
- Security priority only elevates, never downgrades
- Update docs: 'add Tech Lead as assignee' not 'reassign'
* fix(autoTriage): Address Copilot code review comments (round 3)
- Remove webhook URL logging from TeamsService (security)
- Defer TeamsService instantiation until actually needed (lazy init)
- Return aggregated success from apply_escalation (assign + label + comment)
- Defer teams_service creation in intake_service until post_to_teams is True
* remove noise
* test(autoTriage): Add comprehensive unit tests organized by category
- Reorganize tests into subfolders: services/, models/, scripts/, workflows/, integration/
- Add test_models.py for PriorityRules, SecurityConfig, TeamConfig, IssueClassification, AdoModels
- Add test_scripts.py for update_contributions.py contribution score calculation
- Add test_workflows.py for GitHub Actions workflow logic validation
- Add test_triage_pipeline.py for end-to-end integration tests
- Add service-specific tests: test_daily_report_service.py, test_escalation_service.py,
test_intake_service.py, test_teams_service.py, test_prompt_loader.py
- Fix word boundary matching for short security keywords in llm_service.py
- Fix redundant elif in intake_service.py priority elevation
Total: 311 tests covering all services, models, scripts, and workflows
* fix: address Copilot review comments - remove emojis and fix code issues
- Replace emojis with text markers in workflows ([AUTO-TRIAGE], [OK], [INFO], etc.)
- Fix misleading comment in auto-triage-issues.yml
- Remove unreachable code in test_workflows.py
- Improve shell injection pattern detection in tests
- Only prefix @ for actual assignees, not 'Unassigned'1 parent c62c356 commit ba3cf86
38 files changed
Lines changed: 4504 additions & 56 deletions
File tree
- .github/workflows
- autoTriage
- config
- docs
- models
- scripts
- services
- tests
- integration
- models
- scripts
- services
- workflows
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
| |||
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
30 | 46 | | |
31 | 47 | | |
32 | 48 | | |
| |||
42 | 58 | | |
43 | 59 | | |
44 | 60 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
49 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
50 | 76 | | |
51 | 77 | | |
52 | 78 | | |
| |||
80 | 106 | | |
81 | 107 | | |
82 | 108 | | |
83 | | - | |
| 109 | + | |
84 | 110 | | |
85 | 111 | | |
86 | 112 | | |
| |||
93 | 119 | | |
94 | 120 | | |
95 | 121 | | |
96 | | - | |
| 122 | + | |
97 | 123 | | |
98 | 124 | | |
99 | 125 | | |
100 | 126 | | |
101 | | - | |
| 127 | + | |
102 | 128 | | |
103 | 129 | | |
104 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
9 | 16 | | |
10 | 17 | | |
11 | 18 | | |
12 | 19 | | |
13 | 20 | | |
14 | 21 | | |
15 | | - | |
| 22 | + | |
16 | 23 | | |
17 | 24 | | |
18 | 25 | | |
19 | 26 | | |
20 | 27 | | |
21 | 28 | | |
22 | | - | |
| 29 | + | |
23 | 30 | | |
24 | 31 | | |
25 | | - | |
| 32 | + | |
26 | 33 | | |
27 | | - | |
28 | | - | |
29 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
30 | 37 | | |
31 | 38 | | |
32 | 39 | | |
| |||
35 | 42 | | |
36 | 43 | | |
37 | 44 | | |
38 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
39 | 69 | | |
0 commit comments