Skip to content

Commit

Permalink
Fetch history for the ref
Browse files Browse the repository at this point in the history
  • Loading branch information
eholum committed Oct 21, 2024
1 parent 618156b commit e450a85
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ runs:
run: git fetch --unshallow
shell: bash

- name: Ensure commits from forks are fetched (testing)
run: git ls-remote
- name: Support forks by grabbing the commit history from the PR branch
run: git fetch origin ${{ github.ref }}:updated_head_ref
shell: bash

- name: Check that every commit name includes an issue reference like "#1"
run: |
set -eo pipefail
IFS=$'\n'
commits=$(git log --oneline origin/${{github.base_ref}}..origin/${{github.head_ref}})
commits=$(git log --oneline origin/${{github.base_ref}}..updated_head_ref)
for commit in $commits
do
if [[ $commit =~ ^.*#[0-9]+.*$ ]];
Expand Down

0 comments on commit e450a85

Please sign in to comment.