{"id":16945253,"url":"https://github.com/offgriddev/tf-metrics-action","last_synced_at":"2025-04-05T14:44:19.550Z","repository":{"id":206237035,"uuid":"715784806","full_name":"offgriddev/tf-metrics-action","owner":"offgriddev","description":"An experimental GitHub Action intended to gather static metrics on terraform use in a codebase","archived":false,"fork":false,"pushed_at":"2025-01-16T18:41:55.000Z","size":2464,"stargazers_count":1,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-11T11:42:16.800Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/offgriddev.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":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-07T20:35:40.000Z","updated_at":"2025-01-16T18:41:57.000Z","dependencies_parsed_at":"2025-02-11T11:46:46.130Z","dependency_job_id":null,"html_url":"https://github.com/offgriddev/tf-metrics-action","commit_stats":null,"previous_names":["offgriddev/tf-metrics-action"],"tags_count":0,"template":false,"template_full_name":"actions/javascript-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offgriddev%2Ftf-metrics-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offgriddev%2Ftf-metrics-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offgriddev%2Ftf-metrics-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/offgriddev%2Ftf-metrics-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/offgriddev","download_url":"https://codeload.github.com/offgriddev/tf-metrics-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247353676,"owners_count":20925325,"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":[],"created_at":"2024-10-13T21:21:46.319Z","updated_at":"2025-04-05T14:44:19.534Z","avatar_url":"https://github.com/offgriddev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform Metric Collector (TMC)\n\nTMC is a GitHub Action that performs static analysis on Terraform Code to do a simple count of several datapoints provided through the library [@evops/hcl-terraform-parser](https://www.npmjs.com/package/@evops/hcl-terraform-parser). This parser provides the engine for analysis, and this action allows for aggregation of these through snapshots in CI that allow you to analyze your team's development through time.\n\n\n## How to Use\n\n```yml\n- name: Generate Code Metrics for Commit\n  id: metrics\n  uses: offgriddev/tf-metrics-action@main\n  with:\n    github_token: ${{ github.token }}\n    event: ${{ toJson(github.event) }}\n```\n\nThis action has one export: `export_filename`. This stores the filename for the report generated by the complexity reporter.\n\nThe action will produce a report that looks like this:\n\n```json\n{\n  \"actor\": \"offgriddev\",\n  \"sha\": \"b8824d770a1ba20c41329ab92bead39ec85f25ed\",\n  \"ref\": \"refs/heads/main\",\n  \"repository\": {\n    \"owner\": \"offgriddev\",\n    \"repo\": \"tf-metrics-action\"\n  },\n  \"files\": [\n    {\n      \"file\": \"./terraform/main.tf\",\n      \"report\": {\n        \"path\": 9,\n        \"variables\": 0,\n        \"outputs\": 0,\n        \"required_providers\": 0,\n        \"managed_resources\": 2,\n        \"data_resources\": 0,\n        \"module_calls\": 0\n      }\n    },\n    {\n      \"file\": \"./terraform/providers.tf\",\n      \"report\": {\n        \"path\": 9,\n        \"variables\": 0,\n        \"outputs\": 0,\n        \"required_providers\": 1,\n        \"provider_configs\": 1,\n        \"managed_resources\": 0,\n        \"data_resources\": 0,\n        \"module_calls\": 0\n      }\n    },\n    {\n      \"file\": \"./terraform/variables.tf\",\n      \"report\": {\n        \"path\": 9,\n        \"variables\": 1,\n        \"outputs\": 0,\n        \"required_providers\": 0,\n        \"managed_resources\": 0,\n        \"data_resources\": 0,\n        \"module_calls\": 0\n      }\n    }\n  ],\n  \"dateUtc\": \"2023-11-08T23:30:03.837Z\"\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foffgriddev%2Ftf-metrics-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foffgriddev%2Ftf-metrics-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foffgriddev%2Ftf-metrics-action/lists"}