Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
CritasWang committed Dec 13, 2024
1 parent 34d8b5d commit 05ef9a3
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/todos-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,11 @@ jobs:
run: |
# Fetch the target branch
git fetch origin $GITHUB_BASE_REF
echo $GITHUB_BASE_REF
# Check if there is a common ancestor
if git merge-base --is-ancestor origin/$GITHUB_BASE_REF HEAD; then
# Get the diff of the changes
DIFF=$(git diff origin/$GITHUB_BASE_REF...HEAD)
else
# If no common ancestor, compare with the initial commit
DIFF=$(git diff $(git hash-object -t tree /dev/null) HEAD)
fi
git switch -c check_branch
# Get the diff of the changes
DIFF=$(git diff origin/$GITHUB_BASE_REF check_branch)
echo $DIFF
# Check the diff for TODOs
Expand Down

0 comments on commit 05ef9a3

Please sign in to comment.