Skip to content

docs: explain the flush interval env var unit and reason #4

docs: explain the flush interval env var unit and reason

docs: explain the flush interval env var unit and reason #4

name: Cleanup Merged Branch
on:
pull_request:
types: [closed]
branches: [main]
jobs:
delete-branch:
name: Delete Merged Branch
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true && github.event.pull_request.head.repo.full_name == github.repository
permissions:
contents: write
steps:
- name: Delete branch
run: |
gh api \
--method DELETE \
"repos/${{ github.repository }}/git/refs/heads/${{ github.event.pull_request.head.ref }}" \
|| echo "Branch already deleted or does not exist"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}