Class: Dependabot::PullRequestCreator

Inherits:
Object
  • Object
show all
Defined in:
lib/hack/dependabot-core/common/lib/dependabot/pull_request_creator.rb,
lib/hack/dependabot-core/common/lib/dependabot/pull_request_creator/gitea.rb,
lib/hack/dependabot-core/common/lib/dependabot/pull_request_creator/labeler.rb,
lib/hack/dependabot-core/common/lib/dependabot/pull_request_creator/pr_name_prefixer.rb

Defined Under Namespace

Classes: Gitea, Labeler, PrNamePrefixer

Instance Method Summary collapse

Instance Method Details

#createObject

override



13
14
15
16
17
18
19
20
21
22
# File 'lib/hack/dependabot-core/common/lib/dependabot/pull_request_creator.rb', line 13

def create
  case source.provider
  when "github" then github_creator.create
  when "gitlab" then gitlab_creator.create
  when "azure" then azure_creator.create
  when "gitea" then gitea_creator.create
  when "codecommit" then codecommit_creator.create
  else raise "Unsupported provider #{source.provider}"
  end
end

#gitea_creatorObject



24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/hack/dependabot-core/common/lib/dependabot/pull_request_creator.rb', line 24

def gitea_creator
  Gitea.new(
    source: source,
    branch_name: branch_namer.new_branch_name,
    base_commit: base_commit,
    credentials: credentials,
    files: files,
    commit_message: message_builder.commit_message,
    pr_description: message_builder.pr_message,
    pr_name: message_builder.pr_name,
    author_details: author_details,
    labeler: labeler
  )
end