From 2e0b0134a99e9ae690f7aa1e9c39d2a8827a2114 Mon Sep 17 00:00:00 2001 From: Evandro Myller Date: Thu, 29 Jan 2026 16:02:37 -0300 Subject: [PATCH 1/2] Introduce Code References in the README --- README.md | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 83 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b6ca798..9a9b34d 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,90 @@ -Continuous Integration tooling to integrate with Flagsmith. +Continuous Integration tooling to integrate with multiple Flagsmith features. +## Code References -## For GitHub +Keep track of feature flags used throughout the codebase. Needs an [Organisation Admin API Key](https://docs.flagsmith.com/integrating-with-flagsmith/flagsmith-api-overview/admin-api/authentication). See related [documentation](https://docs.flagsmith.com/managing-flags/code-references). -This repository houses reusable GitHub workflows and actions to support the following Flagsmith features: +
+ +

Setting up with GitHub (Simple)

+
Add a new GHA workflow that points to the reusable workflow. +
-- **GitHub Code References:** keep track of feature flags used throughout the codebase ([missing documentation](https://github.com/Flagsmith/flagsmith/issues/6510)). +```yaml +# .github/workflows/flagsmith-code-references.yml +name: Flagsmith Code References + +on: + push: + branches: + - main + +jobs: + collect-code-references: + name: Collect + uses: Flagsmith/ci/.github/workflows/collect-code-references.yml@v1.0.0 + with: + flagsmith_project_id: ${{ fromJSON(vars.FLAGSMITH_PROJECT_ID) }} # Obtain from your Flagsmith dashboard URL + flagsmith_admin_api_url: https://api.flagsmith.com # Or your custom Flagsmith API URL + secrets: + flagsmith_admin_api_key: ${{ secrets.FLAGSMITH_CODE_REFERENCES_API_KEY }} +``` + +
+ +
+ +

Setting up with GitHub (Advanced)

+
Individual actions are available for customising the integration workflow. +
+ +```yaml +# .github/workflows/flagsmith-code-references.yml +name: Flagsmith Code References + +on: + push: + branches: + - main + +jobs: + collect-code-references: + name: Collect code references + runs-on: ubuntu-latest + permissions: + contents: read + env: + FLAGSMITH_API_URL: https://api.flagsmith.com # Or your custom Flagsmith API URL + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Fetch feature names + id: fetch-feature-names + uses: Flagsmith/ci/.github/actions/fetch-feature-names@v1.0.0 + with: + flagsmith_project_id: ${{ vars.FLAGSMITH_PROJECT_ID }} + flagsmith_admin_api_url: ${{ env.FLAGSMITH_API_URL }} + flagsmith_admin_api_key: ${{ secrets.FLAGSMITH_CODE_REFERENCES_API_KEY }} + + - name: Scan code references + id: scan-code-references + uses: Flagsmith/ci/.github/actions/scan-code-references@v1.0.0 + with: + feature_names: ${{ steps.fetch-feature-names.outputs.feature_names }} + + - name: Upload code references + uses: Flagsmith/ci/.github/actions/upload-code-references@v1.0.0 + with: + code_references: ${{ steps.scan-code-references.outputs.code_references }} + flagsmith_project_id: ${{ vars.FLAGSMITH_PROJECT_ID }} + flagsmith_admin_api_url: ${{ env.FLAGSMITH_API_URL }} + flagsmith_admin_api_key: ${{ secrets.FLAGSMITH_CODE_REFERENCES_API_KEY }} + repository_url: ${{ github.server_url }}/${{ github.repository }} + revision: ${{ github.sha }} +``` + +
--- From 3499cb24d2725acd1b3f16c5e7cfc8b09fea370e Mon Sep 17 00:00:00 2001 From: Evandro Myller Date: Fri, 30 Jan 2026 11:25:57 -0300 Subject: [PATCH 2/2] Revert deixis --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a9b34d..21c4ac0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Continuous Integration tooling to integrate with multiple Flagsmith features. +Continuous Integration tooling to integrate with Flagsmith. ## Code References