Yesterday my pullrequest jobs failed with the following output:
11:07:41 > git rev-parse origin/${sha1}^{commit}
11:07:41 > git rev-parse ${sha1}^{commit}
11:07:41 ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
I have made an investigation and saw that in property ${sha1} there was nothing. When i paste an absolute path to pull request builder like pr/341/merge instead of ${sha1} the build works. What it can be?
Git Client Plugin 1.9.0
GitHub API Plugin 1.44
I came across the same issue and spent 4 hours into it but finally got it resolved.
In my case, error was because of wrong Git exe. Inside Jenkins, while setting Git exe path on windows, set the path under cmd folder
In my case it was C:\Program Files\Git\cmd\git.exe
It resolved my issue.