summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-04-26 09:27:10 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-04-26 09:27:10 +0000
commitf2da2df43a6901061a7e6b861c79025644d3b469 (patch)
tree129fc22b6ed1fe4f11beb236766d3dc4f49b1c3d /lib
parent8c22045ec0a2401d4629d8e59dadc0180c5a137b (diff)
parent68fa16a57c17734d08d978556ca4fe79668bdb24 (diff)
downloadgitlab-ce-f2da2df43a6901061a7e6b861c79025644d3b469.tar.gz
Merge branch '31280-skip-issueables-without-project' into 'master'
Skip issuable without a project in IssuableExtractor#extract Closes #31280 See merge request !10906
Diffstat (limited to 'lib')
-rw-r--r--lib/banzai/issuable_extractor.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/banzai/issuable_extractor.rb b/lib/banzai/issuable_extractor.rb
index c5ce360e172..cbabf9156de 100644
--- a/lib/banzai/issuable_extractor.rb
+++ b/lib/banzai/issuable_extractor.rb
@@ -28,9 +28,13 @@ module Banzai
issue_parser = Banzai::ReferenceParser::IssueParser.new(project, user)
merge_request_parser = Banzai::ReferenceParser::MergeRequestParser.new(project, user)
- issue_parser.issues_for_nodes(nodes).merge(
+ issuables_for_nodes = issue_parser.issues_for_nodes(nodes).merge(
merge_request_parser.merge_requests_for_nodes(nodes)
)
+
+ # The project for the issue/MR might be pending for deletion!
+ # Filter them out because we don't care about them.
+ issuables_for_nodes.select { |node, issuable| issuable.project }
end
end
end