{"id":15497294,"url":"https://github.com/jwerle/glq","last_synced_at":"2025-07-01T04:08:43.538Z","repository":{"id":18737447,"uuid":"21949122","full_name":"jwerle/glq","owner":"jwerle","description":"Git log message queue","archived":false,"fork":false,"pushed_at":"2014-07-17T19:40:35.000Z","size":148,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-03T22:22:14.816Z","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":"gitana/alpaca","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jwerle.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}},"created_at":"2014-07-17T16:23:16.000Z","updated_at":"2014-08-02T17:21:22.000Z","dependencies_parsed_at":"2022-09-25T02:11:06.616Z","dependency_job_id":null,"html_url":"https://github.com/jwerle/glq","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jwerle/glq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwerle%2Fglq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwerle%2Fglq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwerle%2Fglq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwerle%2Fglq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jwerle","download_url":"https://codeload.github.com/jwerle/glq/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwerle%2Fglq/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262893664,"owners_count":23380712,"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-02T08:32:37.996Z","updated_at":"2025-07-01T04:08:43.505Z","avatar_url":"https://github.com/jwerle.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"glq\n===\n\nGit log message queue\n\n## install\n\n```sh\n$ npm install glq\n```\n\n## usage\n\n### module\n\nPush updates commits to a host. Initial push will send all\nparsed commits. It will push commits in realtime as they are created\nin the desired repo. It uses [watch](https://github.com/mikeal/watch)\nand [git-log](https://github.com/juliangruber/git-log) internally.\n\n*client:*\n\n```js\nvar push = require('glq/push')\n\npush('/path/to/repo', '127.0.0.1:7777')\n.on('commit', function (commit) {\n  console.log(\"commit(%s) %j\", commit.hash, commit);\n});\n```\n\n*server*:\n\n```js\nvar pull = require('glq/pull');\n\npull(7777)\n.on('commit', function (commit) {\n  console.log(\"commit(%s) %j\", commit.hash, commit);\n});\n```\n\n#### plugins\n\n`push` and `pull` both return objects that expose a `use()` function\nthat allows you to \"use\" a function as middleware when data is receievd.\nWe can write a simple plugin that emails the author when a commit is\nmade and another that logs output nicely to the terminal using\n[component-consoler](https://github.com/component/console.js)\n\n```js\nvar push = require('glq/push');\nvar Email = require('email').Email;\nvar logger = require('component-consoler');\n\npush('/path/to/repo', '127.0.0.1:7777')\n.use(email({from: 'git@kinkajou.com'}))\n.use(log());\n\nfunction email (opts, fn) {\n  opts = opts || {};\n  fn = fn || function () {};\n  return function (commit, next) {\n    var msg = new Email({\n      to: opts.to,\n      from: opts.from || opts.to,\n      subject: (\n        opts.subject ||\n        sprintf(\"git: (%s) %s\", commit.hash, commit.message)\n      ),\n      body: JSON.stringify(commit)\n    });\n\n    msg.send(next);\n  };\n}\n\nfunction log () {\n  return function (commit, next) {\n    logger.log('hash', commit.hash);\n    logger.log('date', String(commit.date));\n    logger.log('name', commit.author.name);\n    logger.log('email', commit.author.email)\n    logger.log('message', commit.message);\n    next();\n  };\n}\n```\n\n### command line\n\n```sh\nusage: glq [-hV]\n   or: glq push \u003caddr\u003e\n   or: glq push \u003crepo\u003e \u003caddr\u003e\n   or: glq pull \u003caddr\u003e\n```\n\nPush current working directory (`pwd`) commits in realtime to `addr`:\n\n```sh\n$ glq push 127.0.0.1:7777\n```\n\nPush `/path/to/repo` commits in realtime to `addr`:\n\n```sh\n$ glq push /path/to/repo 127.0.0.1:7777\n```\n\nPull commits in realtime from a given `addr`:\n\n```sh\n$ glq pull 127.0.0.1:7777\n```\n\n## license\n\nMIT\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwerle%2Fglq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwerle%2Fglq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwerle%2Fglq/lists"}