crc-org / crc

CRC is a tool to help you run containers. It manages a local OpenShift 4.x cluster, Microshift or a Podman VM optimized for testing and development purposes
https://crc.dev
Apache License 2.0
1.26k stars 242 forks source link

[QE][BUG] Windows e2e on GH Action Not Adding Commit Status #4094

Closed adrianriobo closed 6 months ago

adrianriobo commented 7 months ago

On the first creation for a PR when when action is trying to get the commit sha from the github context it is returning null which is not meeting the not set condition to pick the commit from sha field

 COMMIT_ID=$(cat gh_context.json | jq -r '.event.after')
  # if this is a new PR, .event.after is empty, use .sha instead in that case
  if [[ -z "$COMMIT_ID" ]]; then
    COMMIT_ID=$(cat gh_context.json | jq -r '.sha')
  fi

In that case null value does not meet condition and COMMIT_ID is kept as null which is wrong. As we need a real commit value to set its status