Skip to content

Feat/logs page

Feat/logs page #34

name: delete-merged-branch
on:
pull_request:
types:
- closed
jobs:
delete-branch:
if: github.event.pull_request.merged == true && github.event.pull_request.head.ref != 'develop'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Delete branch
uses: actions/github-script@v7
with:
script: |
const branch = context.payload.pull_request.head.ref;
await github.rest.git.deleteRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: `heads/${branch}`,
});