Skip to content

Commit 72ec04e

Browse files
committed
move land entry to entity
1 parent c78ac99 commit 72ec04e

5 files changed

Lines changed: 11 additions & 8 deletions

File tree

entity/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ go_library(
77
"batch_dependent.go",
88
"build.go",
99
"change_provider.go",
10+
"land_entry.go",
1011
"queue_config.go",
1112
"request.go",
1213
"speculation_tree.go",
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
package landprovider
2-
3-
import "github.com/uber/submitqueue/entity"
1+
package entity
42

53
// LandEntry pairs a land strategy with the change to land.
64
// Each entry represents one request's contribution to a batch land operation.
75
type LandEntry struct {
86
// Strategy is the source control integration method for this change.
9-
Strategy entity.RequestLandStrategy
7+
Strategy RequestLandStrategy
108
// Change is the code change to land.
11-
Change entity.Change
9+
Change Change
1210
}

extension/landprovider/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ go_library(
44
name = "landprovider",
55
srcs = [
66
"errors.go",
7-
"land_entry.go",
87
"land_provider.go",
98
],
109
importpath = "github.com/uber/submitqueue/extension/landprovider",

extension/landprovider/land_provider.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ package landprovider
22

33
//go:generate mockgen -source=land_provider.go -destination=mock/land_provider_mock.go -package=mock
44

5-
import "context"
5+
import (
6+
"context"
7+
8+
"github.com/uber/submitqueue/entity"
9+
)
610

711
// LandProvider lands (merges) code changes into the target branch of a source
812
// control repository. Each implementation is configured for a specific provider
@@ -12,5 +16,5 @@ type LandProvider interface {
1216
// The queue identifies the repository and target branch.
1317
// Each entry contains a change and the strategy to use for landing it.
1418
// Returns ErrLandRejected if the land was rejected due to the changes themselves.
15-
Land(ctx context.Context, queue string, entries []LandEntry) error
19+
Land(ctx context.Context, queue string, entries []entity.LandEntry) error
1620
}

extension/landprovider/mock/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ go_library(
1919
importpath = "github.com/uber/submitqueue/extension/landprovider/mock",
2020
visibility = ["//visibility:public"],
2121
deps = [
22+
"//entity",
2223
"//extension/landprovider",
2324
"@org_uber_go_mock//gomock",
2425
],

0 commit comments

Comments
 (0)