Skip to content

Commit d908e6e

Browse files
jazannemmrj
andauthored
docs: add links to configuration (#440)
Co-authored-by: Molly <[email protected]>
1 parent 7c37706 commit d908e6e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

build/metadata/github-actions/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
This GitHub Action is a utility that automatically populates code references in LaunchDarkly. This is useful for finding references to feature flags in your code, both for reference and for code cleanup.
44

5+
To find code references in pull requests, use [launchdarkly/find-code-references-in-pull-request](https://github.com/launchdarkly/find-code-references-in-pull-request) instead.
6+
57
## Configuration
68

79
Once you've [created a LaunchDarkly access token](https://docs.launchdarkly.com/home/code/github-actions#prerequisites), store the newly created access token as a repository secret titled `LD_ACCESS_TOKEN`. Under Settings > Secrets in your GitHub repo, you'll see a link to "Add a new secret". Click that and paste in your access token and click "Save secret".
@@ -34,10 +36,18 @@ jobs:
3436
3537
We strongly recommend that you update the second `uses` attribute value to reference the latest tag in the [launchdarkly/find-code-references repository](https://github.com/launchdarkly/find-code-references). This will pin your workflow to a particular version of the `launchdarkly/find-code-references` action. Also, make sure to change `projKey` to the key of the LaunchDarkly project associated with this repository.
3638

37-
Commit this file under a new branch. Submit as a PR to your code reviewers to be merged into your default branch. You do not need to have this branch merged into the default branch for code references to appear in the LaunchDarkly UI for your flags; code references will appear for this newly created branch.
39+
Commit this file under a new branch. Submit as a PR to your code reviewers to be merged into your default branch. You do not need to have this new branch merged into the default branch for code references to appear in the LaunchDarkly UI for your flags. Code references appear for this new branch as soon as it is published.
3840

3941
As shown in the above example, the workflow should run on the `push` event, and contain an action provided by the [launchdarkly/find-code-references repository](https://github.com/launchdarkly/find-code-references). The `LD_ACCESS_TOKEN` configured in the previous step should be included as a secret, as well as a new environment variable containing your LaunchDarkly project key.
4042

43+
## Additional configuration
44+
45+
To customize additional configuration not referenced in [Inputs](#inputs), you may use a configuration file located at `.launchdarkly/coderefs.yml`. The following links provide more inforation about configurable options:
46+
47+
- [All configuration options](https://github.com/launchdarkly/ld-find-code-refs/blob/main/docs/CONFIGURATION.md)
48+
- [Monorepo configuration](https://github.com/launchdarkly/ld-find-code-refs/blob/main/docs/CONFIGURATION.md#projects)
49+
- [Alias configuration](https://github.com/launchdarkly/ld-find-code-refs/blob/main/docs/ALIASES.md).
50+
4151
## Additional Examples
4252
The example below is the same as first, but it also excludes any `dependabot` branches. We suggest excluding any automatically generated branches where flags do not change.
4353

@@ -66,6 +76,7 @@ jobs:
6676
accessToken: ${{ secrets.LD_ACCESS_TOKEN }}
6777
projKey: LD_PROJECT_KEY
6878
```
79+
6980
## Troubleshooting
7081

7182
Once your workflow has been created, the best way to confirm that the workflow is executing correctly is to create a new pull request with the workflow file and verify that the newly created action succeeds.

0 commit comments

Comments
 (0)