Skip to content

Commit 08d7ae4

Browse files
Revert remove targeted product (#9)
* Revert "Remove targeted product from rel ticket action (#5)" This reverts commit 261ccb8. * make targeted product optional * revert input name change * add targeted_product conditionally
1 parent 85d6f0b commit 08d7ae4

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

create-jira-release-ticket/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ The following inputs can be configured for the action:
2121
| `version` | The new version string being released (e.g., `1.2.3`). | `true` | |
2222
| `short_description` | A brief description of the release. | `true` | |
2323
| `sq_compatibility` | The SonarQube compatibility version (e.g., `2025.3`). | `true` | |
24+
| `targeted_product` | The targeted product version (e.g., `11.0`). | `false` | |
2425
| `use_sandbox` | Set to `false` to use the Jira production server. | `false` | `true` |
2526
| `documentation_status` | The status of the release documentation. | `false` | `N/A` |
2627
| `rule_props_changed` | Whether rule properties have changed (`Yes` or `No`). | `false` | `No` |
@@ -57,6 +58,9 @@ on:
5758
sq_compatibility:
5859
description: 'SonarQube Compatibility'
5960
required: true
61+
targeted_product:
62+
description: 'Targeted Product'
63+
required: false
6064
jira_release_name:
6165
description: 'Jira release version'
6266
required: false
@@ -91,6 +95,7 @@ jobs:
9195
project_name: ${{ env.PROJECT_NAME }}
9296
version: ${{ github.event.inputs.version }}
9397
short_description: ${{ github.event.inputs.short_description }}
98+
targeted_product: ${{ github.event.inputs.targeted_product }}
9499
sq_compatibility: ${{ github.event.inputs.sq_compatibility }}
95100
jira_release_name: ${{ github.event.inputs.jira_release }}
96101
sonarlint_changelog: ${{ github.event.inputs.sonarlint_changelog }}

create-jira-release-ticket/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ inputs:
2121
short_description:
2222
description: 'A short description for the release'
2323
required: true
24+
targeted_product:
25+
description: 'The targeted product version (e.g., 11.0)'
26+
required: false
2427
sq_compatibility:
2528
description: 'SonarQube compatibility version (e.g., 2025.3)'
2629
required: true
@@ -76,6 +79,7 @@ runs:
7679
--project-name="${{ inputs.project_name }}" \
7780
--version="${{ inputs.version }}" \
7881
--short-description="${{ inputs.short_description }}" \
82+
--targeted-product="${{ inputs.targeted_product }}" \
7983
--sq-compatibility="${{ inputs.sq_compatibility }}" \
8084
${SANDBOX_FLAG} \
8185
--documentation-status="${{ inputs.documentation_status }}" \

create-jira-release-ticket/create_release_ticket.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
CUSTOM_FIELDS = {
1818
'SHORT_DESCRIPTION': 'customfield_10146',
1919
'SQ_COMPATIBILITY': 'customfield_10148',
20+
'TARGETED_PRODUCT': 'customfield_10163',
2021
'LINK_TO_RELEASE_NOTES': 'customfield_10145',
2122
'DOCUMENTATION_STATUS': 'customfield_10147',
2223
'RULE_PROPS_CHANGED': 'customfield_11263',
@@ -163,6 +164,9 @@ def create_release_ticket(jira_client, args, link_to_release_notes):
163164
CUSTOM_FIELDS['SONARLINT_CHANGELOG']: args.sonarlint_changelog
164165
}
165166

167+
if args.targeted_product:
168+
ticket_details[CUSTOM_FIELDS['TARGETED_PRODUCT']] = {'value': args.targeted_product}
169+
166170
try:
167171
new_ticket = jira_client.create_issue(fields=ticket_details)
168172
return new_ticket
@@ -186,6 +190,7 @@ def main():
186190
parser.add_argument("--version", required=True, help="The version being released (e.g., 11.44.2).")
187191
parser.add_argument("--short-description", required=True, help="A short description for the release.")
188192
parser.add_argument("--sq-compatibility", required=True, help="SonarQube compatibility version (e.g., 2025.3).")
193+
parser.add_argument("--targeted-product", help="The targeted product version (e.g., 11.0).")
189194
parser.add_argument('--use-sandbox', action='store_true', help="Use the sandbox server instead of the production Jira.")
190195
parser.add_argument("--documentation-status", default="N/A", help="Status of the documentation.")
191196
parser.add_argument("--rule-props-changed", default="No", choices=['Yes', 'No'],

0 commit comments

Comments
 (0)