You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: build/metadata/github-actions/README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,4 +86,5 @@ If the action fails, there may be a problem with your configuration. To investig
86
86
| lookback | Set the number of commits to search in history for whether you removed a feature flag from code. You may set to 0 to disable this feature. Setting this option to a high value will increase search time. | `false` | 10 |
87
87
| projKey | Key of the LaunchDarkly project associated with this repository. Found under Account Settings -> Projects in the LaunchDarkly dashboard. Cannot be combined with `projects` block in configuration file. | `false` | |
88
88
| repoName | The repository name. Defaults to the current GitHub repository. | `false` | |
89
+
| prune | There is a known issue where the GitHub Action will not prune deleted branch data in private repos. Only enable this if you are running the action in a public repo. | `false` | false |
Copy file name to clipboardExpand all lines: build/metadata/github-actions/action.yml
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,10 @@ inputs:
38
38
repoName:
39
39
description: "The repository name. Defaults to the current GitHub repository."
40
40
required: false
41
+
prune:
42
+
default: "false"
43
+
description: "There is a known issue where the GitHub Action will not prune deleted branch data in private repos. Only enable this if you are running the action in a public repo."
log.Info.Printf("checking if %d flags without references were removed in the last %d commits for project: %s", len(missingFlags), opts.Lookback, project.Key)
Copy file name to clipboardExpand all lines: docs/CONFIGURATION.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,19 +44,22 @@ Flags:
44
44
-B, --defaultBranch string The default branch. The LaunchDarkly UI will default to this branch. If not provided, will fallback to 'main'. (default "main")
45
45
46
46
-d, --dir string Path to existing checkout of the repository.
47
-
48
47
--dryRun If enabled, the scanner will run without sending code references to LaunchDarkly. Combine with the outDir option to output code references to a CSV.
49
48
50
49
-h, --help help for ld-find-code-refs
51
50
52
51
--hunkUrlTemplate string If provided, LaunchDarkly will attempt to generate links to your VCS service provider per code reference. Example: https://github.com/launchdarkly/ld-find-code-refs/blob/${sha}/${filePath}#L${lineNumber}. Allowed template variables: 'sha', 'filePath', 'lineNumber'. If "hunkUrlTemplate" is not provided, but "repoUrl" is provided and "repoType" is not custom, LaunchDarkly will attempt to automatically generate source code links for the given "repoType".
52
+
53
53
-i, --ignoreServiceErrors If enabled, the scanner will terminate with exit code 0 when the LaunchDarkly API is unreachable or returns an unexpected response.
54
54
55
55
-l, --lookback int Sets the number of git commits to search in history for whether a feature flag was removed from code. May be set to 0 to disabled this feature. Setting this option to a high value will increase search time. (default 10)
56
+
56
57
-o, --outDir string If provided, will output a csv file containing all code references for the project to this directory.
57
58
58
59
-p, --projKey string LaunchDarkly project key. Found under Account Settings -> Projects in the LaunchDarkly dashboard. Cannot be combined with "projects" block in configuration file.
59
60
61
+
--prune If enabled, branches that are not found in the remote repository will be deleted from LaunchDarkly. (default true)
62
+
60
63
-r, --repoName string Repository name. Will be displayed in LaunchDarkly. Case insensitive. Repository names must only contain letters, numbers, '.', '_' or '-'."
61
64
62
65
-T, --repoType string The repo service provider. Used to correctly categorize repositories in the LaunchDarkly UI. Acceptable values: bitbucket|custom|github|gitlab. (default "custom")
@@ -67,6 +70,8 @@ Flags:
67
70
68
71
-s, --updateSequenceId int An integer representing the order number of code reference updates. Used to version updates across concurrent executions of the flag finder. If not provided, data will always be updated. If provided, data will only be updated if the existing "updateSequenceId" is less than the new "updateSequenceId". Examples: the time a "git push" was initiated, CI build number, the current unix timestamp. (default -1)
69
72
73
+
--userAgent string (Internal) Platform where code references is run.
Copy file name to clipboardExpand all lines: options/flags.go
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -111,6 +111,11 @@ the project to this directory.`,
111
111
defaultValue: "",
112
112
usage: `LaunchDarkly project key. Found under Account Settings -> Projects in the LaunchDarkly dashboard. Cannot be combined with "projects" block in configuration file.`,
113
113
},
114
+
{
115
+
name: "prune",
116
+
defaultValue: true,
117
+
usage: `If enabled, branches that are not found in the remote repository will be deleted from LaunchDarkly.`,
0 commit comments