@@ -119,35 +119,11 @@ public List<ICustomActionControlParameter> ControlParameters
119119 get ;
120120 } = [ ] ;
121121
122- public ExecuteCustomAction ( Repository repo , Models . CustomAction action )
122+ public ExecuteCustomAction ( Repository repo , Models . CustomAction action , object scopeTarget )
123123 {
124124 _repo = repo ;
125125 CustomAction = action ;
126- Target = new Models . Null ( ) ;
127- PrepareControlParameters ( ) ;
128- }
129-
130- public ExecuteCustomAction ( Repository repo , Models . CustomAction action , Models . Branch branch )
131- {
132- _repo = repo ;
133- CustomAction = action ;
134- Target = branch ;
135- PrepareControlParameters ( ) ;
136- }
137-
138- public ExecuteCustomAction ( Repository repo , Models . CustomAction action , Models . Commit commit )
139- {
140- _repo = repo ;
141- CustomAction = action ;
142- Target = commit ;
143- PrepareControlParameters ( ) ;
144- }
145-
146- public ExecuteCustomAction ( Repository repo , Models . CustomAction action , Models . Tag tag )
147- {
148- _repo = repo ;
149- CustomAction = action ;
150- Target = tag ;
126+ Target = scopeTarget ?? new Models . Null ( ) ;
151127 PrepareControlParameters ( ) ;
152128 }
153129
@@ -206,9 +182,10 @@ private string PrepareStringByTarget(string org)
206182
207183 return Target switch
208184 {
209- Models . Branch b => org . Replace ( "${BRANCH}" , b . FriendlyName ) ,
185+ Models . Branch b => org . Replace ( "${BRANCH}" , b . FriendlyName ) . Replace ( "${REMOTE}" , b . Remote ) ,
210186 Models . Commit c => org . Replace ( "${SHA}" , c . SHA ) ,
211187 Models . Tag t => org . Replace ( "${TAG}" , t . Name ) ,
188+ Models . Remote r => org . Replace ( "${REMOTE}" , r . Name ) ,
212189 _ => org
213190 } ;
214191 }
0 commit comments