Skip to content

Datacap for The Second Life #3

Datacap for The Second Life

Datacap for The Second Life #3

name: delete branch on close pr
on:
pull_request:
types: [closed]
jobs:
delete-branch:
runs-on: ubuntu-latest
env:
BACKEND_URL: https://api.allocator.tech
steps:
- name: Delete branch
run: |
REPO_NAME=$(echo ${{ github.repository }} | cut -d'/' -f2)
BRANCH_NAME=${{ github.head_ref }}
curl -X POST "${BACKEND_URL}/application/branch/delete" \
-H "Content-Type: application/json" \
-d '{"owner": "'${{ github.repository_owner }}'", "repo": "'$REPO_NAME'", "branch_name": "'$BRANCH_NAME'"}'