Skip to content

GHA-161 Use Ticket Filter Instead of Jira Release for REL Ticket#76

Merged
yasen-pavlov-sonarsource merged 11 commits intomasterfrom
nw/GHA-161
Jan 5, 2026
Merged

GHA-161 Use Ticket Filter Instead of Jira Release for REL Ticket#76
yasen-pavlov-sonarsource merged 11 commits intomasterfrom
nw/GHA-161

Conversation

@nils-werner-sonarsource
Copy link
Contributor

@nils-werner-sonarsource nils-werner-sonarsource commented Dec 17, 2025

This pull request significantly expands and improves the test coverage for the create-jira-release-ticket GitHub Action, focusing on the transition from using Jira version URLs to version IDs, and ensuring robust input validation and backward compatibility. It introduces dedicated jobs for unit, integration, validation, deprecation, and URL extraction tests. Additionally, it updates references throughout the workflow files to use jira-release-id instead of the deprecated jira-release-url, and adds comprehensive documentation as comments within the workflow files.

Key changes:

Test Coverage Expansion and Structure

  • Added new jobs to .github/workflows/test-create-jira-release-ticket.yml for unit tests, integration tests, validation tests, deprecation tests, and URL extraction tests, each with detailed documentation and clear separation of concerns. [1] [2] [3] [4]

Migration from URL to ID

  • Updated all test cases and environment variables to use jira-release-id and JIRA_RELEASE_ID instead of the deprecated jira-release-url and JIRA_RELEASE_URL, ensuring that validation and precedence logic now centers on the version ID. [1] [2] [3] [4] [5] [6]

Deprecation and Backward Compatibility

  • Added a dedicated "Deprecation Tests" job to ensure that using the old jira-release-url input or JIRA_RELEASE_URL env var triggers a deprecation warning, while still supporting backward compatibility by extracting the version ID from URLs.

URL Extraction and Issue Filter Construction

  • Introduced a "URL Extraction Tests" job to validate the extraction of version IDs from various Jira URL formats and the correct construction of Jira issue filter URLs, supporting both production and sandbox environments.

Workflow Reference Updates

  • Updated workflow files to remove references to jira-release-url in favor of jira-release-id, including in .github/workflows/automated-release.yml and .github/workflows/test-get-jira-release-notes.yml. [1] [2] [3]

Proof-of-concept

Release: https://github.com/SonarSource/sonar-rpg/actions/runs/20310856459
REL ticket with filter: https://sonarsource-sandbox-608.atlassian.net/browse/REL-4070

@hashicorp-vault-sonar-prod
Copy link

hashicorp-vault-sonar-prod bot commented Dec 17, 2025

GHA-161

Copy link
Contributor

@yasen-pavlov-sonarsource yasen-pavlov-sonarsource left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️ Thanks for the update! I gave it some thought today and realized that it will be a lot simpler to add the jira filter link as another output for the get release notes actions instead. I'll update the PR when I get back.

@yasen-pavlov-sonarsource yasen-pavlov-sonarsource dismissed their stale review December 21, 2025 18:15

Will update the PR first

@nils-werner-sonarsource
Copy link
Contributor Author

@yasen-pavlov-sonarsource what should be our next steps?

@yasen-pavlov-sonarsource
Copy link
Contributor

yasen-pavlov-sonarsource commented Jan 5, 2026

@yasen-pavlov-sonarsource what should be our next steps?

@nils-werner-sonarsource After reviewing the PR again and thinking of how best to handle this I came to the conclusion that it would be a lot cleaner to update the existing get-jira-release-notes so that it returns the issue filter url without changing the create-release-ticket action at all (the field in jira is called link_to_release_notes).

As I wrote above in my dismissal comment, I'll update the PR.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 5, 2026

SonarQube reviewer guide

Important

We are currently testing different models for AI Summary.
Please give us your feedback by filling this form.

Model A:

Summary: Add Jira release issue filter URL output to release notes workflow

Review Focus: The new jira-release-issue-filter-url output is threaded through multiple workflows and replaces jira-release-url in some contexts. Verify the URL format change doesn't break downstream integrations and that the sed transformation correctly handles the new output variable in the shell pipeline.

Start review at: get-jira-release-notes/get_jira_release_notes.py. This is where the new URL generation function is implemented and the output is added to the script's results, forming the foundation for all downstream changes.

Model B:

Summary: Add a new Jira issue filter URL output to the release notes action, enabling direct access to filtered issues for a release version.

Review Focus:

  • The new generate_release_issue_filter_url() function and its JQL encoding (fixVersion%3D) is correct for Jira filtering
  • Verify the URL is properly threaded through all workflow files and passed to downstream jobs
  • Check that the sed pipeline in action.yml correctly transforms the new output variable

Start review at: get-jira-release-notes/get_jira_release_notes.py. This is the core implementation file where the new URL generation logic is defined and output. Understanding this function's correctness is critical since it's the source of the new feature, and any issues here will cascade through the workflows.

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

@yasen-pavlov-sonarsource yasen-pavlov-sonarsource merged commit d20a907 into master Jan 5, 2026
7 checks passed
@yasen-pavlov-sonarsource yasen-pavlov-sonarsource deleted the nw/GHA-161 branch January 5, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants