class Dependabot::PullRequestCreator::Labeler

Public Instance Methods

fetch_gitea_labels() click to toggle source
# File lib/hack/dependabot-core/common/lib/dependabot/pull_request_creator/labeler.rb, line 20
def fetch_gitea_labels
  gitea_client_for_source.
    labels(source.repo).
    map(&:name)
end
gitea_client_for_source() click to toggle source
# File lib/hack/dependabot-core/common/lib/dependabot/pull_request_creator/labeler.rb, line 26
def gitea_client_for_source
  @gitea_client_for_source ||=
    Dependabot::Clients::Gitea.for_source(
      source: source,
      credentials: credentials
    )
end
labels() click to toggle source

override

# File lib/hack/dependabot-core/common/lib/dependabot/pull_request_creator/labeler.rb, line 9
def labels
  @labels ||=
    case source.provider
    when "github" then fetch_github_labels
    when "gitlab" then fetch_gitlab_labels
    when "azure" then fetch_azure_labels
    when "gitea" then fetch_gitea_labels
    else raise "Unsupported provider #{source.provider}"
    end
end