Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
05f53109
Commit
05f53109
authored
Jun 16, 2021
by
Alishan Ladhani
Committed by
Albert Salim
Jul 01, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DB testing: Don't overwrite previous comment when kicking off pipeline
parent
80a84822
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
13 deletions
+4
-13
scripts/trigger-build
scripts/trigger-build
+4
-13
No files found.
scripts/trigger-build
View file @
05f53109
...
...
@@ -313,27 +313,18 @@ module Trigger
comment
=
"<!--
#{
IDENTIFIABLE_NOTE_TAG
}
-->
\n
Started database testing [pipeline](https://ops.gitlab.net/
#{
downstream_project_path
}
/-/pipelines/
#{
pipeline
.
id
}
) "
\
"(limited access). This comment will be updated once the pipeline has finished running."
# Look for a
note to upda
te
# Look for a
n existing no
te
db_testing_notes
=
gitlab
.
merge_request_notes
(
project_path
,
merge_request_id
).
auto_paginate
.
select
do
|
note
|
note
.
body
.
include?
(
IDENTIFIABLE_NOTE_TAG
)
end
note
=
db_testing_notes
.
max_by
{
|
note
|
Time
.
parse
(
note
.
created_at
)
}
if
note
&&
note
.
type
!=
'DiscussionNote'
# The latest note has not led to a discussion. Update it.
gitlab
.
edit_merge_request_note
(
project_path
,
merge_request_id
,
note
.
id
,
comment
)
puts
"Updated comment:
\n
"
else
# This is the first note or the latest note has been discussed on the MR.
# Don't update, create new note instead.
if
db_testing_notes
.
empty?
# This is the first note
note
=
gitlab
.
create_merge_request_note
(
project_path
,
merge_request_id
,
comment
)
puts
"Posted comment to:
\n
"
puts
"https://gitlab.com/
#{
project_path
}
/-/merge_requests/
#{
merge_request_id
}
#note_
#{
note
.
id
}
"
end
puts
"https://gitlab.com/
#{
project_path
}
/-/merge_requests/
#{
merge_request_id
}
#note_
#{
note
.
id
}
"
end
private
...
...
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