mirror of
https://github.com/langgenius/dify.git
synced 2026-04-28 03:36:36 +08:00
fix: silent diff when number count are the same (#34097)
This commit is contained in:
parent
a19243068b
commit
f0e6f11c1c
13
.github/workflows/pyrefly-diff.yml
vendored
13
.github/workflows/pyrefly-diff.yml
vendored
@ -50,6 +50,17 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
diff -u /tmp/pyrefly_base.txt /tmp/pyrefly_pr.txt > pyrefly_diff.txt || true
|
diff -u /tmp/pyrefly_base.txt /tmp/pyrefly_pr.txt > pyrefly_diff.txt || true
|
||||||
|
|
||||||
|
- name: Check if line counts match
|
||||||
|
id: line_count_check
|
||||||
|
run: |
|
||||||
|
base_lines=$(wc -l < /tmp/pyrefly_base.txt)
|
||||||
|
pr_lines=$(wc -l < /tmp/pyrefly_pr.txt)
|
||||||
|
if [ "$base_lines" -eq "$pr_lines" ]; then
|
||||||
|
echo "same=true" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "same=false" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Save PR number
|
- name: Save PR number
|
||||||
run: |
|
run: |
|
||||||
echo ${{ github.event.pull_request.number }} > pr_number.txt
|
echo ${{ github.event.pull_request.number }} > pr_number.txt
|
||||||
@ -63,7 +74,7 @@ jobs:
|
|||||||
pr_number.txt
|
pr_number.txt
|
||||||
|
|
||||||
- name: Comment PR with pyrefly diff
|
- name: Comment PR with pyrefly diff
|
||||||
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
|
if: ${{ github.event.pull_request.head.repo.full_name == github.repository && steps.line_count_check.outputs.same == 'false' }}
|
||||||
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user