@@ -225,44 +225,44 @@ func (api *SAP_COM_0510) GetAction() (string, error) {
225
225
return abapStatusCode , nil
226
226
}
227
227
228
- func (api * SAP_COM_0510 ) GetRepository () (bool , string , error ) {
228
+ func (api * SAP_COM_0510 ) GetRepository () (bool , string , error , bool ) {
229
229
230
230
if api .repository .Name == "" {
231
- return false , "" , errors .New ("An empty string was passed for the parameter 'repositoryName'" )
231
+ return false , "" , errors .New ("An empty string was passed for the parameter 'repositoryName'" ), false
232
232
}
233
233
234
234
swcConnectionDetails := api .con
235
235
swcConnectionDetails .URL = api .con .URL + api .path + api .repositoryEntity + "('" + strings .Replace (api .repository .Name , "/" , "%2F" , - 1 ) + "')"
236
236
resp , err := GetHTTPResponse ("GET" , swcConnectionDetails , nil , api .client )
237
237
if err != nil {
238
238
_ , errRepo := HandleHTTPError (resp , err , "Reading the Repository / Software Component failed" , api .con )
239
- return false , "" , errRepo
239
+ return false , "" , errRepo , false
240
240
}
241
241
defer resp .Body .Close ()
242
242
243
243
var body RepositoryEntity
244
244
var abapResp map [string ]* json.RawMessage
245
245
bodyText , errRead := io .ReadAll (resp .Body )
246
246
if errRead != nil {
247
- return false , "" , err
247
+ return false , "" , err , false
248
248
}
249
249
250
250
if err := json .Unmarshal (bodyText , & abapResp ); err != nil {
251
- return false , "" , err
251
+ return false , "" , err , false
252
252
}
253
253
if err := json .Unmarshal (* abapResp ["d" ], & body ); err != nil {
254
- return false , "" , err
254
+ return false , "" , err , false
255
255
}
256
256
if reflect .DeepEqual (RepositoryEntity {}, body ) {
257
257
log .Entry ().WithField ("StatusCode" , resp .Status ).WithField ("repositoryName" , api .repository .Name ).WithField ("branchName" , api .repository .Branch ).WithField ("commitID" , api .repository .CommitID ).WithField ("Tag" , api .repository .Tag ).Error ("Could not Clone the Repository / Software Component" )
258
258
err := errors .New ("Request to ABAP System not successful" )
259
- return false , "" , err
259
+ return false , "" , err , false
260
260
}
261
261
262
262
if body .AvailOnInst {
263
- return true , body .ActiveBranch , nil
263
+ return true , body .ActiveBranch , nil , false
264
264
}
265
- return false , "" , err
265
+ return false , "" , err , false
266
266
267
267
}
268
268
@@ -399,3 +399,8 @@ func (api *SAP_COM_0510) ConvertTime(logTimeStamp string) time.Time {
399
399
t := time .Unix (n , 0 ).UTC ()
400
400
return t
401
401
}
402
+
403
+ // Dummy implementation of the "optional" method UpdateRepoWithBYOGCredentials (only used in SAP_COM_0948)
404
+ func (api * SAP_COM_0510 ) UpdateRepoWithBYOGCredentials (byogAuthMethod string , byogUsername string , byogPassword string ) {
405
+ panic ("UpdateRepoWithBYOGCredentials cannot be used in SAP_COM_0510" )
406
+ }
0 commit comments