[fix] Pull Req creation for existing PR (#292)

This commit is contained in:
Enver Bisevac 2023-02-02 18:13:34 +01:00 committed by GitHub
parent 9dfad8b5e1
commit f7099d5923
2 changed files with 2 additions and 1 deletions

View File

@ -168,6 +168,7 @@ func (c *Controller) checkIfAlreadyExists(ctx context.Context,
map[string]any{
"type": "pr already exists",
"number": existing[0].Number,
"title": existing[0].Title,
},
)
}

View File

@ -67,7 +67,7 @@ func (c *Controller) Create(
return nil, err
}
if err = c.checkIfAlreadyExists(ctx, targetRepo.ID, sourceRepo.ID, in.SourceBranch, in.TargetBranch); err != nil {
if err = c.checkIfAlreadyExists(ctx, targetRepo.ID, sourceRepo.ID, in.TargetBranch, in.SourceBranch); err != nil {
return nil, err
}