Skip to content

Commit a894767

Browse files
committed
RSCBC-212: Jira issue validator doesn't work against forks
1 parent e6ef315 commit a894767

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

.github/workflows/jira-validator.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,12 @@ jobs:
1313

1414
- name: Prep
1515
run: |
16-
# Checkout branch
17-
git checkout -q ${{ github.event.pull_request.head.ref }}
18-
19-
# Set variables
2016
BASE_BRANCH=${{ github.event.pull_request.base.ref }}
21-
22-
# Write BASE_BRANCH to GITHUB_ENV so commit checker can use
23-
echo "BASE_BRANCH=$BASE_BRANCH" | tee -a $GITHUB_ENV
17+
HEAD_REPO=${{ github.event.pull_request.head.repo.clone_url }}
18+
HEAD_REF=${{ github.event.pull_request.head.ref }}
2419
20+
git fetch --no-tags "$HEAD_REPO" "$HEAD_REF":pr_branch
21+
echo "BASE_BRANCH=$BASE_BRANCH" >> $GITHUB_ENV
2522
- name: Jira Commit Checker
2623
id: jira_commit_checker
2724
uses: couchbaselabs/ActionJiraCommitValidate@master

0 commit comments

Comments
 (0)