Class: Gitloggl::Gitlab::Stack::DetectProject

Inherits:
Abstract
  • Object
show all
Defined in:
lib/gitloggl/gitlab/stack/detect_project.rb

Instance Attribute Summary

Attributes inherited from Abstract

#app, #env, #options

Instance Method Summary collapse

Methods inherited from Abstract

#call, #initialize, opt

Constructor Details

This class inherits a constructor from Gitloggl::Gitlab::Stack::Abstract

Instance Method Details

#before_callObject



7
8
9
10
11
12
13
14
15
# File 'lib/gitloggl/gitlab/stack/detect_project.rb', line 7

def before_call
  env.issues.each do |issue|
    env.cli.projects.find do |row|
      next unless row.fetch('path_with_namespace') =~ %r[#{issue.path.project_path}]

      issue.path.project_id = row.fetch('id')
    end
  end
end