Skip to content

Commit 71cc37a

Browse files
authored
chore: Backport #19 from main to the v1 branch (#24)
Part of github/continuous-ai-for-accessibility#76 (Hubber access only) Follow-up to #19
2 parents cfea416 + 5f0bc8f commit 71cc37a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/test.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ concurrency:
1717
group: ${{ github.workflow }}-${{ github.ref }}
1818
cancel-in-progress: false # Allow previous workflows’ clean-up steps to complete
1919

20+
env:
21+
TESTING_REPOSITORY: github/accessibility-scanner-testing
22+
2023
jobs:
2124
test:
2225
name: Test
@@ -74,7 +77,7 @@ jobs:
7477
login_url: http://127.0.0.1:4000/
7578
username: ${{ secrets.TEST_USERNAME }}
7679
password: ${{ secrets.TEST_PASSWORD }}
77-
repository: github/accessibility-scanner-testing
80+
repository: ${{ env.TESTING_REPOSITORY }}
7881
token: ${{ secrets.GH_TOKEN }}
7982
cache_key: ${{ steps.cache_key.outputs.cache_key }}
8083

@@ -152,6 +155,11 @@ jobs:
152155
if [[ "$URL" == *"/pull/"* ]]; then
153156
echo "Closing pull request: $URL"
154157
gh pr close "$URL" || echo "Failed to close pull request: $URL"
158+
branch="$(gh pr view "$URL" --json headRefName -q .headRefName || true)"
159+
if [[ -n "$branch" ]]; then
160+
echo "Deleting branch: $branch"
161+
gh api -X DELETE "repos/${{ env.TESTING_REPOSITORY }}/git/refs/heads/$branch" || echo "Failed to delete branch: $branch"
162+
fi
155163
elif [[ "$URL" == *"/issues/"* ]]; then
156164
echo "Closing issue: $URL"
157165
gh issue close "$URL" || echo "Failed to close issue: $URL"

0 commit comments

Comments
 (0)