Skip to content

Commit

Permalink
Merge pull request dependabot#6801 from dependabot/rely-on-previously…
Browse files Browse the repository at this point in the history
…-defined-constant

Rely on previously-defined constant
  • Loading branch information
landongrindheim authored Mar 9, 2023
2 parents 3321795 + b90d2d9 commit e2dd887
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class MessageBuilder
def initialize(source:, dependencies:, files:, credentials:,
pr_message_header: nil, pr_message_footer: nil,
commit_message_options: {}, vulnerabilities_fixed: {},
github_redirection_service:)
github_redirection_service: DEFAULT_GITHUB_REDIRECTION_SERVICE)
@dependencies = dependencies
@files = files
@source = source
Expand Down
9 changes: 1 addition & 8 deletions updater/lib/dependabot/dependency_change.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,7 @@ def pr_message
dependencies: dependencies,
files: updated_dependency_files,
credentials: job.credentials,
commit_message_options: job.commit_message_options,
# This ensures that PR messages we build replace github.com links with
# a redirect that stop markdown enriching them into mentions on the source
# repository.
#
# TODO: Promote this value to a constant or similar once we have
# updated core to avoid surprise outcomes if this is unset.
github_redirection_service: "github-redirect.dependabot.com"
commit_message_options: job.commit_message_options
).message
end

Expand Down
3 changes: 1 addition & 2 deletions updater/spec/dependabot/dependency_change_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@
files: updated_dependency_files,
dependencies: dependencies,
credentials: job_credentials,
commit_message_options: commit_message_options,
github_redirection_service: "github-redirect.dependabot.com"
commit_message_options: commit_message_options
)

expect(dependency_change.pr_message).to eql("Hello World!")
Expand Down

0 comments on commit e2dd887

Please sign in to comment.