Class: Dependabot::PullRequestUpdater::Azure

Inherits:
Object
  • Object
show all
Defined in:
lib/dependabot/pull_request_updater/azure.rb

Defined Under Namespace

Classes: PullRequestUpdateFailed

Constant Summary collapse

OBJECT_ID_FOR_BRANCH_DELETE =
"0000000000000000000000000000000000000000"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source:, files:, base_commit:, old_commit:, credentials:, pull_request_number:, author_details: nil) ⇒ Azure

Returns a new instance of Azure.



17
18
19
20
21
22
23
24
25
26
# File 'lib/dependabot/pull_request_updater/azure.rb', line 17

def initialize(source:, files:, base_commit:, old_commit:,
               credentials:, pull_request_number:, author_details: nil)
  @source = source
  @files = files
  @base_commit = base_commit
  @old_commit = old_commit
  @credentials = credentials
  @pull_request_number = pull_request_number
  @author_details = author_details
end

Instance Attribute Details

#author_detailsObject (readonly)

Returns the value of attribute author_details.



14
15
16
# File 'lib/dependabot/pull_request_updater/azure.rb', line 14

def author_details
  @author_details
end

#base_commitObject (readonly)

Returns the value of attribute base_commit.



14
15
16
# File 'lib/dependabot/pull_request_updater/azure.rb', line 14

def base_commit
  @base_commit
end

#credentialsObject (readonly)

Returns the value of attribute credentials.



14
15
16
# File 'lib/dependabot/pull_request_updater/azure.rb', line 14

def credentials
  @credentials
end

#filesObject (readonly)

Returns the value of attribute files.



14
15
16
# File 'lib/dependabot/pull_request_updater/azure.rb', line 14

def files
  @files
end

#old_commitObject (readonly)

Returns the value of attribute old_commit.



14
15
16
# File 'lib/dependabot/pull_request_updater/azure.rb', line 14

def old_commit
  @old_commit
end

#pull_request_numberObject (readonly)

Returns the value of attribute pull_request_number.



14
15
16
# File 'lib/dependabot/pull_request_updater/azure.rb', line 14

def pull_request_number
  @pull_request_number
end

#sourceObject (readonly)

Returns the value of attribute source.



14
15
16
# File 'lib/dependabot/pull_request_updater/azure.rb', line 14

def source
  @source
end

Instance Method Details

#updateObject



28
29
30
31
32
# File 'lib/dependabot/pull_request_updater/azure.rb', line 28

def update
  return unless pull_request_exists? && source_branch_exists?

  update_source_branch
end