git-log-to-elasticsearch

Usage

Make sure crystal is installed (tested with Crystal 1.0.0)

shards update --ignore-crystal-version
shards build --production --release
# this only imports the main branch
./bin/git-log-to-elasticsearch -v -b '^origin/main$' \
  -n 'org/my-repo-name' v ~/path/to/repo

Possible arguments:

Sample run to index only the master branch data of my local Elasticsearch repo in one of my Elastic Cloud clusters

./bin/git-log-to-elasticsearch -b '^origin/master$' -n 'elastic/elasticsearch' \
  --host https://my-cloud-cluster.es.europe-west3.gcp.cloud.es.io:9243 \
  -u elastic:$PASS ~/devel/elasticsearch/

This takes a couple of minutes. I have not yet taken the time to parallelize this using fibers and multi threading. Feel free to send a PR.

Contributing

  1. Fork it (https://github.com/spinscale/git-log-to-elasticsearch/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors