Class: Dependabot::PullRequestCreator::Labeler
- Inherits:
-
Object
- Object
- Dependabot::PullRequestCreator::Labeler
- Defined in:
- lib/hack/dependabot-core/common/lib/dependabot/pull_request_creator/labeler.rb
Instance Method Summary collapse
Instance Method Details
#fetch_gitea_labels ⇒ Object
20 21 22 23 24 |
# 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 ⇒ Object
26 27 28 29 30 31 32 |
# 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 ⇒ Object
override
9 10 11 12 13 14 15 16 17 18 |
# 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 |