{"id":21409131,"url":"https://github.com/usernam3/meta_commit","last_synced_at":"2025-07-14T01:30:56.281Z","repository":{"id":56883363,"uuid":"94716704","full_name":"usernam3/meta_commit","owner":"usernam3","description":"Enrich commit diffs with programing language insights","archived":false,"fork":false,"pushed_at":"2018-05-12T21:39:16.000Z","size":163,"stargazers_count":8,"open_issues_count":8,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-05T00:48:04.037Z","etag":null,"topics":["commit","git","insights","metadata","tool"],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/usernam3.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-18T22:31:03.000Z","updated_at":"2023-09-19T11:16:00.000Z","dependencies_parsed_at":"2022-08-20T22:31:04.626Z","dependency_job_id":null,"html_url":"https://github.com/usernam3/meta_commit","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/usernam3/meta_commit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usernam3%2Fmeta_commit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usernam3%2Fmeta_commit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usernam3%2Fmeta_commit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usernam3%2Fmeta_commit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usernam3","download_url":"https://codeload.github.com/usernam3/meta_commit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usernam3%2Fmeta_commit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265230753,"owners_count":23731437,"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":["commit","git","insights","metadata","tool"],"created_at":"2024-11-22T17:22:28.582Z","updated_at":"2025-07-14T01:30:55.888Z","avatar_url":"https://github.com/usernam3.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# meta commit\n[![Gem Version](https://badge.fury.io/rb/meta_commit.svg)](https://badge.fury.io/rb/meta_commit)\n[![Build Status](https://travis-ci.org/usernam3/meta_commit.svg?branch=master)](https://travis-ci.org/usernam3/meta_commit)\n[![Maintainability](https://api.codeclimate.com/v1/badges/ff142cfbcd634e8ad8f1/maintainability)](https://codeclimate.com/github/usernam3/meta_commit/maintainability)\n[![Coverage Status](https://coveralls.io/repos/github/usernam3/meta_commit/badge.svg?branch=master)](https://coveralls.io/github/usernam3/meta_commit?branch=master)\n[![Inline docs](https://inch-ci.org/github/usernam3/meta_commit.svg?branch=master)](http://inch-ci.org/github/usernam3/meta_commit)\n\n\u003e   Enrich commit diffs with programing language insights\n\n\n## Description\n\n[![v0.3 demonstration](https://asciinema.org/a/P6kWCq2S4eOpMzEjOAKSHYmyv.png)](https://asciinema.org/a/P6kWCq2S4eOpMzEjOAKSHYmyv?autoplay=1)\n\n[meta commit](https://usernam3.github.io/meta_commit/) - is set of commands for git repository, which extracts useful information from commits and allows to get more insights from usual actions with repository.\n\nGit is universal distributed version control system and works with minimal common units which exist in any file - strings. Meta commit is utility which gives git information about content of repository files and changes between commits on level of programming language. \n\n## What does meta_commit do ?\n\nAfter you read the 'Description section' you may still have question 'What does meta_commit do ?'\n\nThe answer is - it takes diff of each commit in the repository, parse diff content using programming language parser (taken from list of extensions) and try to understand what changes commit introduced on programming language level (not lines level as git does it).\n\n\n## Installation\n\nTo install gem you need to run:\n\n    $ gem install meta_commit\n\n\u003e You may need to additionally install the cmake to install rugged (ruby bindings to libgit). It is [known issue](https://github.com/usernam3/meta_commit/issues/19).\n\n\n## Setup\n\nTo start using meta_commit, first need to add configuration file to the root of the repository.\nTo add it, you need to run init command.\n\n    meta_commit init\n\nOr \n\n    meta_commit init --extensions=ruby_support markdown_support\n\n(*If you want to use [ruby](https://github.com/meta-commit/ruby_support) and [markdown](https://github.com/meta-commit/markdown_support) extensions you will need also to install them by running `gem install meta_commit_ruby_support meta_commit_markdown_support`*)\n\nThis command will add `.meta_commit.yml` configuration file with this contents to the repository\n\n```YAML\ncommands :\n  changelog:\n    adapter: file\n    formatter: keep_a_changelog\n  index:\n    adapter: git_notes\n  message:\n    formatter: commit_message\n\nextensions:\n  - ruby_support\n  - markdown_support\n```\n\nThis config can be used to customize gem behavior, currently only `extensions` key is used.\nItems of `extensions` list are gem names (without `meta_commit_` prefix) that will be loaded.  \n[Here](https://github.com/usernam3/meta_commit/blob/master/CONTRIBUTING.md#creating-new-extension) you can get more information about how to create the new extension. \n\n\n## Usage\n\nHere you can see usage examples of main meta_commit commands \n\n### Message\n\n    meta_commit message [--directory=$(pwd)]\n\nMessage command prints description of repository working tree staged changes.\nResult of execution of this command is string, that is printed to the console and which represents summary of staged changes.\n\nExample :\n\n```zsh\n\u003e /repository_folder git diff --cached\n\ndiff --git a/lib/meta_commit/changelog/commands/commit_diff_examiner.rb b/lib/meta_commit/changelog/commands/commit_diff_examiner.rb\nindex 49a8ae1..e8a2bc3 100644\n--- a/lib/meta_commit/changelog/commands/commit_diff_examiner.rb\n+++ b/lib/meta_commit/changelog/commands/commit_diff_examiner.rb\n@@ -8,6 +8,7 @@ module MetaCommit::Changelog\n         @parse_command = parse_command\n         @ast_path_factory = ast_path_factory\n         @diff_factory = diff_factory\n+        @some_property = 2 + 2\n       end\n \n \n@@ -16,7 +17,7 @@ module MetaCommit::Changelog\n       # @param [String] left_commit commit id\n       # @param [String] right_commit commit id\n       # @return [Array\u003cMetaCommit::Contracts::Diff\u003e]\n-      def meta(repo, left_commit, right_commit)\n+      def examine_meta(repo, left_commit, right_commit)\n         diffs = []\n         commit_id_old = left_commit.oid\n+      def examine_meta(repo, left_commit, right_commit)\n         diffs = []\n         commit_id_old = left_commit.oid\n         commit_id_new = right_commit.oid\n@@ -53,6 +54,10 @@ module MetaCommit::Changelog\n         end\n         diffs\n       end\n+\n+      def examine\n+        'method to test'\n+      end\n     end\n   end\n end\n\n\n\u003e dev/my_projects/meta_commit meta_commit message  \n- changes in method initialize \n- changes in CommitDiffExaminer#examine_meta \n- changes in method examine \n```\n\n### Index\n\n    meta_commit index [--directory=$(pwd)]\n\nIndex command walks over the repository commits and writes meta information to storage.\nCurrently the only supported storage adapter is git notes.\nSo after execution of index command the new git notes will be added to your repository, you will be able to see them using standard `git log` command. \n\nExample :\n\n```zsh\n\u003e /repository_folder git log\n\ncommit 1a8ba80e79e7c96fc06d3daf35bbad31cdaab5a4\nAuthor: Stanislav Dobrovolskiy \u003cstasdobrovolskiy@gmail.com\u003e\nDate:   Sat Mar 3 02:44:12 2018 +0100\n\n    `init` command implementation #9\n    - remove default config usage #9\n\ncommit 352b0b3734cc8a940f2133ac73720fc7728e59e7\nAuthor: Stanislav Dobrovolskiy \u003cstasdobrovolskiy@gmail.com\u003e\nDate:   Sun Feb 25 22:15:52 2018 +0100\n\n    replace double quotes from note body\n\n\n\u003e /repository_folder meta_commit index\nrepository successfully indexed\n\u003e /repository_folder git log\n\ncommit 1a8ba80e79e7c96fc06d3daf35bbad31cdaab5a4\nAuthor: Stanislav Dobrovolskiy \u003cstasdobrovolskiy@gmail.com\u003e\nDate:   Sat Mar 3 02:44:12 2018 +0100\n\n    `init` command implementation #9\n    - remove default config usage #9\n\nNotes:\n     - changes in method fixture_configuration_file\n     - changes in method init\n     - changes in method boot_container_with_config\n     - change initialization of Errors::MissingConfigError\n\ncommit 352b0b3734cc8a940f2133ac73720fc7728e59e7\nAuthor: Stanislav Dobrovolskiy \u003cstasdobrovolskiy@gmail.com\u003e\nDate:   Sun Feb 25 22:15:52 2018 +0100\n\n    replace double quotes from note body\n\nNotes:\n     - changes in GitNotes#write_to_notes\n     - changes in method write_to_notes\n```\n\n### Changelog\n\n    meta_commit changelog [--from-tag] [--to-tag] [--directory=$(pwd)] [--filename='CHANGELOG.md'] \n\nThis command walks over commits between ``` from ``` tag and ``` to ``` tag, examine changes and write them to changelog file\n\nExample :\n\n```zsh\n\n\u003e /repository_folder meta_commit changelog v0.2.0 v0.3.0\nadded version [v0.3.0] to CHANGELOG.md\n\n\u003e /repository_folder cat CHANGELOG.md\n...\n\n## [v0.3.0] - 2018-03-03\n### Added\n- add Maintainability\n- create class SomeServiceNEWNAME\n- Configuration,DataObject added to SomeModule\n- changes in method meta\n- changes in method init\n- changes in method version\n- changes in method boot_container_with_config\n- changes in method load_builtin_extension\n- changes in method create_contextual_node\n- changes in method collect_path_to_ast_at_line\n- changes in method lines?\n- changes in method covers_line?\n- changes in method create_diff\n- changes in method change_context\n- changes in method organize_lines\n- changes in method write_to_notes\n- changes in method examine_diff\n- changes in method index_meta\n- changes in method compute_column\n### Changed\n- change README.md\n- change Inline docs\n- changes in CommitDiffExaminer#meta\n- change initialization of Errors::MissingConfigError\n- changes in ContextualAstNodeFactory#create_contextual_node\n- changes in ContextualAstNodeFactory#covers_line?\n- changes in DiffFactory#create_diff\n- changes in GitNotes#write_to_notes\n- changes in DiffExaminer#examine_diff\n- changes in DiffIndexExaminer#index_meta\n### Removed\n- changes in method meta\n- changes in method boot_container_with_config\n- changes in method create_ast_path\n- changes in method get_ast_at_line\n- changes in method covers_line\n- changes in method examine_diff\n- changes in method index_meta\n- remove module Models\n\n...\n\n```\n\n\n##  Extensions\n\nExtensions are very important part of meta_commit utility, they are used to parse source files and see difference between commits.\nIdea is that each extension should add new capabilities and knowledge on how to work with the new file extensions.\nWithout extensions the meta_commit is just a script which traverses git repository and read files.\n\n[Here](https://github.com/usernam3/meta_commit/blob/master/CONTRIBUTING.md#creating-new-extension) you can get more information about how to create new extension. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusernam3%2Fmeta_commit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusernam3%2Fmeta_commit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusernam3%2Fmeta_commit/lists"}