Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bztogl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Infra
bztogl
Commits
89fefee0
Commit
89fefee0
authored
6 years ago
by
Daniel Stone
Browse files
Options
Downloads
Patches
Plain Diff
fixup! Preserve author for issues, comments, attachments
parent
2eb7568a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bztogl/bztogl.py
+5
-1
5 additions, 1 deletion
bztogl/bztogl.py
with
5 additions
and
1 deletion
bztogl/bztogl.py
+
5
−
1
View file @
89fefee0
...
...
@@ -272,20 +272,24 @@ def processbug(bgo, bzurl, instance, resolution, target, user_cache,
if
'
author
'
in
comment
:
if
user_cache
[
comment
[
'
author
'
]]:
author
=
user_cache
[
comment
[
'
author
'
]].
display_name
()
sudo
=
user_cache
[
comment
[
'
author
'
]].
id
else
:
author
=
comment
[
'
author
'
]
sudo
=
None
else
:
if
user_cache
[
comment
[
'
creator
'
]]:
author
=
user_cache
[
comment
[
'
creator
'
]].
display_name
()
sudo
=
user_cache
[
comment
[
'
creator
'
]].
id
else
:
author
=
comment
[
'
creator
'
]
sudo
=
None
gitlab_comment
=
template
.
render_comment
(
bzurl
,
emoji
,
author
,
action
,
body
,
comment_attachment
)
issue
.
notes
.
create
({
'
body
'
:
gitlab_comment
,
'
created_at
'
:
str
(
comment
[
'
creation_time
'
])
},
sudo
=
author
.
id
)
},
sudo
=
sudo
)
# Do last, so that previous actions don't all send an email
for
cc_email
in
itertools
.
chain
(
bzbug
.
cc
,
[
bzbug
.
creator
]):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment