{"id":44120706,"url":"https://github.com/ethos-link/git-markdown","last_synced_at":"2026-04-21T23:05:14.461Z","repository":{"id":337272740,"uuid":"1152126588","full_name":"ethos-link/git-markdown","owner":"ethos-link","description":"Convert GitHub pull requests into a single Markdown file for offline review and local AI workflows.","archived":false,"fork":false,"pushed_at":"2026-03-20T15:25:33.000Z","size":129,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-02T02:11:59.626Z","etag":null,"topics":["ai","ai-agents","ai-code-review","ai-code-reviewer","artificial-intelligence","code-review","coding-assistant","devtools","generative-ai","github-actions","llm","pull-request","pull-requests"],"latest_commit_sha":null,"homepage":"https://www.ethos-link.com/opensource/git-markdown","language":"Ruby","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/ethos-link.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"custom":["https://www.ethos-link.com/","https://www.reviato.com/"]}},"created_at":"2026-02-07T12:03:54.000Z","updated_at":"2026-03-20T15:25:34.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ethos-link/git-markdown","commit_stats":null,"previous_names":["ethos-link/git-markdown"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/ethos-link/git-markdown","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethos-link%2Fgit-markdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethos-link%2Fgit-markdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethos-link%2Fgit-markdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethos-link%2Fgit-markdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ethos-link","download_url":"https://codeload.github.com/ethos-link/git-markdown/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethos-link%2Fgit-markdown/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32112062,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T11:25:29.218Z","status":"ssl_error","status_checked_at":"2026-04-21T11:25:28.499Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["ai","ai-agents","ai-code-review","ai-code-reviewer","artificial-intelligence","code-review","coding-assistant","devtools","generative-ai","github-actions","llm","pull-request","pull-requests"],"created_at":"2026-02-08T19:22:50.410Z","updated_at":"2026-04-21T23:05:14.456Z","avatar_url":"https://github.com/ethos-link.png","language":"Ruby","funding_links":["https://www.ethos-link.com/","https://www.reviato.com/"],"categories":[],"sub_categories":[],"readme":"# git-markdown\n\n[![Gem Version](https://badge.fury.io/rb/git-markdown.svg)](https://badge.fury.io/rb/git-markdown)\n[![Ruby](https://github.com/ethos-link/git-markdown/actions/workflows/ruby.yml/badge.svg)](https://github.com/ethos-link/git-markdown/actions/workflows/ruby.yml)\n\nConvert GitHub pull requests into a single Markdown file you can review locally. Useful for offline or local AI review workflows with tools like [opencode](https://opencode.ai), GitHub Copilot CLI, and your own scripts.\n\n## Features\n\n- 🔐 Zero-config auth: uses your existing GitHub credentials\n- 🧾 Clean output: PR details, threads, and summaries in readable Markdown\n- 🧰 Practical controls: filter by status, write to file or stdout, debug when needed\n- 🏢 GitHub Enterprise support, plus safe local credential storage (XDG-style, tight perms)\n\n## Install\n\n```bash\ngem install git-markdown\n```\n\n## Quick start\n\n### 1) Setup (optional)\n\n```bash\ngit-markdown setup\n```\n\n### 2) Export a PR\n\nFrom inside a git repository:\n\n```bash\ngit-markdown pr 123\n```\n\nOr specify the repo:\n\n```bash\ngit-markdown pr owner/repo#123\n```\n\nIt saves `PR-{number}-{title}.md` in the current directory by default.\n\n## Usage\n\n```bash\n# Export PR from current repository\ngit-markdown pr 123\n\n# Export PR from a specific repository\ngit-markdown pr owner/repo#123\n\n# Output to stdout (useful for piping)\ngit-markdown pr 123 --stdout | pbcopy  # macOS; on Linux use `xclip`/`wl-copy` or redirect to a file\n\n# Save to a directory\ngit-markdown pr 123 --output ./reviews/\n\n# Filter comment threads (default: unresolved)\ngit-markdown pr 123 --status=unresolved\ngit-markdown pr 123 --status=resolved\ngit-markdown pr 123 --status=all\n\n# Debug output\ngit-markdown pr 123 --debug\n\n# Show version\ngit-markdown version\n```\n\n## Authentication\n\n`git-markdown` looks for a GitHub token in this order:\n\n1. `GITHUB_TOKEN` or `GH_TOKEN` environment variables\n2. Git credential store (`git credential fill`)\n3. GitHub CLI (`gh auth token`)\n4. Token saved by `git-markdown setup`\n\nIf you see a prompt for a GitHub username or an askpass error, set `GITHUB_TOKEN` or `GH_TOKEN` in your environment to skip git credential prompts.\n\n## GitHub Enterprise\n\nSet your API URL:\n\n```bash\nexport GITHUB_API_URL=https://github.yourcompany.com/api/v3\ngit-markdown pr owner/repo#123\n```\n\n## Output\n\nThe generated Markdown includes:\n\n- PR metadata (title, author, status, created date)\n- PR description (full body)\n- Review comments grouped by file with line numbers\n- General discussion comments\n- Review summaries (approvals, change requests)\n\nThreads marked with `[resolved]` or `[done]` are filtered out by default. Use `--status=all` to include them.\n\n## Configuration\n\nConfig is stored under `~/.config/git-markdown/`:\n\n- `config.yml` for settings (provider, API URL, defaults)\n- `credentials` for the token (permissions: 0600)\n\n## Requirements\n\n- Ruby 3.0+\n- Git (for remote detection)\n- GitHub Personal Access Token with `repo` scope\n\n## Development\n\n```bash\ngit clone https://github.com/ethos-link/git-markdown.git\ncd git-markdown\n\nbundle install\nbundle exec rake test\nbundle exec standardrb\nbundle exec rake\n```\n\nNote: `Gemfile.lock` is intentionally not tracked to avoid conflicts across Ruby versions.\n\n### Git hooks\n\nWe use [lefthook](https://lefthook.dev/) with the Ruby [commitlint](https://github.com/arandilopez/commitlint) gem to enforce Conventional Commits on every commit. We also use [Standard Ruby](https://standardrb.com/) to keep code style consistent. CI validates commit messages, Standard Ruby, tests, and git-cliff changelog generation on pull requests and pushes to main/master.\n\nRun the hook installer once per clone:\n\n```bash\nbundle exec lefthook install\n```\n\n### Install locally\n\n```bash\nrake install\n```\n\n## Release\n\nReleases are tag-driven and published by GitHub Actions to RubyGems. Local release commands never publish directly.\n\nInstall [git-cliff](https://git-cliff.org/) locally before preparing a release. The release task regenerates `CHANGELOG.md` from Conventional Commits.\n\nBefore preparing a release, make sure you are on `main` or `master` with a clean worktree.\n\nThen run one of:\n\n```bash\nbundle exec rake 'release:prepare[patch]'\nbundle exec rake 'release:prepare[minor]'\nbundle exec rake 'release:prepare[major]'\nbundle exec rake 'release:prepare[0.1.0]'\n```\n\nThe task will:\n\n1. Regenerate `CHANGELOG.md` with `git-cliff`.\n1. Update `lib/git/markdown/version.rb`.\n1. Commit the release changes.\n1. Create and push the `vX.Y.Z` tag.\n\nThe `Release` workflow then runs tests, publishes the gem to RubyGems, and creates the GitHub release from the changelog entry.\n\n## Contributing\n\n1. Fork it\n2. Create a branch (`git checkout -b feature/my-feature`)\n3. Commit your changes\n4. Push (`git push origin feature/my-feature`)\n5. Open a Pull Request\n\nPlease use [Conventional Commits](https://www.conventionalcommits.org/) for commit messages.\n\n## Roadmap\n\n- [ ] GitLab Merge Request support (`git-markdown mr`)\n- [ ] GitLab and GitHub Issue support (`git-markdown issue`)\n- [ ] Custom templates\n- [ ] Optional diff in output\n\n## References\n\n- GitHub REST API docs: [docs.github.com/en/rest](https://docs.github.com/en/rest)\n- GitHub CLI auth token: [cli.github.com/manual/gh_auth_token](https://cli.github.com/manual/gh_auth_token)\n- Git credential interface: [git-scm.com/docs/git-credential](https://git-scm.com/docs/git-credential)\n- XDG Base Directory spec: [specifications.freedesktop.org/basedir-spec](https://specifications.freedesktop.org/basedir-spec/latest/)\n- RubyGems: [rubygems.org/gems/git-markdown](https://rubygems.org/)\n\n## License\n\nMIT License, see [LICENSE.txt](LICENSE.txt)\n\n## About\n\nMade by the team at [Ethos Link](https://www.ethos-link.com) — practical software for growing businesses. We build tools for hospitality operators who need clear workflows, fast onboarding, and real human support.\n\nWe also build [Reviato](https://www.reviato.com), “Capture. Interpret. Act.”.\nTurn guest feedback into clear next steps for your team. Collect private appraisals, spot patterns across reviews, and act before small issues turn into public ones.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethos-link%2Fgit-markdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethos-link%2Fgit-markdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethos-link%2Fgit-markdown/lists"}