{"id":15648788,"url":"https://github.com/mdelapenya/cauldrongo","last_synced_at":"2025-03-30T00:11:18.943Z","repository":{"id":233694289,"uuid":"787502271","full_name":"mdelapenya/cauldrongo","owner":"mdelapenya","description":"A Go SDK for fetching OSS metrics from Cauldron (https://cauldron.io)","archived":false,"fork":false,"pushed_at":"2024-04-30T10:48:57.000Z","size":90,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-05T01:42:21.759Z","etag":null,"topics":["cauldron","cobra","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdelapenya.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-16T16:38:32.000Z","updated_at":"2024-04-30T10:48:39.000Z","dependencies_parsed_at":"2024-06-19T11:29:44.490Z","dependency_job_id":"ce57171a-1986-4b51-8697-201eac315460","html_url":"https://github.com/mdelapenya/cauldrongo","commit_stats":null,"previous_names":["mdelapenya/cauldrongo"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdelapenya%2Fcauldrongo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdelapenya%2Fcauldrongo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdelapenya%2Fcauldrongo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdelapenya%2Fcauldrongo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdelapenya","download_url":"https://codeload.github.com/mdelapenya/cauldrongo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246258868,"owners_count":20748573,"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":["cauldron","cobra","golang"],"created_at":"2024-10-03T12:26:23.909Z","updated_at":"2025-03-30T00:11:18.919Z","avatar_url":"https://github.com/mdelapenya.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cauldron Go\n\nThis is a simple Go program that fetches the OSS metrics from the Cauldron API.\n\n## Install\n\n- **MacOS**: You can install the CLI using the following command:\n\n```sh\nbrew install mdelapenya/cauldrongo-tap/cauldrongo\n```\n\nIn any other case, please download the binary from the [releases page](https://github.com/mdelapenya/cauldrongo/releases).\n\n## Cauldron APIs\n\n### Metrics\n\nThe metrics endpoint has the following format:\n\n```\nhttps://cauldron.io/project/${PROJECT_ID}/metrics?from=${FROM}\u0026to=${TO}\u0026tab=${TAB}\n```\n\nThere is one URL parameter: `PROJECT_ID`. This is the ID of the project in Cauldron. The querystring receives four parameters:\n\n- `from`: the start date of the metrics, in the format `YYYY-MM-DD`\n- `to`: the end date of the metrics, in the format `YYYY-MM-DD`\n- `tab`: the tab of the metrics\n- `repo_url`: the URL of the repository. It supports multiple values, in different querystring parameters. E.g. `repo_url=foo\u0026repo_url=bar`.\n\nThe `tab` parameter can be one of the following values:\n\n- `overview`: the overview tab\n- `activity-overview`: the activity overview tab\n- `community-overview`: the community overview tab\n- `performance-overview`: the performance overview tab\n\nIt's **important** to note that the repositories, and their datasources, must be refreshed before fetching the metrics. So please do it manually before querying the API.\n\n## Usage\n\nThe CLI has one subcommand: `metrics`. It has the following flags:\n\n- `--project-id | -p`: the project ID. Required.\n- `--from | -f`: the start date of the metrics, in the format `YYYY-MM-DD`. Default is one year ago.\n- `--to | -t`: the end date of the metrics, in the format `YYYY-MM-DD`. Default is today.\n- `--tab | -T`: the tab of the metrics. Default is `overview`.\n- `--format | -F`: the output format, can be `console` or `json`. Default is `console`.\n- `--repo_url | -r`: the URL of the repository. It supports multiple values, in different parameters. E.g. `--repo_url=foo --repo_url=bar`.\n\nThere is a global flag `--config`, that can be used to specify the path to the configuration file. Its default value is `~/.cauldron-go.yaml`. If passed, and there are project-specific configurations, they will be applied ignoring the project-specific flag. The format of the file is the following:\n\n```yaml\nprojects:\n- id: 2296\n  name: testcontainers-go\n  repo_url:\n    - https://github.com/testcontainers/testcontainers-go\n    - https://github.com/testcontainers/testcontainers-go.git\n- id: 7264\n  name: testcontainers-java\n  repo_url:\n    - https://github.com/testcontainers/testcontainers-java\n    - https://github.com/testcontainers/testcontainers-java.git\n- id: 7265\n  name: testcontainers-dotnet\n  repo_url:\n    - https://github.com/testcontainers/testcontainers-dotnet\n    - https://github.com/testcontainers/testcontainers-dotnet.git\n- id: 7266\n  name: testcontainers-node\n  repo_url:\n    - https://github.com/testcontainers/testcontainers-node\n    - https://github.com/testcontainers/testcontainers-node.git\n- id: 7607\n  name: testcontainers-ruby\n  repo_url:\n    - https://github.com/testcontainers/testcontainers-ruby\n    - https://github.com/testcontainers/testcontainers-ruby.git\n\n```\n\nThere is a sample configuration file in the `root` directory of the project, named `.sample-cauldrongo.yaml`.\n\n### Examples\n\n```sh\n# Fetch the metrics for the project 1, from one year ago to today, using the overview tab, in the console format.\ncauldrongo metrics --project-id 1\n# Fetch the metrics for the project 1, from one year ago to today, using the performance overview tab, in the JSON format.\ncauldrongo metrics --project-id 1 --tab=performance-overview --format=json\n# Fetch the metrics for all the projects in the configuration file located in the ${MY_CAULDRON_FILE} path, from one year ago to today, using the performance overview tab, in the JSON format.\ncauldrongo metrics --config=${MY_CAULDRON_FILE} --project-id 1 --tab=performance-overview --format=json\n# Fetch the metrics for the project 1, from one year ago to today, using the performance overview tab, in the JSON format, for the repositories foo and bar.\ncauldrongo metrics --config=${MY_CAULDRON_FILE} --project-id 1 --tab=performance-overview --format=json --repo_url=foo --repo_url=bar\n```\n\n## Not implemented (yet)\n\n- Refresh the repositories and datasources before fetching the metrics, using the refresh endpoint, but we need to deal with credentials, so I'm postponing it for a second iteration.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdelapenya%2Fcauldrongo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdelapenya%2Fcauldrongo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdelapenya%2Fcauldrongo/lists"}