Skip to content

Commit

Permalink
Merge pull request #10907 from dependabot/ssandhu/adds-telemetry-info…
Browse files Browse the repository at this point in the history
…-github-pr

Adds additional logs for Github PR creator
  • Loading branch information
markhallen authored Nov 7, 2024
2 parents 26692aa + 136c49a commit 02ba6a4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions common/lib/dependabot/pull_request_creator/github.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ def initialize(source:, branch_name:, base_commit:, credentials:,

sig { returns(T.untyped) }
def create
Dependabot.logger.info(
"Initiating Github pull request."
)

if experiment_duplicate_branch? && branch_exists?(branch_name)
Dependabot.logger.info(
"Existing branch \"#{branch_name}\" found. Pull request not created."
Expand Down Expand Up @@ -139,9 +143,8 @@ def require_up_to_date_base?
# rubocop:disable Metrics/PerceivedComplexity
sig { params(name: String).returns(T::Boolean) }
def branch_exists?(name)
Dependabot.logger.debug(
"Dependabot::PullRequestCreator::Github:branch_exists?. " \
"Name : #{name}. IsDuplicate: #{git_metadata_fetcher.ref_names.include?(name)}"
Dependabot.logger.info(
"Checking if branch #{name} already exists."
)

git_metadata_fetcher.ref_names.include?(name)
Expand Down

0 comments on commit 02ba6a4

Please sign in to comment.