|
35 | 35 | steps: |
36 | 36 | - name: Check out repo's default branch |
37 | 37 | uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
38 | | - with: |
39 | | - # Picking this number is a "best guess". If we make it too large, |
40 | | - # the checkout will take potentially unnecessariily long. |
41 | | - # This reduces the chance that tj-actions/changed-files has to |
42 | | - # fetch deeper history. But if it needs to, it will. |
43 | | - fetch-depth: 10 |
44 | | - |
45 | 38 | - uses: ./.github/actions/node-npm-setup |
46 | 39 |
|
47 | 40 | - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
@@ -108,23 +101,20 @@ jobs: |
108 | 101 | # First, gather the URLs that were relevant |
109 | 102 | - name: Get changed content/data files |
110 | 103 | if: ${{ github.event_name == 'pull_request' }} |
111 | | - id: changed-files |
112 | | - uses: tj-actions/changed-files@40853de9f8ce2d6cfdc73c1b96f14e22ba44aec4 # v45.0.0 |
| 104 | + id: changed_files |
| 105 | + uses: ./.github/actions/get-changed-files |
113 | 106 | with: |
114 | | - # No need to escape the file names because we make the output of |
115 | | - # tj-actions/changed-files be set as an environment variable. Not |
116 | | - # as a direct input to the line of bash that uses it. |
117 | | - safe_output: false |
118 | 107 | files: | |
119 | 108 | content/** |
| 109 | + token: ${{ secrets.GITHUB_TOKEN }} |
120 | 110 |
|
121 | 111 | - name: Generate PR comment |
122 | | - if: ${{ github.event_name == 'pull_request' && steps.changed-files.outputs.any_changed == 'true' }} |
| 112 | + if: ${{ github.event_name == 'pull_request' && steps.changed_files.outputs.filtered_changed_files }} |
123 | 113 | env: |
124 | 114 | # Make it an environment variable so that its value doesn't need to be escaped. |
125 | 115 | # See https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable |
126 | 116 | CHANGED_FILES: |- |
127 | | - ${{ steps.changed-files.outputs.all_changed_files }} |
| 117 | + ${{ steps.changed_files.outputs.filtered_changed_files }} |
128 | 118 | GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_WRITEORG_PROJECT }} |
129 | 119 | ISSUE_NUMBER: ${{ github.event.pull_request.number }} |
130 | 120 | REPOSITORY: ${{ github.repository }} |
|
0 commit comments