Skip to content

Datacap for National Human Genome Research Instititue #16

Datacap for National Human Genome Research Instititue

Datacap for National Human Genome Research Instititue #16

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'"}'