Scan your code for feature flag usages | ConfigCat Docs

Create a new Actions workflow in your GitHub repository under the .github/workflows folder, and put the following snippet into it. Don't forget to replace the PASTE-YOUR-CONFIG-ID-HERE value with your actual Config ID.

on: [push]
name: Code references
jobs:
scan-repo:
runs-on: ubuntu-latest
name: Scan repository for code references
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Scan & upload
uses: configcat/scan-repository@v2
with:
api-user: ${{ secrets.CONFIGCAT_API_USER }}
api-pass: ${{ secrets.CONFIGCAT_API_PASS }}
config-id: PASTE-YOUR-CONFIG-ID-HERE
# line-count: 5 # optional
# timeout: 1800 # optional
# sub-folder: src # optional
# exclude-keys: > # optional
# flag_key_to_exclude_1
# flag_key_to_exclude_2
# alias-patterns: (\w+) = :CC_KEY,const (\w+) = feature_flags\.enabled\(:CC_KEY\) #optional
# usage-patterns: feature_flags\.enabled\(:CC_KEY\) # optional, comma delimited flag key usage patterns
# verbose: true # optional