https://github.com/devcyclehq/feature-flag-code-usage-action
DevCycle - Feature Flag Code Usages Action
https://github.com/devcyclehq/feature-flag-code-usage-action
continuous-delivery continuous-deployment devcycle devops feature-flags feature-toggles openfeature
Last synced: 10 months ago
JSON representation
DevCycle - Feature Flag Code Usages Action
- Host: GitHub
- URL: https://github.com/devcyclehq/feature-flag-code-usage-action
- Owner: DevCycleHQ
- Created: 2022-03-03T15:21:48.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-12T20:40:25.000Z (10 months ago)
- Last Synced: 2025-03-12T21:29:35.890Z (10 months ago)
- Topics: continuous-delivery, continuous-deployment, devcycle, devops, feature-flags, feature-toggles, openfeature
- Language: TypeScript
- Homepage: https://docs.devcycle.com/
- Size: 1.3 MB
- Stars: 19
- Watchers: 6
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Overview
With this Github action, your [DevCycle](https://devcycle.com/) dashboard will be updated to display code snippets for each DevCycle variable usage within your project.
Note: This is intended to run when pushing changes to your main branch
### Example Output

### Usage
Create a new Actions workflow in your GitHub repository (e.g. devcycle-usages.yml) in the .github/workflows directory. In your new file, paste the following code:
```yaml
on:
push:
branches: [main]
jobs:
dvc-code-usages:
runs-on: ubuntu-latest
name: Fetch DevCycle Code Usages
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: DevCycleHQ/feature-flag-code-usage-action@1.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
client-id: ${{ secrets.DVC_CLIENT_ID }}
client-secret: ${{ secrets.DVC_CLIENT_SECRET }}
project-key: app-devcycle-com
```
Your DevCycle API credentials and project token are required to update the DevCycle dashboard.
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` | yes | Your DevCycle project key, see [Projects](https://app.devcycle.com/r/projects) |
| `client-id` | yes | Your organization's API client ID, see [Organization Settings](https://app.devcycle.com/r/settings) |
| `client-secret` | yes | Your organization's API client secret, see [Organization Settings](https://app.devcycle.com/r/settings) |
### 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).