Skip to main content

Code References

Overview

Code References allows teams to quickly see instances of feature flags being leveraged in their codebase. By scanning customers’ code bases via a CLI tool and sending results to our application backend, GrowthBook can help surface valuable information such as flagging stale feature flags more accurately, and directing devs to the exact lines of code that need to be cleaned up.

Getting Started

For GitHub users, we provide a streamlined GitHub Action that is easy-to-set up and geting with code references.

For non-GitHub users, we provide all the tools you need to get set up with code references with your platform of choice.

Enabling Code References in GrowthBook

To enable code references, navigate to your General Settings page, and scroll to Configure Code References. You can enable code references here, and access relevant docs to help get set up.

Branch filtering

We provide the option to explicitly specify branch names (comma-separated) to show code references for. By default, we will display all code references received for any branch.

For example, if your team only needed to see code references from branches main and qa, this option would be set to main, qa.

We provide direct links to your codebase hosted on either GitHub or GitLab. Use this option to select which platform you use and code references in the app will automatically provide external links to your codebase.

If you don't see your platform supported, please let us know in the Slack community!

Viewing Code References

Once enabled, you can view Code References on a specific feature page, under the Code Refs tab.