This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/orc.git
The following commit(s) were added to refs/heads/main by this push:
new 372a4671d ORC-2109: Improve `create_orc_jira.py` to support the
version parameter
372a4671d is described below
commit 372a4671dd72c9fd911ce3f32cf4ce7be1c20984
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Mon Feb 23 14:21:57 2026 -0800
ORC-2109: Improve `create_orc_jira.py` to support the version parameter
### What changes were proposed in this pull request?
This PR aims to improve `create_orc_jira.py` to support the version
parameter.
### Why are the changes needed?
To accept `Affected Version` for `Bug` type issues easily.
### How was this patch tested?
Manual tests.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: `Gemini 3.1 Pro (High)` on `Antigravity`
Closes #2554 from dongjoon-hyun/ORC-2109.
Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
dev/create_orc_jira.py | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/dev/create_orc_jira.py b/dev/create_orc_jira.py
index 79ad33119..c25409209 100755
--- a/dev/create_orc_jira.py
+++ b/dev/create_orc_jira.py
@@ -50,26 +50,30 @@ def run_cmd(cmd):
import argparse
-def create_jira_issue(title, parent_jira_id=None, issue_type=None):
+def create_jira_issue(title, parent_jira_id=None, issue_type=None,
version=None):
asf_jira = jira.client.JIRA(
{"server": JIRA_API_BASE},
token_auth=JIRA_ACCESS_TOKEN,
timeout=(3.05, 30)
)
- versions = asf_jira.project_versions("ORC")
- # Consider only x.y.z, unreleased, unarchived versions
- versions = [
- x for x in versions
- if not x.raw["released"] and not x.raw["archived"] and
re.match(r"\d+\.\d+\.\d+", x.name)
- ]
- versions = sorted(versions, key=lambda x: x.name, reverse=True)
+ if version:
+ affected_version = version
+ else:
+ versions = asf_jira.project_versions("ORC")
+ # Consider only x.y.z, unreleased, unarchived versions
+ versions = [
+ x for x in versions
+ if not x.raw["released"] and not x.raw["archived"] and
re.match(r"\d+\.\d+\.\d+", x.name)
+ ]
+ versions = sorted(versions, key=lambda x: x.name, reverse=True)
+ affected_version = versions[0].name
issue_dict = {
'project': {'key': 'ORC'},
'summary': title,
'description': '',
- 'versions': [{'name': versions[0].name}],
+ 'versions': [{'name': affected_version}],
}
if parent_jira_id:
@@ -112,6 +116,7 @@ def main():
parser.add_argument("title", help="Title of the JIRA issue")
parser.add_argument("-p", "--parent", help="Parent JIRA ID for subtasks")
parser.add_argument("-t", "--type", help="Issue type to create when no
parent is specified (e.g. Bug). Defaults to Improvement.")
+ parser.add_argument("-v", "--version", help="Version to use for the issue")
args = parser.parse_args()
if args.parent:
@@ -119,7 +124,7 @@ def main():
else:
print("Creating JIRA issue with title: %s" % args.title)
- jira_id = create_jira_issue(args.title, args.parent, args.type)
+ jira_id = create_jira_issue(args.title, args.parent, args.type,
args.version)
print("Created JIRA issue: %s" % jira_id)
create_and_checkout_branch(jira_id)