Update verify-changes to support external docs branches (#20535)

* Update verify-changes to support external docs branches

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

* Revert QT-545 as it Enos workflow is not a workflow_run event

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

---------

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>
This commit is contained in:
Jaymala
2023-05-08 15:03:23 -04:00
committed by GitHub
parent c93f4aa6d0
commit a9aa744ae4
2 changed files with 25 additions and 6 deletions

View File

@@ -3,15 +3,13 @@
event_type=$1 # GH event type (pull_request)
ref_name=$2 # branch reference that triggered the workflow
head_ref=$3 # PR branch head ref
base_ref=$4 # PR branch base ref
base_ref=$3 # PR branch base ref
changed_dir=""
if [[ "$event_type" == "pull_request" ]]; then
git fetch --no-tags --prune origin $head_ref
git fetch --no-tags --prune origin $base_ref
head_commit="origin/$head_ref"
head_commit="HEAD"
base_commit="origin/$base_ref"
else
git fetch --no-tags --prune origin $ref_name