Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
Managetests
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gruppo Web
Managetests
Commits
d058285c
Commit
d058285c
authored
Dec 15, 2015
by
Pietro Albini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve messages on GitLab merge requests
parent
37cac7ca
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
managetests/app.py
managetests/app.py
+10
-4
managetests/gitlab.py
managetests/gitlab.py
+1
-1
No files found.
managetests/app.py
View file @
d058285c
...
...
@@ -149,7 +149,10 @@ class TestsManager:
# Send an alert on the merge request, if this branch has one
if
mr
is
not
None
:
self
.
gitlab
.
post_command
(
mr
,
"Istanza live aggiornata."
)
self
.
gitlab
.
post_command
(
mr
,
"L'[istanza live]"
"(http://wwwtest.ubuntu-it.org/%s/) "
"per il branch **%s** è stata "
"aggiornata."
%
(
branch
,
branch
))
def
_process_merge_request_hook
(
self
,
data
):
"""Process a merge request hook received from GitLab"""
...
...
@@ -158,11 +161,14 @@ class TestsManager:
# The branch was loaded but the merge request is now closed
if
branch
in
self
.
branches
and
obj
[
"state"
]
!=
"opened"
:
self
.
gitlab
.
post_comment
(
obj
[
"id"
],
"L'istanza live per il branch "
"**%s** è stata rimossa."
%
branch
)
self
.
remove_branch
(
branch
)
self
.
gitlab
.
post_comment
(
obj
[
"id"
],
"L'istanza è stata rimossa."
)
# The instance should be created
elif
branch
not
in
self
.
branches
and
obj
[
"state"
]
==
"opened"
:
self
.
load_branch
(
branch
,
obj
[
"id"
])
self
.
gitlab
.
post_comment
(
obj
[
"id"
],
"Istanza live disponibile su "
"http://wwwtest.ubuntu-it.org/%s."
%
branch
)
self
.
gitlab
.
post_comment
(
obj
[
"id"
],
"Istanza live per il branch "
"**%s** disponibile sul [server di test]"
"(http://wwwtest.ubuntu-it.org/%s/)."
%
(
branch
,
branch
))
managetests/gitlab.py
View file @
d058285c
...
...
@@ -55,4 +55,4 @@ class GitLabAPI:
def
post_comment
(
self
,
id
,
text
):
"""Post a comment on a merge request"""
return
self
.
call
(
"post"
,
"projects/%s/merge_request/%s/comments"
%
(
self
.
project
,
id
),
args
=
{
"note"
:
text
})
self
.
project
,
id
),
data
=
{
"note"
:
text
})
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