Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dimitri Podborski
AutomationTools
Commits
12eff491
Commit
12eff491
authored
Feb 27, 2021
by
Dimitri Podborski
Browse files
bugfix close
#194
parent
ba7b5659
Changes
1
Hide whitespace changes
Inline
Side-by-side
automation/helpers.py
View file @
12eff491
...
...
@@ -67,7 +67,8 @@ class DocumentFormatter:
# Set the text of all the cells
table
.
rows
[
0
].
cells
[
0
].
text
=
'Authors'
table
.
rows
[
0
].
cells
[
1
].
text
=
details
[
'authors_string'
]
if
details
[
'authors_string'
]
is
not
None
:
table
.
rows
[
0
].
cells
[
1
].
text
=
details
[
'authors_string'
]
table
.
rows
[
0
].
cells
[
1
].
paragraphs
[
0
].
alignment
=
WD_ALIGN_PARAGRAPH
.
LEFT
table
.
rows
[
1
].
cells
[
0
].
text
=
'Abstract'
if
details
[
'abstract'
]
is
not
None
:
...
...
@@ -199,6 +200,8 @@ def get_issue_metadata(description):
pos2
=
description
.
find
(
')'
,
pos1
+
len
(
pattern
))
meta_str
=
description
[
pos1
+
len
(
pattern
):
pos2
]
meta
=
meta_str
.
split
(
','
)
if
len
(
meta
)
!=
4
:
return
None
return
{
'mdms_id'
:
meta
[
0
],
'document'
:
meta
[
1
],
'title'
:
meta
[
2
],
'version'
:
meta
[
3
]}
def
create_issue_metadata
(
document
,
details
):
...
...
@@ -209,7 +212,8 @@ def create_issue_metadata(document, details):
if
len
(
details
[
'documents'
])
>
0
:
last_doc
=
max
(
details
[
'documents'
],
key
=
lambda
x
:
x
[
'version'
])
version
=
str
(
last_doc
[
'version'
])
meta
=
'[meta]: # ({},{},{},{})'
.
format
(
document
[
'mdms_id'
],
document
[
'document'
],
document
[
'title'
],
version
)
title
=
document
[
'title'
].
replace
(
'('
,
''
).
replace
(
')'
,
''
)
meta
=
'[meta]: # ({},{},{},{})'
.
format
(
document
[
'mdms_id'
],
document
[
'document'
],
title
,
version
)
return
meta
def
create_issue_description_header
(
document
,
details
):
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment