-
-
Notifications
You must be signed in to change notification settings - Fork 74
PULL_REQUEST_TO_HASH resolved to old commit #117
Comments
What do you mean with the old hash? The original hash that was when the PR was opened? It should point to the latest hash of the target branch of the PR. |
Yes, it points to the hash from when the PR was created. There could have been 3 other commits since then and it does not see them. |
I created a PR. What is the event you are triggering on? |
I am triggering on Button_Trigger. Would it be possible for you to commit other PRs and test again? |
I tried with RESCOPED_FROM and RESCOPED_TO and also with BUTTON_TRIGGER. All works fine for me. Are the PR within the same repo or forked? |
They are within the same repo. |
No there is only ${PULL_REQUEST_TO_HASH} that should be the latest commit of the target branch. For a repo like:
You want to find 070e7df? The ${PULL_REQUEST_TO_HASH} will give you d24afe7. |
Is this problem new in 2.18? I made a very big rewrite in that release. |
I tested under a earlier version, but it was only with a test repo that didn't get many commits. I have only started using 2.18 in production and really exercising it, so I don't really have a reference to earlier versions. |
Perhaps, as a workaround, you can use ${PULL_REQUEST_TO_BRANCH} and resolve it to the latest commit hash in the build job. Since I cant reproduce this, I'll wait and see if others are reporting the problem. |
* Adding integration test for REST API.
I can confirm that version 2.21 fixed the issue. Thank you for such a fast turnaround and superb communication. |
So this is a problem for certain kinds of tests. When we are doing code evaluation we want to do the see changes placed by the commit against what they were changing. Right now I'm not seeing any variable which contains the git commit they created the PR against. Can we get that in a separate variable please? (the value which was previously in TO_HASH) |
The PULL_REQUEST_TO_HASH is pulling to old hash of the repository the commit is going. Shouldn't this pull the latest hash from the repository?
The text was updated successfully, but these errors were encountered: