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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# multi-source-config.yaml
#
# Fully annotated tga config showing multi-source classification (issue #260)
# and the corrected custom-rules priority defaults (issue #259).
#
# Run:
# JIRA_API_TOKEN=<token> GITHUB_TOKEN=<pat> tga classify --config multi-source-config.yaml
#
# To disable external sources for a single run (e.g. in CI without credentials):
# tga classify --config multi-source-config.yaml --no-external
repositories:
- path: ~/code/my-project
name: my-project
output:
directory: ./reports
formats:
classification:
# Optional: path to custom rules. Custom rules default to priority 110,
# which places them above the built-in rules (priority 100). The file is
# standalone by default (extend_defaults: false); only the rules listed
# here apply unless you set extend_defaults: true.
rules_file: ./my-rules.yaml
# External classification sources (issue #260).
# Sources are consulted in order; the first non-None signal wins.
# Each unique ticket is fetched at most once per run (in-memory cache).
# On HTTP failure or missing token the source is skipped with a warning.
sources:
# -----------------------------------------------------------------
# JIRA Cloud / Server
# -----------------------------------------------------------------
- type: jira
# Base URL of your JIRA instance.
base_url: "https://yourco.atlassian.net"
# Name of the environment variable carrying the API token.
# For JIRA Cloud: create a token at
# https://id.atlassian.com/manage-profile/security/api-tokens
# Set it as: export JIRA_API_TOKEN="your-token"
token_env: JIRA_API_TOKEN
# JIRA Cloud requires Basic auth: "email:token" base64-encoded.
# Set username here; omit for pure Bearer token (JIRA Server).
username: "you@yourco.com"
# Limit JIRA lookups to these project keys.
# An empty list (or omitting the key) means "query any project key
# found in commit messages".
project_keys:
- PROJ
- ENG
- INFRA
# Map JIRA issue fields to TGA category strings.
# Priority: issue_type > labels > components (first match wins).
field_mappings:
issue_type:
# Standard JIRA issue types -> TGA categories
Bug: bug_fix
Story: new_feature
Task: tech_debt_refactoring
Epic: new_feature
Improvement: new_feature
Sub-task: tech_debt_refactoring
Technical Debt: tech_debt_refactoring
Spike: wip
labels:
# Label-to-category fallback (fires when issue_type is unmapped)
ktlo: tech_debt_refactoring
security: security
performance: performance
documentation: documentation
testing: test
components:
# Component-to-category fallback (fires when neither issue_type
# nor labels match)
Platform: platform_infrastructure
CI/CD: ci
Security: security
# -----------------------------------------------------------------
# GitHub Issues
# -----------------------------------------------------------------
- type: github_issues
# Default repository for bare "#NNN" references.
# Qualified "owner/repo#NNN" references override this for that ref.
repo: "acme/widgets"
# Name of the environment variable carrying the GitHub PAT.
# Required scopes: repo (private) or public_repo (public).
# Set it as: export GITHUB_TOKEN="ghp_..."
token_env: GITHUB_TOKEN
# Map GitHub issue label names to TGA category strings.
# First matching label in the issue's label list wins.
label_mappings:
bug: bug_fix
enhancement: new_feature
feature: new_feature
refactor: tech_debt_refactoring
performance: performance
documentation: documentation
test: test
ci: ci
security: security
dependencies: tech_debt_refactoring
good first issue: new_feature
help wanted: new_feature
# Optional LLM fallback for commits with low-confidence verdicts.
# use_llm: false
# llm_model: gpt-4o-mini
# llm_fallback_threshold: 0.35