Skip to content

Commit 8f459be

Browse files
Copilotsmockle
andcommitted
Use gh api instead of git push for better authentication context
Co-authored-by: smockle <[email protected]>
1 parent 945f8d9 commit 8f459be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ jobs:
116116
branch="$(gh pr view "$URL" --json headRefName -q .headRefName || true)"
117117
if [[ -n "$branch" ]]; then
118118
echo "Deleting branch: $branch"
119-
git push "https://github.com/${{ env.TESTING_REPOSITORY }}" --delete "$branch" || echo "Failed to delete branch: $branch"
119+
gh api -X DELETE "repos/${{ env.TESTING_REPOSITORY }}/git/refs/heads/$branch" || echo "Failed to delete branch: $branch"
120120
fi
121121
elif [[ "$URL" == *"/issues/"* ]]; then
122122
echo "Closing issue: $URL"

0 commit comments

Comments
 (0)