Skip to content

Commit

Permalink
fix git diff output used by format.yaml (#1433)
Browse files Browse the repository at this point in the history
wasn't working on #1432
  • Loading branch information
drewda authored Feb 5, 2025
1 parent 187af0c commit d03e27d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,15 @@ jobs:
echo "No formatting changes needed"
else
echo "Formatting changes required"
echo "GIT_DIFF<<EOF" >> "$GITHUB_OUTPUT"
git diff >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
echo "Git status:"
echo "$git_status_output"
echo "Git diff:"
git diff
echo "git_diff=$(git diff)" >> "$GITHUB_OUTPUT"
fi
- name: Comment on PR
if: ${{ steps.git-diff.outputs.GIT_DIFF != null }}
if: ${{ steps.git-diff.outputs.git_diff != '' }}
uses: actions/github-script@v7
with:
script: |
Expand All @@ -81,7 +83,7 @@ jobs:
### Suggested Changes:
\`\`\`diff
${process.env.GIT_DIFF}
${steps.git-diff.outputs.git_diff}
\`\`\`
You can apply these changes by:
Expand Down

0 comments on commit d03e27d

Please sign in to comment.