Examples

Real-world usage examples and workflows for the User Story Coverage Tagging tool.

Table of Contents


Complete End-to-End Workflow

Sprint Coverage Report Generation

Generate comprehensive coverage reports for all user stories in a sprint.

#!/bin/bash
# sprint_coverage_report.sh

# Configuration
export SETTINGS_FILE="settings"
export DAYS_BACK=30

# Step 1: Tag code changes from GitHub PRs
echo "==> Tagging code changes from pull requests..."
python3 US_SRC_tag_repos_by_github_prs.py \
  --settings ${SETTINGS_FILE} \
  --days-back ${DAYS_BACK} \
  --log-level INFO

# Step 2: Generate report data files from Jira
echo "==> Generating coverage report data..."
python3 US1_RPT_create_report_info_files.py \
  --settings ${SETTINGS_FILE} \
  --ticket-source jira \
  --log-level INFO

# Step 3: Create HTML reports
echo "==> Creating HTML reports..."
python3 US2_RPT_create_html_reports.py \
  --settings ${SETTINGS_FILE} \
  --log-level INFO

# Step 4: Create Confluence pages
echo "==> Publishing to Confluence..."
python3 US3_RPT_create_confluence_reports.py \
  --settings ${SETTINGS_FILE} \
  --log-level INFO

# Step 5: Update Jira tickets with coverage
echo "==> Updating Jira tickets..."
python3 US4_RPT_update_jira.py \
  --settings ${SETTINGS_FILE} \
  --log-level INFO

echo "==> Sprint coverage report complete!"
echo "View reports in: $(grep -o '"output_folder"[^,]*' ${SETTINGS_FILE} | cut -d'"' -f4)"

Expected Output:

Sprint Coverage Report (with SeaLights Auto-Tagging)

If SeaLights auto-tagging is enabled, skip the manual tagging step:

Benefits:

  • Simpler workflow—no tagging scripts to maintain

  • Faster execution—one less phase

  • Tagging happens automatically with each build

Requirements:

  • SeaLights auto-tagging configured by Customer Success

  • CI/CD pipeline reports builds with git commit information


Tagging Workflows

Example 1: Tag from GitHub Pull Requests

Tag code changes from PRs merged in the last 14 days.

Settings Requirements:

Example 2: Tag from Git Commit History

Tag code changes by analyzing commit history.

Use Case: When PRs aren't used, or you need to capture direct commits.

Example 3: Tag from Jira-Linked PRs

Process only PRs linked to specific Jira tickets.

Settings Requirements:

Use Case: Focus tagging on actively worked tickets in current sprint.

Example 4: Dry Run - Generate Files Without Tagging

Preview what would be tagged without actually calling SeaLights API.

Output: Creates JSON files in output folder without making API calls.

Example 5: Tag Specific Build by BSID

Tag an entire build session with a ticket ID.

Use Case: Manually associate a build with a ticket after the fact.


Reporting Workflows

Example 6: Generate Reports for Azure DevOps

Create coverage reports for ADO work items.

Settings Requirements:

Example 7: Reuse Existing Coverage Report

Skip report generation and use an existing report ID.

Use Case: When regenerating report files without waiting for new coverage analysis.

Example 8: Create Only HTML Reports

Generate HTML without updating issue trackers or Confluence.

Output: HTML files in output folder, viewable in any browser.

Example 9: Update Jira On-Premises Plugin

Push coverage to Jira On-Prem plugin instead of Cloud custom fields.

Settings Requirements:


CI/CD Integration

Example 10: GitHub Actions Workflow

Example 11: Jenkins Pipeline

Example 12: GitLab CI/CD


Advanced Scenarios

Example 13: Multi-Environment Configuration

Use different settings for different environments.

Usage:

Example 14: Integration Build Processing

Handle integration builds with multiple components.

Settings:

Usage:

The tool automatically validates all components are configured in repo_list.

Example 15: Cleanup Old Coverage Data

Delete coverage data for completed sprints.

Example 16: Custom Ticket Extraction

Extract tickets from commit messages with custom format.

Settings:

Matches commits like:

Example 17: Parallel Processing for Large Repos

Process multiple repositories in parallel using GNU Parallel.

Example 18: Report with Custom Date Range

Generate reports for specific historical period.

Example 19: Conditional Reporting Based on Coverage

Fail CI build if coverage is below threshold.

Example 20: Notification on Low Coverage

Send Slack notification when coverage is low.


Sample Output

HTML Report Sample Structure

ReportInfo JSON Structure


Next Steps

Last updated

Was this helpful?