Pipe: Feature Flag Change Insights on Pull Request
Overview
With this Bitbucket pipe, 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_request
workflow events
Example Output
Usage
Add the following snippet to your bitbucket-pipelines.yml
file:
pull-requests:
'*':
- step:
script:
- pipe: devcyclehq/devcycle-pr-insights-pipe:1.2.0
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.
Inputs
- 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
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.