Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backport-create-issue: copy 'Assignee' of original issue to backports #46395

Merged
merged 1 commit into from
May 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/script/backport-create-issue
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import os
import re
import time
from redminelib import Redmine # https://pypi.org/project/python-redmine/
from redminelib.exceptions import ResourceAttrError

redmine_endpoint = "https://tracker.ceph.com"
project_name = "Ceph"
Expand Down Expand Up @@ -216,13 +217,19 @@ def update_relations(r, issue, dry_run):
"unknown release " + release)
break
subject = (release + ": " + issue['subject'])[:255]
assigned_to_id = None
try:
assigned_to_id = issue.assigned_to.id
except ResourceAttrError: # not assigned
pass
if dry_run:
logging.info(url(issue) + " add backport to " + release)
continue
other = r.issue.create(project_id=issue['project']['id'],
tracker_id=backport_tracker_id,
subject=subject,
priority_id=issue['priority']['id'],
assigned_to_id=assigned_to_id,
target_version=None,
custom_fields=[{
"id": release_id,
Expand Down