Skip to main content

Pipe: Feature Flag Code Usages


Bitbucket Marketplace Listing

With this Bitbucket pipe, your DevCycle dashboard will be updated to display code snippets for each DevCycle variable usage within your project.

Note: This is intended to run when pushing changes to your main branch

Example Output

Example Output


Add the following snippet to your bitbucket-pipelines.yml file:

- step:
- pipe: devcyclehq/devcycle-code-refs-pipe:1.2.0
PROJECT_KEY: '<string>'
CLIENT_ID: '<string>'
CLIENT_SECRET: '<string>'

Your DevCycle API credentials and project token are required to update the DevCycle dashboard.


  • To add variables to be used in the bitbucket-pipelines.yml, an admin must add Repository Variables in Repository Settings > Repository Variables, and then add all necessary variables as secured variables
PROJECT_KEY (*)Your DevCycle project key, see Projects
CLIENT_ID (*)Your organization's API client ID, see Organization Settings
CLIENT_SECRET (*)Your organization's API client secret, see Organization Settings

(*) = required variable.


  1. Create a new Project & a new Feature
  2. Grab the PROJECT_KEY in Projects, and find your specific project name & key
  3. Grab the CLIENT_ID in Settings, under API AUTHENTICATION
  4. Grab the CLIENT_SECRET in Settings, under API AUTHENTICATION


The patterns used to identify references to variables in your code are fully customizable. This action uses the DevCycle CLI under the hood, for details on how to configure the pattern matcher see the CLI configuration.