Skip to content

Commit

Permalink
ci: fix error when PR from fork
Browse files Browse the repository at this point in the history
  • Loading branch information
ObstinateM committed Sep 20, 2024
1 parent 6ddd115 commit d4e5175
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 2 # Fetch at least 2 commits to ensure we get non-merge commits
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Validate commit messages
run: |
git log --pretty=format:"%s" | head -n 1 | python .github/scripts/validate_commit_msg.py
# Get the last non-merge commit and validate the message
git log --pretty=format:"%s" --no-merges -n 1 | python .github/scripts/validate_commit_msg.py
lint:
runs-on: ubuntu-latest
Expand Down

0 comments on commit d4e5175

Please sign in to comment.