fix: raise errors when unable to locate the previous commit in local history (#1551)
Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
@@ -426,8 +426,8 @@ export const getSHAForPullRequestEvent = async (
|
||||
github.context.payload.action &&
|
||||
github.context.payload.action === 'synchronize'
|
||||
) {
|
||||
core.warning(
|
||||
'Unable to locate the remote branch head sha. Falling back to the previous commit in the local history.'
|
||||
throw Error(
|
||||
'Unable to locate the previous commit in the local history. Please ensure to checkout pull request HEAD commit instead of the merge commit. See: https://github.com/actions/checkout/blob/main/README.md#checkout-pull-request-head-commit-instead-of-merge-commit)'
|
||||
)
|
||||
} else {
|
||||
core.info(
|
||||
|
||||
Reference in New Issue
Block a user