Skip to content

Commit

Permalink
Flatten depndency-group-name in existing-group-pull-requests
Browse files Browse the repository at this point in the history
  • Loading branch information
brrygrdn committed May 2, 2023
1 parent 05fcae5 commit 0d9cc45
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 16 deletions.
2 changes: 1 addition & 1 deletion updater/lib/dependabot/dependency_change.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def existing_pull_request
if grouped_update?
# We only want PRs for the same group that have the same versions
job.existing_group_pull_requests.find do |pr|
pr["dependency-group"]["name"] == dependency_group.name &&
pr["dependency-group-name"] == dependency_group.name &&
Set.new(pr["dependencies"]) == updated_dependencies_set
end
else
Expand Down
2 changes: 1 addition & 1 deletion updater/lib/dependabot/job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def initialize(attributes)
#
# We will need to do a pass updating the CLI and smoke tests before this is possible,
# so let's consider it optional for now.
@existing_group_pull_requests = attributes.fetch(:existing_group_pull_requests, [])
@existing_group_pull_requests = attributes.fetch(:existing_group_pull_requests, [])
@experiments = attributes.fetch(:experiments, {})
@ignore_conditions = attributes.fetch(:ignore_conditions)
@lockfile_only = attributes.fetch(:lockfile_only)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ job:
- dummy-pkg-b
existing-pull-requests: []
existing-group-pull-requests:
- dependency-group:
name: everything-everywhere-all-at-once
- dependency-group-name: everything-everywhere-all-at-once
dependencies:
- dependency-name: dummy-pkg-b
dependency-version: 1.2.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ job:
- dummy-pkg-c
existing-pull-requests: []
existing-group-pull-requests:
- dependency-group:
name: everything-everywhere-all-at-once
- dependency-group-name: everything-everywhere-all-at-once
dependencies:
- dependency-name: dummy-pkg-b
dependency-version: 1.2.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ job:
- dummy-pkg-b
existing-pull-requests: []
existing-group-pull-requests:
- dependency-group:
name: everything-everywhere-all-at-once
- dependency-group-name: everything-everywhere-all-at-once
dependencies:
- dependency-name: dummy-pkg-b
dependency-version: 1.2.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ job:
- dummy-pkg-b
existing-pull-requests: []
existing-group-pull-requests:
- dependency-group:
name: everything-everywhere-all-at-once
- dependency-group-name: everything-everywhere-all-at-once
dependencies:
- dependency-name: dummy-pkg-b
dependency-version: 1.1.5
- dependency-group:
name: overlapping-group
- dependency-group-name: overlapping-group
dependencies:
- dependency-name: dummy-pkg-b
dependency-version: 1.2.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ job:
- dummy-pkg-b
existing-pull-requests: []
existing-group-pull-requests:
- dependency-group:
name: everything-everywhere-all-at-once
- dependency-group-name: everything-everywhere-all-at-once
dependencies:
- dependency-name: dummy-pkg-b
dependency-version: 1.2.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ job:
- dummy-pkg-b
existing-pull-requests: []
existing-group-pull-requests:
- dependency-group:
name: everything-everywhere-all-at-once
- dependency-group-name: everything-everywhere-all-at-once
dependencies:
- dependency-name: dummy-pkg-b
dependency-version: 1.1.5
Expand Down

0 comments on commit 0d9cc45

Please sign in to comment.