This PR changes the commit hash used by ci-init to use github.head_ref instead of github.sha.
github.sha on a PR event returns the merged commit sha of the default branch merged with the head commit of the PR's branch. This merge commit does not actually exist, so whenever a user clicks the git url on the Dagster Cloud Code Location page, it fails.
Example:
Instead, I think the behavior should be to go to the head commit of the PR's branch.
Hi @shalabhc - do you have any time to help me review this PR? We are currently using a fork with these changes, and it would help us if we can use the main repo so we don't have to maintain a fork.
This PR changes the commit hash used by
ci-init
to usegithub.head_ref
instead ofgithub.sha
.github.sha
on a PR event returns the merged commit sha of the default branch merged with the head commit of the PR's branch. This merge commit does not actually exist, so whenever a user clicks the git url on the Dagster Cloud Code Location page, it fails.Example:
Instead, I think the behavior should be to go to the head commit of the PR's branch.