{"id":17753135,"url":"https://github.com/configcat/scan-repository-orb","last_synced_at":"2025-04-01T10:35:56.423Z","repository":{"id":95111810,"uuid":"419495706","full_name":"configcat/scan-repository-orb","owner":"configcat","description":"ConfigCat's repository scanner CircleCI Orb. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.","archived":false,"fork":false,"pushed_at":"2024-07-26T11:04:03.000Z","size":156,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-07-26T12:34:32.522Z","etag":null,"topics":["code-analysis","code-cleanup","configcat","feature-flag","feature-toggle"],"latest_commit_sha":null,"homepage":"https://circleci.com/developer/orbs/orb/configcat/scan-repository","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/configcat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-20T21:32:46.000Z","updated_at":"2024-07-26T11:04:06.000Z","dependencies_parsed_at":"2024-10-26T15:10:36.093Z","dependency_job_id":"40bcfaf5-e88a-4832-af46-a2edd7b09723","html_url":"https://github.com/configcat/scan-repository-orb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fscan-repository-orb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fscan-repository-orb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fscan-repository-orb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fscan-repository-orb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/configcat","download_url":"https://codeload.github.com/configcat/scan-repository-orb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246627724,"owners_count":20808103,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-analysis","code-cleanup","configcat","feature-flag","feature-toggle"],"created_at":"2024-10-26T13:22:47.123Z","updated_at":"2025-04-01T10:35:56.403Z","avatar_url":"https://github.com/configcat.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# ConfigCat Scan Repository Orb\nThis [CircleCI Orb](https://circleci.com/developer/orbs/orb/configcat/scan-repository) is a utility that discovers ConfigCat feature flag \u0026 setting usages in your source code and uploads the found code references to [ConfigCat](https://configcat.com).\n\nFor more information about repository scanning, see our [documentation](https://configcat.com/docs/advanced/code-references/overview).\n\n## Setup\n1. Create a new [ConfigCat Management API credential](https://app.configcat.com/my-account/public-api-credentials) and save its values in [CircleCI Environment Variables](https://circleci.com/docs/2.0/env-vars/#setting-an-environment-variable-in-a-project) with the following names: `CONFIGCAT_API_USER`, `CONFIGCAT_API_PASS`.\n\n    ![secrets](https://raw.githubusercontent.com/configcat/scan-repository-orb/main/assets/secrets.png  \"secrets\")\n\n2. [Get the ID of your ConfigCat Config](https://configcat.com/docs/advanced/code-references/overview#config-id) that you want to associate with your repository. The scanner will use this ID to determine which feature flags \u0026 settings to search for in your source code.\n\n3. Create a new CircleCI YAML config in your GitHub repository under the `.circleci` 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.\n    ```yaml\n    version: 2.1\n\n    orbs:\n      configcat: configcat/scan-repository@1.10.1\n\n    workflows:\n      main:\n        jobs:\n          - configcat/scan:\n              config-id: PASTE-YOUR-CONFIG-ID-HERE # required\n              file-url-template: 'https://github.com/your/repo/blob/{commitHash}/{filePath}#L{lineNumber}' # optional\n              commit-url-template: 'https://github.com/your/repo/commit/{commitHash}' # optional\n              # line-count: 3           # optional\n              # sub-folder: 'src'       # optional\n              # exclude-keys: \u003e         # optional\n              #   flag_key_to_exclue_1\n              #   flag_key_to_exclue_2 \n              # alias-patterns: (\\w+) = :CC_KEY,const (\\w+) = feature_flags\\.enabled\\(:CC_KEY\\) # optional\n              # usage-patterns: feature_flags\\.enabled\\(:CC_KEY\\)   # optional\n              # verbose: true           # optional\n    ```\n\n4. Commit \u0026 push your changes.\n\nThe above example configures a workflow that executes the scan and code references upload on every git `push` event.\nScan reports are uploaded for each branch of your repository that triggers the workflow. \n\n## Available Options\n\n| Parameter             | Description                                                                | Required   | Default             |\n| --------------------- | -------------------------------------------------------------------------- | ---------- | ------------------- |\n| `api-host`            | ConfigCat Management API host.                                             | \u0026#9745;    | `api.configcat.com` |\n| `api-user`            | Name of the environment variable where the [ConfigCat Management API basic authentication username](https://app.configcat.com/my-account/public-api-credentials) is stored.                                                                                              | \u0026#9745;    | CONFIGCAT_API_USER  |\n| `api-pass`            | Name of the environment variable where the [ConfigCat Management API basic authentication password](https://app.configcat.com/my-account/public-api-credentials) is stored.                                                                                              | \u0026#9745;    | CONFIGCAT_API_PASS  |\n| `config-id`           | ID of the ConfigCat config to scan against.                                | \u0026#9745;    |                     |\n| `file-url-template`   | Template url used to generate VCS file links. Available template parameters: `commitHash`, `filePath`, `lineNumber`. Example: https://github.com/my/repo/blob/{commitHash}/{filePath}#L{lineNumber}                                                                    |            |                     |\n| `commit-url-template` | Template url used to generate VCS commit links. Available template parameters: `commitHash`. Example: https://github.com/my/repo/commit/{commitHash}                                                                                         |            |                     |\n| `line-count`          | Context line count before and after the reference line. (min: 1, max: 10)  |            | 4                   |\n| `sub-folder`          | Sub-folder to scan, relative to the repository root folder.                |            |                     |\n| `exclude-keys`        | List of feature flag keys that must be excluded from the scan report.      |            |                     |\n| `alias-patterns`      | Comma delimited list of custom regex patterns used to search for additional aliases. |  |                     |\n| `usage-patterns`      | Comma delimited list of custom regex patterns that describe additional feature flag key usages. |  |          |\n| `verbose`             | Turns on detailed logging.                                                 |            | false               |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconfigcat%2Fscan-repository-orb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconfigcat%2Fscan-repository-orb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconfigcat%2Fscan-repository-orb/lists"}