Matches checks whether the provided baseBranchName and headRef match the refs. It is used to determine whether Pull Requests returned from the API
(baseBranchName, qualifiedHeadRef string)
| 104 | // Matches checks whether the provided baseBranchName and headRef match the refs. |
| 105 | // It is used to determine whether Pull Requests returned from the API |
| 106 | func (r PRFindRefs) Matches(baseBranchName, qualifiedHeadRef string) bool { |
| 107 | headMatches := qualifiedHeadRef == r.QualifiedHeadRef() |
| 108 | baseMatches := r.baseBranchName.IsNone() || baseBranchName == r.baseBranchName.Unwrap() |
| 109 | return headMatches && baseMatches |
| 110 | } |
| 111 | |
| 112 | func (r PRFindRefs) BaseRepo() ghrepo.Interface { |
| 113 | return r.baseRepo |