An open API service indexing awesome lists of open source software.

https://github.com/devcyclehq/feature-flag-pr-insights-action

DevCycle -
https://github.com/devcyclehq/feature-flag-pr-insights-action

continuous-delivery continuous-deployment devcycle devops feature-flags feature-toggles openfeature

Last synced: 8 months ago
JSON representation

DevCycle -

Awesome Lists containing this project

README

          

## Overview
With this Github action, information on which [DevCycle](https://devcycle.com/) 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

![Example Output](https://raw.githubusercontent.com/DevCycleHQ/feature-flag-pr-insights-action/main/example_output.png)

### 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:

```yaml
on: pull_request

jobs:
dvc-feature-flag-insights:
runs-on: ubuntu-latest
name: Generate DevCycle PR Insights
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: DevCycleHQ/feature-flag-pr-insights-action@v2.2.8
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](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository) 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](https://app.devcycle.com/settings/projects) |
| `client-id` | no | Your organization's API client ID, see [Organization Settings](https://app.devcycle.com/settings) |
| `client-secret` | no | Your organization's API client secret, see [Organization Settings](https://app.devcycle.com/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](https://github.com/DevCycleHQ/cli) under the hood, for details on how to configure the pattern matcher see the [CLI configuration](https://github.com/DevCycleHQ/cli#configuration).