feat: resolve PR or branch name
Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
parent
f62ed2e4a3
commit
eda2f5153d
1 changed files with 5 additions and 2 deletions
|
@ -69,8 +69,11 @@ func GetPRIndex(client *gitea.Client, prIndex *int64) error {
|
|||
core.ExitOnError("Couldn't list pull requests", err)
|
||||
|
||||
for _, pr := range prs {
|
||||
if pr.Head.Name == branch {
|
||||
*prID = pr.ID
|
||||
if *prIndex != -1 && pr.ID == *prIndex {
|
||||
*prIndex = pr.Index
|
||||
return nil
|
||||
} else if pr.Head.Name == branch {
|
||||
*prIndex = pr.Index
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue