pr checks: fix error message when no checks were found

Fixes the error message:

    no checks reported on the '' branch

Now the correct branch name is reported.
This commit is contained in:
Mislav Marohnić 2022-03-08 16:44:41 +01:00
parent e361fd47a3
commit a657fa808a

View file

@ -134,7 +134,7 @@ func checksRun(opts *ChecksOptions) error {
for {
findOptions := shared.FindOptions{
Selector: opts.SelectorArg,
Fields: []string{"number", "baseRefName", "statusCheckRollup"},
Fields: []string{"number", "headRefName", "statusCheckRollup"},
}
pr, _, err := opts.Finder.Find(findOptions)
if err != nil {