diff options
Diffstat (limited to 'scripts/api/find_issues.rb')
-rw-r--r-- | scripts/api/find_issues.rb | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/scripts/api/find_issues.rb b/scripts/api/find_issues.rb index a1c37030319..f74f815fba9 100644 --- a/scripts/api/find_issues.rb +++ b/scripts/api/find_issues.rb @@ -1,29 +1,9 @@ # frozen_string_literal: true -require 'gitlab' -require_relative 'default_options' - -class FindIssues - def initialize(options) - @project = options.fetch(:project) - - # Force the token to be a string so that if api_token is nil, it's set to '', - # allowing unauthenticated requests (for forks). - api_token = options.delete(:api_token).to_s - - warn "No API token given." if api_token.empty? - - @client = Gitlab.client( - endpoint: options.delete(:endpoint) || API::DEFAULT_OPTIONS[:endpoint], - private_token: api_token - ) - end +require_relative 'base' +class FindIssues < Base def execute(search_data) client.issues(project, search_data) end - - private - - attr_reader :project, :client end |