@@ -3,6 +3,7 @@ package main
33import (
44 "context"
55 "errors"
6+ "fmt"
67 "log/slog"
78 "os"
89 "strings"
@@ -57,14 +58,15 @@ func main() {
5758 panic ("token can not be empty" )
5859 }
5960
60- prInfo , err := GetBackportPrInfo (ctx , client , ghctx )
61+ prInfo , err := GetBackportPrInfo (ctx , log , client , ghctx )
6162 if err != nil {
6263 log .Error ("error getting PR info" , "error" , err )
6364 panic (err )
6465 }
6566
66- log = log .With ("pull_request" , prInfo .Pr .Number )
67- branches , err := ghutil .GetReleaseBranches (ctx , client .Repositories , prInfo .RepoOwner , prInfo .RepoName )
67+ log = log .With ("repo" , fmt .Sprintf ("%s/%s" , prInfo .RepoOwner , prInfo .RepoName ), "pull_request" , prInfo .Pr .GetNumber ())
68+
69+ branches , err := ghutil .GetReleaseBranches (ctx , log , client .Repositories , prInfo .RepoOwner , prInfo .RepoName )
6870 if err != nil {
6971 log .Error ("error getting branches" , "error" , err )
7072 panic (err )
@@ -101,7 +103,8 @@ func main() {
101103 MergeBase : mergeBase ,
102104 }
103105
104- prOut , err := Backport (ctx , log , client .PullRequests , client .Issues , client .Issues , NewShellCommandRunner (log ), opts )
106+ commandRunner := NewShellCommandRunner (log )
107+ prOut , err := Backport (ctx , log , client .PullRequests , client .Issues , client .Issues , commandRunner , opts )
105108 if err != nil {
106109 log .Error ("backport failed" , "error" , err )
107110 continue
0 commit comments