File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,17 +27,14 @@ jobs:
2727 uses : actions/checkout@v4
2828 with :
2929 ref : ${{ github.event.pull_request.head.sha }}
30- fetch-depth : 1
31-
32- - name : Fetch base commit for diff
33- run : git fetch --depth=1 origin ${{ github.event.pull_request.base.sha }}
3430
3531 - name : Get changed markdown files
3632 id : changed-files
33+ env :
34+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3735 run : |
38- BASE_SHA="${{ github.event.pull_request.base.sha }}"
39- HEAD_SHA="${{ github.event.pull_request.head.sha }}"
40- CHANGED_MD_FILES=$(git diff --name-only --diff-filter=ACMRT $BASE_SHA $HEAD_SHA -- 'docs/*.md' 'docs/**/*.md' | grep -v '/CLAUDE\.md$' | grep -v '/SKILL\.md$' || true)
36+ PR_NUMBER=${{ github.event.pull_request.number }}
37+ CHANGED_MD_FILES=$(gh pr diff "$PR_NUMBER" --name-only | grep -E '^docs/.*\.md$' | grep -v '/CLAUDE\.md$' | grep -v '/SKILL\.md$' || true)
4138 if [ -z "$CHANGED_MD_FILES" ]; then
4239 echo "No docs markdown files changed"
4340 echo "files=" >> "$GITHUB_OUTPUT"
You can’t perform that action at this time.
0 commit comments