Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
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 <[email protected]>
  • Loading branch information
JamesMGreene and rsese authored Dec 18, 2021
commit 94659705b15a5e63fdd1aaa9e6628f4eec39c806
9 changes: 1 addition & 8 deletions .github/workflows/repo-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ jobs:
github-token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
result-encoding: string
script: |
const prFiles = await github.pulls.listFiles({
const { data: prFiles } = await github.pulls.listFiles({
...context.repo,
pull_number: process.env.PR_NUMBER,
})
Expand All @@ -238,13 +238,6 @@ jobs:
run: |
gh pr close ${{ steps.find-pull-request.outputs.number }} --repo $GITHUB_REPOSITORY

- name: Comment on the pull request if no files remain
if: ${{ steps.find-pull-request.outputs.number && steps.pr-files.outputs.count == '0' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
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."

- name: Approve pull request
if: ${{ steps.find-pull-request.outputs.number && steps.pr-files.outputs.count != '0' }}
uses: juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8
Expand Down