Skip to main content

Bitbucket: Feature Flag Change Insights on Pull Request

Get the integration on the Bitbucket Marketplace

Bitbucket Pipelines Pipe: DevCycle PR Insights

With this Bitbucket pipeline, information on which DevCycle features have been added or removed in a code change will be shown directly on each Pull Request as a comment.

Note: This is intended for pull-requests workflow events

Example Output

Example Output

YAML Definition

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

pull-requests:
'*':
- step:
script:
- pipe: devcyclehq/devcycle-pr-insights-pipe:1.2.1
variables:
USER_NAME: '<string>'
PASSWORD: '<string>'
# PROJECT_KEY: '<string>' # Optional.
# CLIENT_ID: '<string>' # Optional.
# CLIENT_SECRET: '<string>' # Optional.

We recommend including your DevCycle API credentials and project token as inputs. If included, the PR comment will be enriched with Feature Flag data from DevCycle.

Variables

  • 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
VariableDescription
USER_NAME (*)Your bitbucket username
PASSWORD (*)Your generated app password
PROJECT_KEYYour DevCycle project key, see Projects
CLIENT_IDYour organization's API client ID, see Organization Settings
CLIENT_SECRETYour organization's API client secret, see Organization Settings

(*) = required variable.

Prerequisites

  1. Create a new Project & a new Feature
  2. Generate a new App Password
    • Select write permissions under Pull Requests, and create the password
  3. Grab your username, can easily find it in Personal Settings

Optional Prerequisites

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

Examples

Example:

pull-requests:
'*':
- step:
script:
- pipe: devcyclehq/devcycle-pr-insights-pipe:1.2.1
variables:
USER_NAME: $BITBUCKET_USER_NAME
PASSWORD: $BITBUCKET_APP_PASSWORD
PROJECT_KEY: $DEVCYCLE_PROJECT_KEY
CLIENT_ID: $DEVCYCLE_CLIENT_ID
CLIENT_SECRET: $DEVCYCLE_CLIENT_SECRET

Configuration

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.

Support

The pipe is maintained by support@devcycle.com.

If you are reporting an issue, please include:

  • the version of the pipe
  • relevant logs and error messages
  • steps to reproduce