Skip to content

Commit 5745829

Browse files
committed
update readme
1 parent 07a1462 commit 5745829

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,37 @@ jobs:
5151
base-uri: https://app.launchdarkly.com
5252
```
5353
54+
### Force Delete Option
55+
56+
The `force` option allows you to delete LaunchDarkly branches even when the GitHub event is not a branch delete event:
57+
58+
```yaml
59+
name: Force Delete LaunchDarkly Branch
60+
on:
61+
workflow_dispatch:
62+
inputs:
63+
branch_name:
64+
description: 'Branch name to delete'
65+
required: true
66+
67+
jobs:
68+
force-delete-ld-branch:
69+
runs-on: ubuntu-latest
70+
steps:
71+
- name: Force Delete LaunchDarkly Code Refs Branch
72+
uses: your-org/launchdarkly-delete-branch-action@v1
73+
with:
74+
access-token: ${{ secrets.LAUNCHDARKLY_ACCESS_TOKEN }}
75+
branch: ${{ inputs.branch_name }}
76+
force: true
77+
```
78+
79+
**When to use `force: true`:**
80+
- Manual branch cleanup workflows
81+
- Deleting branches triggered by tag deletions
82+
- Cleanup scripts that run on schedule
83+
- Any scenario where you need to delete a LaunchDarkly branch outside of a GitHub branch delete event
84+
5485
## Inputs
5586

5687
| Input | Description | Required | Default |
@@ -59,6 +90,7 @@ jobs:
5990
| `repo` | Repository key in LaunchDarkly | ❌ | GitHub repository name |
6091
| `branch` | Branch name to delete | ❌ | Deleted branch from GitHub event |
6192
| `base-uri` | LaunchDarkly base URI | ❌ | `https://app.launchdarkly.com` |
93+
| `force` | Force delete even when not triggered by a branch delete event | ❌ | `false` |
6294

6395
## Setup
6496

0 commit comments

Comments
 (0)