GitHub: Feature Flag Change Insights on Pull Request
Get the integration on the GitHub Marketplace
Overview
With this Github action, 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
Create a new Actions workflow in your GitHub repository (e.g. devcycle-insights.yml) in the .github/workflows directory. In your new file, paste the following code:
on: pull_request
jobs:
dvc-feature-flag-insights:
runs-on: ubuntu-latest
name: Generate DevCycle PR Insights
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: DevCycleHQ/feature-flag-pr-insights-action@v2.0.7
with:
# Token generated by GitHub
github-token: ${{ secrets.GITHUB_TOKEN }}
# Your DevCycle project key
project-key: your-project-key
# Your organization's DevCycle API client ID & secret
client-id: ${{ secrets.DVC_CLIENT_ID }}
client-secret: ${{ secrets.DVC_CLIENT_SECRET }}
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.
When referencing your API client ID and secret, we recommend using GitHub Secrets to store your credentials securely.
Inputs
input | required | description |
---|---|---|
github-token | yes | The GitHub Actions token e.g. secrets.GITHUB_TOKEN |
project-key | no | Your DevCycle project key, see Projects |
client-id | no | Your organization's API client ID, see Organization Settings |
client-secret | no | Your organization's API client secret, see Organization Settings |
only-comment-on-change | no | If true, comments will only be added to PRs when changes to DevCycle variables are detected. Defaults to false. |
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.