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
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
Variable | Description |
---|---|
USER_NAME (*) | Your bitbucket username |
PASSWORD (*) | Your generated app password |
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.
Prerequisites
- Create a new Project & a new Feature
- Generate a new App Password
- Select
write
permissions underPull Requests
, and create the password
- Select
- Grab your username, can easily find it in Personal Settings
Optional Prerequisites
- Grab the PROJECT_KEY in Projects, and find your specific project name & key
- Grab the CLIENT_ID in Settings, under
API AUTHENTICATION
- 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