Configuration
The User Story Coverage Tagging tool uses JSON-based configuration files with environment variable overrides.
Configuration Files
Default Behavior
By default, scripts look for a file named settings in the current directory. You can specify alternative files using the --settings flag:
python3 US1_RPT_create_report_info_files.py --settings my_configMultiple Configuration Files
You can specify multiple settings files that will be merged together:
python3 US1_RPT_create_report_info_files.py \
--settings base_config \
--settings team_config \
--settings credentialsMerge Rules:
Single values (strings, numbers, booleans) are overridden by the last file
Arrays are appended (concatenated)
Objects are merged recursively
Sample Configuration
A complete sample configuration is available in settings.sample. Copy and modify it:
Environment Variables
All configuration values can be overridden using environment variables. Environment variables always take precedence over settings files.
Environment Variable Reference
OUTPUT_FOLDER
output_folder
string
Directory for generated reports
SEALIGHTS_API_TOKEN
sealights.api_token
string
SeaLights API authentication token
SEALIGHTS_DOMAIN
sealights.domain
string
SeaLights domain (e.g., company.sealights.co)
SEALIGHTS_COVERAGE_DAYS_BACK
sealights.coverage_days_back
integer
Days to look back for coverage data
SEALIGHTS_REPORT_TIMEOUT_MINUTES
sealights.report_timeout_minutes
integer
Report generation timeout (default: 30)
SEALIGHTS_USE_REPOSITORY_URL
sealights.use_repository_url
boolean
Use repository URL from SeaLights if available
SEALIGHTS_VERIFY_SSL
sealights.verify_ssl
boolean
Verify SSL certificates (default: true)
KEY_PATTERN_REGEX
scm.key_pattern_regex
string
Regex to extract ticket IDs
GITHUB_API_URL
scm.github_api_url
string
GitHub API URL
GITHUB_TOKEN
scm.github_token
string
GitHub personal access token
GITHUB_OWNER
scm.github_owner
string
GitHub organization or user
SCM_TYPE
scm.type
string
SCM type: github, gitlab, bitbucket, ado
JIRA_AUTHORIZATION
jira.authorization
string
Jira authorization header value
JIRA_GET_LIST_JQL
jira.jql
string
JQL query to fetch tickets
JIRA_CHILD_LEVELS
jira.child_levels
integer
Number of child levels to traverse
JIRA_BASE_URL
jira.base_url
string
Jira instance base URL
JIRA_API_VERSION
jira.api_version
integer
Jira API version (2 or 3)
JIRA_CUSTOM_FIELDS
jira.jira_custom_fields
JSON
Custom field mappings for coverage data
JIRA_EXTRA_TICKET_FIELDS
jira.extra_ticket_fields
JSON array
Additional fields to pull from tickets
ADO_WIQL
ado.wiql
string
WIQL query to fetch work items
ADO_AUTHORIZATION
ado.authorization
string
Azure DevOps authorization header
ADO_ORGANIZATION
ado.organization
string
ADO organization name
ADO_PROJECT
ado.project
string
ADO project name
ADO_CHILD_LEVELS
ado.child_levels
integer
Number of child levels to traverse
ADO_EXTRA_TICKET_FIELDS
ado.extra_ticket_fields
JSON array
Additional work item fields
CONFLUENCE_AUTHORIZATION
confluence.authorization
string
Confluence authorization header
CONFLUENCE_BASE_URL
confluence.base_url
string
Confluence instance URL
CONFLUENCE_SPACE_KEY
confluence.space_key
string
Confluence space key
CONFLUENCE_ANCESTOR_ID
confluence.ancestor_id
string
Parent page ID for reports
CONFLUENCE_NOTE
confluence.note
string
Note text for Confluence pages
CONFLUENCE_EXTRA_SUMMARY_FIELDS
confluence.extra_summary_fields
JSON array
Extra fields for summary table
CONFLUENCE_SUMMARY_PAGE_TITLE
confluence.summary_page_title
string
Title for summary page
CONFLUENCE_DETAILS_PAGE_PREFIX
confluence.details_page_prefix
string
Prefix for detail page titles
TEST_STAGES
test_stages
JSON array
Test stage definitions
GROUPED_TEST_STAGES
grouped_test_stages
JSON array
Aggregated test stage groups
COVERAGE_APP_LIST
coverage_app_list
JSON array
Apps/branches to get coverage from
REPO_LIST
repo_list
JSON array
Repository configurations
Using Environment Variables
Set environment variables before running:
JSON values in environment variables:
For complex values (arrays, objects), use JSON format:
Configuration Sections
Output Configuration
Controls where generated files are saved.
output_folder- Directory path for output files. Leave empty for current directory.
SeaLights Configuration
Connection and authentication for SeaLights platform.
Fields:
api_token(required) - SeaLights API token for authenticationdomain(required) - Your SeaLights account domaincoverage_days_back(required) - Number of days to look back for coverage datareport_timeout_minutes(optional, default: 30) - Max wait time for report generationuse_repository_url(optional, default: false) - Use repository URLs from SeaLights when availableverify_ssl(optional, default: true) - Verify SSL certificates for API calls
SCM Configuration
Source control management settings for GitHub, GitLab, Bitbucket, or Azure DevOps.
Fields:
key_pattern_regex(required) - Regex pattern to extract ticket IDs from texttype(required) - SCM platform:github,gitlab,bitbucket, oradogithub_api_url(for GitHub) - GitHub API endpointgithub_token(for GitHub) - Personal access tokengithub_owner(for GitHub) - Organization or user nameremove_prefix_regex(optional) - Regex to remove from branch names
Regex Pattern Examples:
Jira:
"[A-Z]+-[0-9]+"GitHub Issues:
"#[0-9]+"ADO Work Items:
"[0-9]+"Custom:
"(FEAT|BUG|TASK)-[0-9]+"
Jira Configuration
Settings for Jira Cloud or On-Premises integration.
Fields:
authorization(required) - Authorization header value (Basic or Bearer)jql(required) - JQL query to fetch ticketschild_levels(optional, default: 1) - How many levels of child issues to includebase_url(required) - Jira instance URLapi_version(required) - Jira REST API version (2 for older, 3 for newer)jira_custom_fields(optional) - Custom field IDs for coverage data (Jira Cloud only)extra_ticket_fields(optional) - Additional fields to extract from tickets
JQL Examples:
Azure DevOps Configuration
Settings for Azure DevOps integration.
Fields:
wiql(required) - WIQL query to fetch work itemsauthorization(required) - Authorization header with PAT tokenorganization(required) - ADO organization nameproject(required) - Project namechild_levels(optional, default: 1) - Levels of child work itemsextra_ticket_fields(optional) - Additional fields to extract
WIQL Examples:
Confluence Configuration
Settings for creating Confluence pages.
Fields:
authorization(required) - Authorization header valuebase_url(required) - Confluence instance URLspace_key(required) - Confluence space identifierancestor_id(required) - Parent page ID for created pagesnote(optional) - Warning note added to pagesextra_summary_fields(optional) - Fields to include in summary tablesummary_page_title(optional) - Title for auto-generated summary pagedetails_page_prefix(optional) - Prefix for detail page titles
Test Stages Configuration
Defines test stages/phases for coverage reporting.
Fields per stage:
name(required) - Stage name as it appears in SeaLights TGA reportreportJsonKey(required) - JSON key in generated report filesreportTitle(required) - Display title in HTML/Confluence reports
Grouped Test Stages Configuration
Creates aggregated coverage metrics from multiple test stages.
Fields per group:
name(required) - Group identifierreportJsonKey(required) - JSON key in report filesreportTitle(required) - Display titlestages(required) - Array of stage names to aggregateshow_gate(optional) - Show pass/fail gate in reportsseverity(optional) - 1 (orange) or 2 (red) for failed gates
Coverage App List Configuration
Specifies which applications and branches to collect coverage from.
Fields per entry:
app_regex(required) - Regex matching SeaLights application namebranch_regex(required) - Regex matching branch nameintegration_build(optional, default: false) - If true, treats as integration build with components
Regex Matching:
Use exact names:
"my-app"Use patterns:
"app-.*"Match any:
".*"
Repository List Configuration
Maps git repositories to SeaLights applications.
Fields per repository:
repoName(required) - Repository name in gitbaseUrl(required) - Git base URL (SSH or HTTPS)branchName(required) - Branch to processSealightsAppName(required) - Application name in SeaLightsSealightsBranchName(required) - Branch name in SeaLightsignore(optional, default: false) - Skip this repository
Complete Configuration Example
See settings.sample for a fully commented example with all options.
Configuration Validation
Scripts validate configuration at startup. Common validation errors:
Missing required fields - Check that all required settings are present
Invalid regex patterns - Test regex patterns using online tools
Invalid URLs - Ensure URLs include protocol (https://)
Invalid JSON in env vars - Validate JSON format for array/object values
Best Practices
1. Separate Sensitive Data
Split configuration into multiple files:
2. Use Environment Variables for CI/CD
In CI/CD pipelines, use environment variables instead of files:
3. Version Control Settings
Commit: Base configuration, structure, regex patterns
Ignore: Credentials, tokens, production URLs
4. Document Custom Fields
When using custom fields, document them in comments:
Next Steps
Examples - See configuration in action
Security Considerations - Protect sensitive data
Troubleshooting - Configuration issues and solutions
Last updated
Was this helpful?

