{"id":15690112,"url":"https://github.com/jamiemason/logservable","last_synced_at":"2025-05-07T23:22:54.394Z","repository":{"id":66237135,"uuid":"63795036","full_name":"JamieMason/logservable","owner":"JamieMason","description":"git log as an observable stream of JSON","archived":false,"fork":false,"pushed_at":"2019-11-02T03:33:02.000Z","size":93,"stargazers_count":8,"open_issues_count":6,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-28T16:54:56.575Z","etag":null,"topics":["git","git-log","github","gitlab","observable","observables","reactive-streams","rxjs"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/logservable","language":"TypeScript","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/JamieMason.png","metadata":{"files":{"readme":".github/README_CONTENT.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"open_collective":"fold_left","custom":["https://www.paypal.me/foldleft"]}},"created_at":"2016-07-20T16:01:39.000Z","updated_at":"2024-09-02T22:53:26.000Z","dependencies_parsed_at":"2023-02-20T16:32:01.058Z","dependency_job_id":null,"html_url":"https://github.com/JamieMason/logservable","commit_stats":{"total_commits":35,"total_committers":3,"mean_commits":"11.666666666666666","dds":0.05714285714285716,"last_synced_commit":"5fadfdfeffc785be4f5fe6094e1fa825193b0d24"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamieMason%2Flogservable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamieMason%2Flogservable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamieMason%2Flogservable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JamieMason%2Flogservable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JamieMason","download_url":"https://codeload.github.com/JamieMason/logservable/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252969055,"owners_count":21833403,"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":["git","git-log","github","gitlab","observable","observables","reactive-streams","rxjs"],"created_at":"2024-10-03T18:07:34.139Z","updated_at":"2025-05-07T23:22:54.387Z","avatar_url":"https://github.com/JamieMason.png","language":"TypeScript","readme":"## 🌩 Installation\n\n```\nnpm install --save logservable\n```\n\n## 📝 API\n\n### `logservable.commits`\n\n`logservable.commits` returns an [RxJS Observable][observable] which takes an [RxJS Observer][observer];\n\n```js\nimport { commits } from 'logservable';\nimport { take } from 'rxjs/operators';\n\nconst commit$ = commits('/Users/foldleft/Dev/my-project', {\n  fieldNames: ['authorDateRelative', 'authorName', 'commitHash'],\n  oldestFirst: false\n});\n\ncommit$.pipe(take(3)).subscribe({\n  next(commit) {\n    console.log('%s committed %s %s', commit.authorName, commit.commitHash, commit.authorDateRelative);\n  },\n  error(err) {\n    console.error('The Stream gave me an error: ', err);\n  },\n  complete() {\n    console.log('The Stream told me it is done.');\n  }\n});\n```\n\nOur example would produce;\n\n```\nGuybrush Threepwood committed ad7b84e54c62809c7d46b9bb77087a007d1967b5 2 hours ago\nElaine Marley committed 12c1cde06cdca28d9b41c9cdf667b3e4ff894ca1 2 hours ago\nHerman Toothrot committed 60121fda22cd43a04716c8a76fa803bf1a81e217 6 hours ago\nThe Stream told me it is done.\n```\n\n#### Arguments\n\n##### `directory:String`\n\nAbsolute path to your locally cloned git repository.\n\n##### `options.fieldNames:String[]`\n\nOptional array of strings representing the data required from each git commit (defaults to all).\n\n```\nauthorDate\nauthorDateRelative\nauthorEmail\nauthorName\nbody\ncommitHash\ncommitNotes\ncommitterDate\ncommitterDateRelative\ncommitterEmail\ncommitterName\nparentHashes\nreflogIdentityEmail\nreflogIdentityName\nreflogSelector\nreflogSubject\nsanitizedSubjectLine\nsubject\ntreeHash\n```\n\nFor more information see the [Git Pretty Formats Documentation](https://git-scm.com/docs/pretty-formats).\n\n##### `options.oldestFirst:Boolean`\n\nWhether to read the commits in order of oldest to newest (defaults to false).\n\n##### `options.skipMergeCommits:Boolean`\n\nWhether to exclude merge commits from being returned (defaults to true).\n\n### `logservable.tags`\n\n`logservable.tags` returns an [RxJS Observable][observable] which takes an [RxJS Observer][observer];\n\n```js\nimport { tags } from 'logservable';\nimport { take } from 'rxjs/operators';\n\nconst tag$ = tags('/Users/foldleft/Dev/my-project');\n\ntag$.pipe(take(3)).subscribe({\n  next(tag) {\n    console.log('commit %s is tagged as %s', tag.commitHash, tag.tagName);\n  },\n  error(err) {\n    console.error('The Stream gave me an error: ', err);\n  },\n  complete() {\n    console.log('The Stream told me it is done.');\n  }\n});\n```\n\nOur example would produce;\n\n```\ncommit 11eb97230097883288ae565dda7d78b467d8d991 is tagged as 0.1.0\ncommit 4b106112ac52c81196e53a4b81cc3543b4aa42c6 is tagged as 0.2.0\ncommit 5f6ee8821fbebd01d0910125698afb495c36509c is tagged as 0.3.0\nThe Stream told me it is done.\n```\n\n#### Arguments\n\n##### `directory:String`\n\nAbsolute path to your locally cloned git repository.\n\n\u003c!-- links --\u003e\n\n[observable]: http://reactivex.io/rxjs/class/es6/Observable.js~Observable.html\n[observer]: http://reactivex.io/rxjs/class/es6/MiscJSDoc.js~ObserverDoc.html\n","funding_links":["https://opencollective.com/fold_left","https://www.paypal.me/foldleft"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamiemason%2Flogservable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamiemason%2Flogservable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamiemason%2Flogservable/lists"}