Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
8600d770
Unverified
Commit
8600d770
authored
May 16, 2022
by
Yih-Dar
Committed by
GitHub
May 16, 2022
Browse files
Use the PR URL in CI report (#17269)
Co-authored-by:
ydshieh
<
ydshieh@users.noreply.github.com
>
parent
3fb82f74
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
utils/notification_service.py
utils/notification_service.py
+10
-0
No files found.
utils/notification_service.py
View file @
8600d770
...
...
@@ -732,6 +732,9 @@ if __name__ == "__main__":
artifact_path
[
"gpu"
]
]
+=
f
"*
{
line
}
*
\n
_
{
stacktraces
.
pop
(
0
)
}
_
\n\n
"
# To find the PR number in a commit title, for example, `Add AwesomeFormer model (#99999)`
pr_number_re
=
re
.
compile
(
r
"\(#(\d+)\)$"
)
title
=
f
"🤗 Results of the
{
ci_event
}
tests."
# Add PR title with a link for push CI
ci_title
=
os
.
environ
.
get
(
"CI_TITLE"
)
...
...
@@ -739,6 +742,13 @@ if __name__ == "__main__":
if
ci_title
is
not
None
:
assert
commit_url
is
not
None
ci_title
=
ci_title
.
strip
().
split
(
"
\n
"
)[
0
].
strip
()
# Find the PR number (if any) and change the url to the actual PR page.
numbers
=
pr_number_re
.
findall
(
ci_title
)
if
len
(
numbers
)
>
0
:
pr_number
=
numbers
[
0
]
commit_url
=
f
"https://github.com/huggingface/transformers/pull/
{
pr_number
}
"
ci_title
=
f
"<
{
commit_url
}
|
{
ci_title
}
>"
else
:
ci_title
=
""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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