Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleaning up deleted branches #51

Open
jazanne opened this issue Mar 27, 2024 · 0 comments
Open

Cleaning up deleted branches #51

jazanne opened this issue Mar 27, 2024 · 0 comments

Comments

@jazanne
Copy link
Contributor

jazanne commented Mar 27, 2024

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 jazanne pinned this issue Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant