Custom Shields with Shields IO


Request a shield for your public repository

We can provide one for you; request one on the PR Cycle Time Shield Request page. Computed on our Faros CE instance :)


On our Faros CE GitHub repository, you may have noticed the PR Cycle Time shield in the README file. It is powered by our Faros CE instance through Here are the steps to create your own, once you have ingested the data needed to compute the shield value.

  1. Ensure sharing is enabled on your metabase instance
  2. Create a question in Metabase that computes the desired value and save it
  3. Create a public link for that question (arrow moving up to the right); save the id in the public link
  4. Head to to build your dynamic shield:
    i) data url is based on this Metabase API call; choose json for the export format
    ii) data type is label
    iii) query is based on the output of the API call (see example below)

Click Make Badge and here is your URL!

As an example, our question query is (with the 2 variables tied to field filters with default values):

        "vcs_PullRequest"."mergedAt" - "vcs_PullRequest"."createdAt"
    ) as cycle_time 
  JOIN "vcs_Repository" ON "vcs_PullRequest"."repository" = "vcs_Repository"."id"
    "vcs_PullRequest"."mergedAt" IS NOT NULL AND {{mergedAt}} AND {{repositoryName}}
) / 3600 / 24) as decimal), 1) as pr_cycle_time

The public link for that question after sharing it is:

The Metabase API call is therefore:

and returns


Our dynamic shield URL is therefore:
  • Notice all parameters are URL-escaped
  • Query is $.pr_cycle_time (JSONPath)