diff options
Diffstat (limited to 'scripts/api/commit_merge_requests.rb')
-rw-r--r-- | scripts/api/commit_merge_requests.rb | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/scripts/api/commit_merge_requests.rb b/scripts/api/commit_merge_requests.rb index 3cf8dc87497..523d2e769f0 100644 --- a/scripts/api/commit_merge_requests.rb +++ b/scripts/api/commit_merge_requests.rb @@ -1,22 +1,11 @@ # frozen_string_literal: true -require 'gitlab' -require_relative 'default_options' +require_relative 'base' -class CommitMergeRequests +class CommitMergeRequests < Base def initialize(options) - @project = options.fetch(:project) + super @sha = options.fetch(:sha) - - # If api_token is nil, it's set to '' to allow unauthenticated requests (for forks). - api_token = options.fetch(:api_token, '') - - warn "No API token given." if api_token.empty? - - @client = Gitlab.client( - endpoint: options.fetch(:endpoint, API::DEFAULT_OPTIONS[:endpoint]), - private_token: api_token - ) end def execute @@ -25,5 +14,5 @@ class CommitMergeRequests private - attr_reader :project, :sha, :client + attr_reader :sha end |