If you were to add "SEMAPHORE_GIT_PR_SHA" immediately before "SEMAPHORE_GIT_SHA", this would solve that problem (and better parallel the branch handling).
(Our status updates had been hanging for months. I identified this problem today and was able to implement a workaround in semaphore, but this should fix problems for anyone using this integration).
Sorry I'm too lazy to write a PR for this, but the following from
env/git.go
......contains a nice pattern for semaphore by listing these two in order:
"SEMAPHORE_GIT_PR_BRANCH", "SEMAPHORE_GIT_BRANCH"
.However the same is not true for the commit shas:
This leads to problems with pull request status updates on code climate, because semaphore is using the merge sha rather than the pr's head sha. (see https://docs.semaphoreci.com/essentials/project-workflow-trigger-options/)
If you were to add
"SEMAPHORE_GIT_PR_SHA"
immediately before"SEMAPHORE_GIT_SHA"
, this would solve that problem (and better parallel the branch handling).