Skip to content

Cleaning up deleted branches #51

@jazanne

Description

@jazanne

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/http-request-action@v1.15.2
        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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions