Skip to content

Commit

Permalink
adds log statement
Browse files Browse the repository at this point in the history
  • Loading branch information
sachin-sandhu committed Oct 16, 2024
1 parent b6d3c5a commit df58bb9
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ def perform
Dependabot.logger.info("Starting update job for #{job.source.repo}")
Dependabot.logger.info("Checking and updating security pull requests...")

# Raise an error if the package manager version is unsupported
dependency_snapshot.package_manager&.raise_if_unsupported!

# Retrieve the list of initial notices from dependency snapshot
@notices = dependency_snapshot.notices
# More notices can be added during the update process
Expand Down Expand Up @@ -139,6 +142,14 @@ def check_and_update_pull_request(dependencies)
"Security advisory dependency: #{lead_dep_name}\n" \
"First dependency in list: #{job_dependencies.first&.downcase}"
)

if lead_dep_name != job_dependencies.first&.downcase
Dependabot.logger.info(
"Difference found between security-advisory (#{lead_dep_name}) and " \
"first-dependency (#{job_dependencies.first&.downcase})"
)
end

else
lead_dep_name = job_dependencies.first&.downcase
end
Expand Down

0 comments on commit df58bb9

Please sign in to comment.