Skip to content

Commit 294dc8c

Browse files
authored
Fix closes-issues action (#241)
1 parent ac17d37 commit 294dc8c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/close-issues.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ jobs:
3838
}
3939
}
4040
variables: |
41-
owner: ${{ github.event.repository.owner.name }}
42-
repo: ${{ github.event.repository.name }}
41+
owner: ${{ github.repository_owner }}
42+
name: ${{ github.event.repository.name }}
4343
number: ${{ github.event.pull_request.number }}
4444
4545
- name: Close issues
4646
env:
4747
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
4848
run: |
49-
issue_data="$(echo "${{ steps.get-issues.outputs.data }}" | jq -r '.data.repository.pullRequest.closingIssuesReferences.nodes[] | [.number,.repository.nameWithOwner] | @tsv')"
50-
echo "$issue_data" | while read number nameWithOwner; do
49+
issue_data="$(echo '${{ steps.get-issues.outputs.data }}' | jq -r '.repository.pullRequest.closingIssuesReferences.nodes[] | [.number,.repository.nameWithOwner] | @tsv')"
50+
echo "$issue_data" | grep -v "^$" | while read number nameWithOwner; do
5151
gh issue close "$number" -r "$nameWithOwner"
5252
done

0 commit comments

Comments
 (0)