File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,13 @@ 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
112114 gh pr close "$URL" || echo "Failed to close pull request: $URL"
115+ if [[ -n "$branch" ]]; then
116+ echo "Deleting branch: $branch"
117+ git push https://github.com/github/accessibility-scanner-testing --delete "$branch" || echo "Failed to delete branch: $branch"
118+ fi
113119 elif [[ "$URL" == *"/issues/"* ]]; then
114120 echo "Closing issue: $URL"
115121 gh issue close "$URL" || echo "Failed to close issue: $URL"
You can’t perform that action at this time.
0 commit comments