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
af2c4ab9
Commit
af2c4ab9
authored
Jun 10, 2021
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upsert pending build using protected attribute
parent
8498d108
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/models/ci/pending_build.rb
app/models/ci/pending_build.rb
+1
-1
spec/models/ci/pending_build_spec.rb
spec/models/ci/pending_build_spec.rb
+1
-1
No files found.
app/models/ci/pending_build.rb
View file @
af2c4ab9
...
...
@@ -8,7 +8,7 @@ module Ci
belongs_to
:build
,
class_name:
'Ci::Build'
def
self
.
upsert_from_build!
(
build
)
entry
=
self
.
new
(
build:
build
,
project:
build
.
project
)
entry
=
self
.
new
(
build:
build
,
project:
build
.
project
,
protected:
build
.
protected?
)
entry
.
validate!
...
...
spec/models/ci/pending_build_spec.rb
View file @
af2c4ab9
...
...
@@ -20,7 +20,7 @@ RSpec.describe Ci::PendingBuild do
context
'when another queuing entry exists for given build'
do
before
do
described_class
.
create!
(
build:
build
,
project:
project
)
described_class
.
create!
(
build:
build
,
project:
project
,
protected:
false
)
end
it
'returns a build id as a result'
do
...
...
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