find-code-references icon indicating copy to clipboard operation
find-code-references copied to clipboard

Cleaning up deleted branches

Open jazanne opened this issue 1 year ago • 1 comments

If you are running this action in a private repo, you will need to manually delete branches

Here is an example workflow:

name: Delete code references branch
on: delete

jobs:
  branch-delete-tasks:
    runs-on: ubuntu-latest
    steps:
      - name: Delete branch
        if: ${{ github.event.ref_type == 'branch' }}
        uses: fjogeleit/[email protected]
        with:
          url: 'https://app.launchdarkly.com/api/v2/code-refs/repositories/${{ github.event.repository.name }}/branch-delete-tasks'
          method: POST
          customHeaders: '{"Authorization": "${{ secrets.LD_ACCESS_TOKEN }}"}'
          data: '["${{ github.event.ref }}"]'
          retry: 1
          retryWait: 1000

More information about the code references API can be found at https://apidocs.launchdarkly.com/tag/Code-references

jazanne avatar Mar 27 '24 15:03 jazanne

s

venkigvs2002 avatar Aug 18 '25 11:08 venkigvs2002