Skip to content

Commit c549705

Browse files
committed
Simplify PR branch deletion by using URL directly with gh pr view
1 parent dfa77d4 commit c549705

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,7 @@ jobs:
109109
| while read -r URL; do
110110
if [[ "$URL" == *"/pull/"* ]]; then
111111
echo "Closing pull request: $URL"
112-
PR_NUMBER="${URL##*/}"
113-
branch="$(gh pr view "$PR_NUMBER" --repo github/accessibility-scanner-testing --json headRefName -q .headRefName)" || true
112+
branch="$(gh pr view "$URL" --json headRefName -q .headRefName)" || true
114113
gh pr close "$URL" || echo "Failed to close pull request: $URL"
115114
if [[ -n "$branch" ]]; then
116115
echo "Deleting branch: $branch"

0 commit comments

Comments
 (0)