From 136c49abbf334c88292b549ac22bcf55138be432 Mon Sep 17 00:00:00 2001 From: sachin-sandhu Date: Thu, 7 Nov 2024 01:58:32 -0500 Subject: [PATCH] adds logs for telemetry --- common/lib/dependabot/pull_request_creator/github.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/common/lib/dependabot/pull_request_creator/github.rb b/common/lib/dependabot/pull_request_creator/github.rb index a37a07c7bdc..5605f76ab41 100644 --- a/common/lib/dependabot/pull_request_creator/github.rb +++ b/common/lib/dependabot/pull_request_creator/github.rb @@ -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." @@ -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)