codecov-bash icon indicating copy to clipboard operation
codecov-bash copied to clipboard

Appveyor PR commit SHA wrong

Open Flamefire opened this issue 4 years ago • 4 comments

It looks like the appveyor commit SHA needs similar fixing as the Github Actions or Azure one.

In https://ci.appveyor.com/project/Flamefire/nowide-fr98b/builds/38560544/job/kb2fl8uw27ued5qs the commit is detected as b6c2ea6c45b76b760189abe5246df472e701a1f9 while it should be 0c853652e5409b32ef8d07939d93c4c5d7e55094

See the same CI on GHA: https://github.com/boostorg/nowide/pull/131/checks?check_run_id=2272049938

The correct env var for PRs seems to be APPVEYOR_PULL_REQUEST_HEAD_COMMIT

Flamefire avatar Apr 06 '21 07:04 Flamefire

Do you know if this is a regression by chance?

blueyed avatar Apr 08 '21 07:04 blueyed

It might be. IIRC it did work some time ago, but can't tell for sure.

I tested the APPVEYOR_PULL_REQUEST_HEAD_COMMIT variable and that did work

Seemingly the Github action had a similar issue: https://github.com/codecov/codecov-action/issues/190 and they used a similar variable: https://github.com/codecov/codecov-action/commit/e77dab65bffcbc621e169f31ec9e12acac61a526

Flamefire avatar Apr 08 '21 08:04 Flamefire

@Flamefire do you have another instance of this? I wonder if this has something to do with the commit SHAs on forks

thomasrockhu avatar Apr 20 '21 02:04 thomasrockhu

I haven't tested it further as I believe that all evidence suggests that APPVEYOR_PULL_REQUEST_HEAD_COMMIT is the correct variable to use and I don't see any downside.

Flamefire avatar Apr 20 '21 06:04 Flamefire