@@ -46,7 +46,7 @@ public static WorkspaceRuleEvent newExecuteEvent(
4646 Map <String , String > customEnvironment ,
4747 String outputDirectory ,
4848 boolean quiet ,
49- String ruleLabel ,
49+ String context ,
5050 Location location ) {
5151
5252 WorkspaceLogProtos .ExecuteEvent .Builder e =
@@ -71,8 +71,8 @@ public static WorkspaceRuleEvent newExecuteEvent(
7171 if (location != null ) {
7272 result = result .setLocation (location .toString ());
7373 }
74- if (ruleLabel != null ) {
75- result = result .setRule ( ruleLabel );
74+ if (context != null ) {
75+ result = result .setContext ( context );
7676 }
7777 return new WorkspaceRuleEvent (result .build ());
7878 }
@@ -84,7 +84,7 @@ public static WorkspaceRuleEvent newDownloadEvent(
8484 String sha256 ,
8585 String integrity ,
8686 Boolean executable ,
87- String ruleLabel ,
87+ String context ,
8888 Location location ) {
8989 WorkspaceLogProtos .DownloadEvent .Builder e =
9090 WorkspaceLogProtos .DownloadEvent .newBuilder ()
@@ -102,8 +102,8 @@ public static WorkspaceRuleEvent newDownloadEvent(
102102 if (location != null ) {
103103 result = result .setLocation (location .toString ());
104104 }
105- if (ruleLabel != null ) {
106- result = result .setRule ( ruleLabel );
105+ if (context != null ) {
106+ result = result .setContext ( context );
107107 }
108108 return new WorkspaceRuleEvent (result .build ());
109109 }
@@ -114,9 +114,8 @@ public static WorkspaceRuleEvent newExtractEvent(
114114 String output ,
115115 String stripPrefix ,
116116 Map <String , String > renameFiles ,
117- String ruleLabel ,
117+ String context ,
118118 Location location ) {
119-
120119 ExtractEvent e =
121120 WorkspaceLogProtos .ExtractEvent .newBuilder ()
122121 .setArchive (archive )
@@ -131,8 +130,8 @@ public static WorkspaceRuleEvent newExtractEvent(
131130 if (location != null ) {
132131 result = result .setLocation (location .toString ());
133132 }
134- if (ruleLabel != null ) {
135- result = result .setRule ( ruleLabel );
133+ if (context != null ) {
134+ result = result .setContext ( context );
136135 }
137136 return new WorkspaceRuleEvent (result .build ());
138137 }
@@ -146,7 +145,7 @@ public static WorkspaceRuleEvent newDownloadAndExtractEvent(
146145 String type ,
147146 String stripPrefix ,
148147 Map <String , String > renameFiles ,
149- String ruleLabel ,
148+ String context ,
150149 Location location ) {
151150 WorkspaceLogProtos .DownloadAndExtractEvent .Builder e =
152151 WorkspaceLogProtos .DownloadAndExtractEvent .newBuilder ()
@@ -166,15 +165,15 @@ public static WorkspaceRuleEvent newDownloadAndExtractEvent(
166165 if (location != null ) {
167166 result = result .setLocation (location .toString ());
168167 }
169- if (ruleLabel != null ) {
170- result = result .setRule ( ruleLabel );
168+ if (context != null ) {
169+ result = result .setContext ( context );
171170 }
172171 return new WorkspaceRuleEvent (result .build ());
173172 }
174173
175174 /** Creates a new WorkspaceRuleEvent for a file event. */
176175 public static WorkspaceRuleEvent newFileEvent (
177- String path , String content , boolean executable , String ruleLabel , Location location ) {
176+ String path , String content , boolean executable , String context , Location location ) {
178177 FileEvent e =
179178 WorkspaceLogProtos .FileEvent .newBuilder ()
180179 .setPath (path )
@@ -188,14 +187,14 @@ public static WorkspaceRuleEvent newFileEvent(
188187 if (location != null ) {
189188 result = result .setLocation (location .toString ());
190189 }
191- if (ruleLabel != null ) {
192- result = result .setRule ( ruleLabel );
190+ if (context != null ) {
191+ result = result .setContext ( context );
193192 }
194193 return new WorkspaceRuleEvent (result .build ());
195194 }
196195
197196 /** Creates a new WorkspaceRuleEvent for a file read event. */
198- public static WorkspaceRuleEvent newReadEvent (String path , String ruleLabel , Location location ) {
197+ public static WorkspaceRuleEvent newReadEvent (String path , String context , Location location ) {
199198 WorkspaceLogProtos .ReadEvent e =
200199 WorkspaceLogProtos .ReadEvent .newBuilder ().setPath (path ).build ();
201200
@@ -205,15 +204,14 @@ public static WorkspaceRuleEvent newReadEvent(String path, String ruleLabel, Loc
205204 if (location != null ) {
206205 result = result .setLocation (location .toString ());
207206 }
208- if (ruleLabel != null ) {
209- result = result .setRule ( ruleLabel );
207+ if (context != null ) {
208+ result = result .setContext ( context );
210209 }
211210 return new WorkspaceRuleEvent (result .build ());
212211 }
213212
214213 /** Creates a new WorkspaceRuleEvent for a file read event. */
215- public static WorkspaceRuleEvent newDeleteEvent (
216- String path , String ruleLabel , Location location ) {
214+ public static WorkspaceRuleEvent newDeleteEvent (String path , String context , Location location ) {
217215 WorkspaceLogProtos .DeleteEvent e =
218216 WorkspaceLogProtos .DeleteEvent .newBuilder ().setPath (path ).build ();
219217
@@ -223,15 +221,15 @@ public static WorkspaceRuleEvent newDeleteEvent(
223221 if (location != null ) {
224222 result = result .setLocation (location .toString ());
225223 }
226- if (ruleLabel != null ) {
227- result = result .setRule ( ruleLabel );
224+ if (context != null ) {
225+ result = result .setContext ( context );
228226 }
229227 return new WorkspaceRuleEvent (result .build ());
230228 }
231229
232230 /** Creates a new WorkspaceRuleEvent for a patch event. */
233231 public static WorkspaceRuleEvent newPatchEvent (
234- String patchFile , int strip , String ruleLabel , Location location ) {
232+ String patchFile , int strip , String context , Location location ) {
235233 WorkspaceLogProtos .PatchEvent e =
236234 WorkspaceLogProtos .PatchEvent .newBuilder ().setPatchFile (patchFile ).setStrip (strip ).build ();
237235
@@ -241,14 +239,14 @@ public static WorkspaceRuleEvent newPatchEvent(
241239 if (location != null ) {
242240 result = result .setLocation (location .toString ());
243241 }
244- if (ruleLabel != null ) {
245- result = result .setRule ( ruleLabel );
242+ if (context != null ) {
243+ result = result .setContext ( context );
246244 }
247245 return new WorkspaceRuleEvent (result .build ());
248246 }
249247
250248 /** Creates a new WorkspaceRuleEvent for an os event. */
251- public static WorkspaceRuleEvent newOsEvent (String ruleLabel , Location location ) {
249+ public static WorkspaceRuleEvent newOsEvent (String context , Location location ) {
252250 OsEvent e = WorkspaceLogProtos .OsEvent .getDefaultInstance ();
253251
254252 WorkspaceLogProtos .WorkspaceEvent .Builder result =
@@ -257,15 +255,15 @@ public static WorkspaceRuleEvent newOsEvent(String ruleLabel, Location location)
257255 if (location != null ) {
258256 result = result .setLocation (location .toString ());
259257 }
260- if (ruleLabel != null ) {
261- result = result .setRule ( ruleLabel );
258+ if (context != null ) {
259+ result = result .setContext ( context );
262260 }
263261 return new WorkspaceRuleEvent (result .build ());
264262 }
265263
266264 /** Creates a new WorkspaceRuleEvent for a symlink event. */
267265 public static WorkspaceRuleEvent newSymlinkEvent (
268- String from , String to , String ruleLabel , Location location ) {
266+ String from , String to , String context , Location location ) {
269267 SymlinkEvent e =
270268 WorkspaceLogProtos .SymlinkEvent .newBuilder ().setTarget (from ).setPath (to ).build ();
271269
@@ -275,8 +273,8 @@ public static WorkspaceRuleEvent newSymlinkEvent(
275273 if (location != null ) {
276274 result = result .setLocation (location .toString ());
277275 }
278- if (ruleLabel != null ) {
279- result = result .setRule ( ruleLabel );
276+ if (context != null ) {
277+ result = result .setContext ( context );
280278 }
281279 return new WorkspaceRuleEvent (result .build ());
282280 }
@@ -287,7 +285,7 @@ public static WorkspaceRuleEvent newTemplateEvent(
287285 String template ,
288286 Map <String , String > substitutions ,
289287 boolean executable ,
290- String ruleLabel ,
288+ String context ,
291289 Location location ) {
292290 TemplateEvent e =
293291 WorkspaceLogProtos .TemplateEvent .newBuilder ()
@@ -303,15 +301,15 @@ public static WorkspaceRuleEvent newTemplateEvent(
303301 if (location != null ) {
304302 result = result .setLocation (location .toString ());
305303 }
306- if (ruleLabel != null ) {
307- result = result .setRule ( ruleLabel );
304+ if (context != null ) {
305+ result = result .setContext ( context );
308306 }
309307 return new WorkspaceRuleEvent (result .build ());
310308 }
311309
312310 /** Creates a new WorkspaceRuleEvent for a which event. */
313311 public static WorkspaceRuleEvent newWhichEvent (
314- String program , String ruleLabel , Location location ) {
312+ String program , String context , Location location ) {
315313 WhichEvent e = WorkspaceLogProtos .WhichEvent .newBuilder ().setProgram (program ).build ();
316314
317315 WorkspaceLogProtos .WorkspaceEvent .Builder result =
@@ -320,8 +318,8 @@ public static WorkspaceRuleEvent newWhichEvent(
320318 if (location != null ) {
321319 result = result .setLocation (location .toString ());
322320 }
323- if (ruleLabel != null ) {
324- result = result .setRule ( ruleLabel );
321+ if (context != null ) {
322+ result = result .setContext ( context );
325323 }
326324 return new WorkspaceRuleEvent (result .build ());
327325 }
0 commit comments