BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
8b34687a
Commit
8b34687a
authored
Jun 08, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge conditions. Not worth an additional pointless method:
Feedback from:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4093#note_12321267
parent
d7b08024
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
runner.rb
app/models/ci/runner.rb
+3
-9
No files found.
app/models/ci/runner.rb
View file @
8b34687a
...
...
@@ -99,9 +99,7 @@ module Ci
end
def
can_pick?
(
build
)
available_for?
(
build
.
project
)
&&
run_untagged_or_has_tags?
(
build
)
&&
accepting_tags?
(
build
.
tag_list
)
available_for?
(
build
.
project
)
&&
accepting_tags?
(
build
)
end
def
only_for?
(
project
)
...
...
@@ -129,12 +127,8 @@ module Ci
!
locked?
||
projects
.
exists?
(
id:
project
.
id
)
end
def
run_untagged_or_has_tags?
(
build
)
run_untagged?
||
build
.
has_tags?
end
def
accepting_tags?
(
target_tags
)
(
target_tags
-
tag_list
).
empty?
def
accepting_tags?
(
build
)
(
run_untagged?
||
build
.
has_tags?
)
&&
(
build
.
tag_list
-
tag_list
).
empty?
end
end
end
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