Skip to content

Commit

Permalink
check-pr: fix GitHub Action to gather the diff (#11425)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiaanspeck authored Nov 11, 2023
1 parent f39087a commit 4ea80ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions scripts/check-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: MIT

# This script is executed by GitHub Actions for every pull request opened.
# It currently accomplishes the following objectives (for English pages only):
# It currently accomplishes the following objectives:
#
# 1. Detect pages that were just copied (i.e. cp pages/{common,linux}/7z.md).
# 2. Detect pages that were added in a platform specific directory although
Expand Down Expand Up @@ -50,7 +50,7 @@ function check_diff {
local line
local entry

git_diff=$(git diff --name-status --find-copies-harder --diff-filter=AC --relative=pages/ remotes/origin/main)
git_diff=$(git diff --name-status --find-copies-harder --diff-filter=AC origin/main -- pages*/)

if [[ -n $git_diff ]]; then
echo -e "Check PR: git diff:\n$git_diff" >&2
Expand Down

0 comments on commit 4ea80ce

Please sign in to comment.