@@ -86,10 +86,12 @@ private static TRepository RepositoryDefaults<TRepository>(TRepository r, string
8686 } ;
8787 // ensure we always null path if we are running in CI
8888 if ( ! string . IsNullOrWhiteSpace ( Environment . GetEnvironmentVariable ( "CI" ) ) )
89+ {
8990 repository = repository with
9091 {
9192 Path = null
9293 } ;
94+ }
9395
9496 if ( string . IsNullOrEmpty ( repository . Origin ) )
9597 {
@@ -147,40 +149,50 @@ public ContentSourceMatch Match(string repository, string branchOrTag)
147149 var edge = r . GetBranch ( ContentSource . Edge ) ;
148150 var isVersionBranch = ContentSourceRegex . MatchVersionBranch ( ) . IsMatch ( branchOrTag ) ;
149151 if ( current == branchOrTag )
152+ {
150153 match = match with
151154 {
152155 Current = ContentSource . Current
153156 } ;
157+ }
154158
155159 if ( next == branchOrTag )
160+ {
156161 match = match with
157162 {
158163 Next = ContentSource . Next
159164 } ;
165+ }
160166
161167 if ( edge == branchOrTag )
168+ {
162169 match = match with
163170 {
164171 Edge = ContentSource . Edge
165172 } ;
173+ }
166174
167175 if ( isVersionBranch && SemVersion . TryParse ( branchOrTag + ".0" , out var v ) )
168176 {
169177 // if the current branch is a version, only speculatively match if branch is actually a new version
170178 if ( SemVersion . TryParse ( current + ".0" , out var currentVersion ) )
171179 {
172180 if ( v >= currentVersion )
181+ {
173182 match = match with
174183 {
175184 Speculative = true
176185 } ;
186+ }
177187 }
178188 // assume we are newly onboarding the repository to current/next
179189 else
190+ {
180191 match = match with
181192 {
182193 Speculative = true
183194 } ;
195+ }
184196 }
185197
186198 return match ;
@@ -191,37 +203,47 @@ public ContentSourceMatch Match(string repository, string branchOrTag)
191203 // this is an unknown new elastic repository
192204 var isVersionBranch = ContentSourceRegex . MatchVersionBranch ( ) . IsMatch ( branchOrTag ) ;
193205 if ( isVersionBranch || branchOrTag == "main" || branchOrTag == "master" )
206+ {
194207 return match with
195208 {
196209 Speculative = true
197210 } ;
211+ }
198212 }
199213
200214 if ( Narrative . GetBranch ( ContentSource . Current ) == branchOrTag )
215+ {
201216 match = match with
202217 {
203218 Current = ContentSource . Current
204219 } ;
220+ }
205221
206222 if ( Narrative . GetBranch ( ContentSource . Next ) == branchOrTag )
223+ {
207224 match = match with
208225 {
209226 Next = ContentSource . Next
210227 } ;
228+ }
211229
212230 if ( Narrative . GetBranch ( ContentSource . Edge ) == branchOrTag )
231+ {
213232 match = match with
214233 {
215234 Edge = ContentSource . Edge
216235 } ;
236+ }
217237
218238 // if we haven't matched anything yet, and the branch is 'main' or 'master' always build
219239 if ( match is { Current : null , Next : null , Edge : null , Speculative : false }
220240 && branchOrTag is "main" or "master" )
241+ {
221242 return match with
222243 {
223244 Speculative = true
224245 } ;
246+ }
225247
226248 return match ;
227249 }
0 commit comments