@@ -22,13 +22,10 @@ import (
2222 "github.com/uber/submitqueue/platform/base/change"
2323)
2424
25- // ChangedTargetsRequest asks which targets change when Changes are applied on
26- // top of a base revision.
25+ // ChangedTargetsRequest asks which targets change when ChangeURIs are applied
26+ // on top of a base revision.
2727type ChangedTargetsRequest struct {
28- // Remote is the repository remote that BaseRevision belongs to.
29- Remote string
30-
31- // BaseRevision is the commit SHA the changes are applied on top of.
28+ // BaseRevision is the full commit SHA the changes are applied on top of.
3229 BaseRevision string
3330
3431 // ChangeURIs lists every change to apply, in batch order.
@@ -44,25 +41,10 @@ type ChangedTargetsClient interface {
4441 ChangedTargets (ctx context.Context , request ChangedTargetsRequest ) ([]LabelDistance , error )
4542}
4643
47- // Base is the newest revision of a queue's target branch.
48- type Base struct {
49- // Remote names the repository in the form the ChangedTargetsClient expects.
50- Remote string
51-
52- // Revision is the full commit SHA of the branch tip.
53- Revision string
54- }
55-
56- // BaseResolver finds the base a queue's batches are analyzed against.
57- type BaseResolver interface {
58- // Base returns the current base of the named queue.
59- Base (ctx context.Context , queue string ) (Base , error )
60- }
61-
62- func changedTargetsRequestFor (base Base , changes []change.Change ) ChangedTargetsRequest {
44+ func changedTargetsRequestFor (baseRevision string , changes []change.Change ) ChangedTargetsRequest {
6345 var uris []string
6446 for _ , c := range changes {
6547 uris = append (uris , c .URIs ... )
6648 }
67- return ChangedTargetsRequest {Remote : base . Remote , BaseRevision : base . Revision , ChangeURIs : uris }
49+ return ChangedTargetsRequest {BaseRevision : baseRevision , ChangeURIs : uris }
6850}
0 commit comments