Skip to content

Commit 9465970

Browse files
JamesMGreenersese
andauthored
Alternative repo-sync fixes (#23892)
* Info is in the data prop * Don't bother to comment when closing our own automated repo-sync PRs Co-authored-by: Robert Sese <sese@github.com>
1 parent b9b3c65 commit 9465970

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

.github/workflows/repo-sync.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ jobs:
223223
github-token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
224224
result-encoding: string
225225
script: |
226-
const prFiles = await github.pulls.listFiles({
226+
const { data: prFiles } = await github.pulls.listFiles({
227227
...context.repo,
228228
pull_number: process.env.PR_NUMBER,
229229
})
@@ -238,13 +238,6 @@ jobs:
238238
run: |
239239
gh pr close ${{ steps.find-pull-request.outputs.number }} --repo $GITHUB_REPOSITORY
240240
241-
- name: Comment on the pull request if no files remain
242-
if: ${{ steps.find-pull-request.outputs.number && steps.pr-files.outputs.count == '0' }}
243-
env:
244-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
245-
run: |
246-
gh pr comment ${{ steps.find-pull-request.outputs.number }} --repo $GITHUB_REPOSITORY --body "This pull request was closed because it no longer contained any changes."
247-
248241
- name: Approve pull request
249242
if: ${{ steps.find-pull-request.outputs.number && steps.pr-files.outputs.count != '0' }}
250243
uses: juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8

0 commit comments

Comments
 (0)