We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b220c9 commit 77f350eCopy full SHA for 77f350e
.github/workflows/todos-check.yml
@@ -25,14 +25,11 @@ jobs:
25
# Fetch the target branch
26
git fetch origin $GITHUB_BASE_REF
27
28
- # Check if there is a common ancestor
29
- if git merge-base --is-ancestor origin/$GITHUB_BASE_REF HEAD; then
30
- # Get the diff of the changes
31
- DIFF=$(git diff origin/$GITHUB_BASE_REF...HEAD)
32
- else
33
- # If no common ancestor, compare with the initial commit
34
- DIFF=$(git diff $(git hash-object -t tree /dev/null) HEAD)
35
- fi
+ git switch -c check_branch
+
+ # Get the diff of the changes
+ DIFF=$(git diff origin/$GITHUB_BASE_REF check_branch)
36
37
# Check the diff for TODOs
38
if echo "$DIFF" | grep -Eq '^\+.*(TODO|FIXME)'; then
0 commit comments