{"id":13993835,"url":"https://github.com/mattduck/gh2md","last_synced_at":"2025-05-15T12:03:02.569Z","repository":{"id":41258206,"uuid":"91907388","full_name":"mattduck/gh2md","owner":"mattduck","description":"Export Github repository issues, pull requests and comments to markdown.","archived":false,"fork":false,"pushed_at":"2025-05-01T01:01:22.000Z","size":249,"stargazers_count":273,"open_issues_count":11,"forks_count":46,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-01T02:19:07.203Z","etag":null,"topics":["github","github-export","github-issues","github-issues-export","github-markdown"],"latest_commit_sha":null,"homepage":"","language":"Python","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/mattduck.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":null,"funding":null,"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,"zenodo":null}},"created_at":"2017-05-20T18:08:03.000Z","updated_at":"2025-05-01T01:01:25.000Z","dependencies_parsed_at":"2023-02-15T13:31:13.636Z","dependency_job_id":"caae3f53-3615-4feb-b100-e2ff2848ebad","html_url":"https://github.com/mattduck/gh2md","commit_stats":{"total_commits":201,"total_committers":8,"mean_commits":25.125,"dds":0.4925373134328358,"last_synced_commit":"e7c0bf4c3f2e4a5f90832647a07038504946ce09"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattduck%2Fgh2md","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattduck%2Fgh2md/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattduck%2Fgh2md/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattduck%2Fgh2md/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattduck","download_url":"https://codeload.github.com/mattduck/gh2md/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254337612,"owners_count":22054253,"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":["github","github-export","github-issues","github-issues-export","github-markdown"],"created_at":"2024-08-09T14:02:34.757Z","updated_at":"2025-05-15T12:03:02.541Z","avatar_url":"https://github.com/mattduck.png","language":"Python","readme":"gh2md\n=====\n\n|PyPI|\n\nExport issues and pull requests for a Github repository to a readable markdown\nfile. You can either create a single file for the repo, or a directory with one\nfile per issue. See usage instructions for how to filter by issue type and state.\n\nThere are various other projects that handle Github issue exports\n(Eg. `offline-issues \u003chttps://github.com/jlord/offline-issues\u003e`_), but I\ncouldn't find one that writes all issues, comments and metadata to a single\nreadable file.\n\n\nExample exports\n---------------\n\n- Basic export in `examples directory \u003cexamples/sshrc.md\u003e`_.\n- `example directory with one issue per file \u003cexamples/gh2md-multiple-files-example\u003e`_\n- gh2md's `own issues in a single file \u003c./issues.md\u003e`_.\n\nDefault behaviour is to export all issues and PRs.\n\n\nUsage\n-----\n\nRun export for ``paulirish/git-open``, pulling token from environment, and excluding closed PRs:::\n\n    export GITHUB_ACCESS_TOKEN=myAPItoken\n    gh2md paulirish/git-open git-open.md --no-closed-prs\n\n\nRun export for ``shezadkhan137/required``, pulling token from file, and excluding closed issues:::\n\n    echo myAPItoken \u003e ~/.config/gh2md/token\n    gh2md shezadkhan137/required required.md --no-closed-issues\n\nRun export for public repository ``sarabander/sicp``, using no authentication and one file per issue:::\n\n    gh2md sarabander/sicp sicp-issues --multiple-files --no-closed-prs\n\nFull help::\n\n    usage: gh2md [-h] [--multiple-files] [-I] [--no-prs] [--no-closed-prs]\n                [--no-issues] [--no-closed-issues]\n                [--file-extension FILE_EXTENSION]\n                repo output_path\n\n    Export Github repository issues, pull requests and comments to markdown files:\n    https://github.com/mattduck/gh2md\n\n    Example: gh2md mattduck/gh2md my_issues.md\n\n    Credentials are resolved in the following order:\n\n    - A `GITHUB_ACCESS_TOKEN` environment variable.\n    - An API token stored in ~/.config/gh2md/token or ~/.github-token.\n\n    To access private repositories, you'll need a token with the full \"repo\" oauth\n    scope.\n\n    By default, all issues and pull requests will be fetched. You can disable these\n    using the --no... flags, eg. --no-closed-prs, or --no-prs.\n\n    positional arguments:\n    repo                  Github repo to export, in format \"owner/repo_name\".\n    output_path           Path to write exported issues.\n\n    optional arguments:\n    -h, --help            show this help message and exit\n    --multiple-files      Instead of one file, treat the given path as a\n                            directory, and create one file per issue, using a\n                            format '{created_at}.{issue_number}.{issue_type}.{issu\n                            e_state}{file_extension}'.\n    -I, --idempotent      Remove non-deterministic values like timestamps. Two\n                            runs of gh2md will always produce the same result, as\n                            long as the Github data has not changed.\n    --no-prs              Don't include pull requests in the export.\n    --no-closed-prs       Don't include closed pull requests in the export.\n    --no-issues           Don't include issues in the export.\n    --no-closed-issues    Don't include closed issues in the export.\n    --file-extension FILE_EXTENSION\n                            File extension for output files. Default is '.md'.\n\n\nInstall\n-------\n\n``pip install gh2md``. Alternatively, clone the repository and run ``make install``.\n\n\nAuthentication\n---------------\n\n``gh2md`` requires a Github access token to authenticate requests. To read your\nprivate repositories, you'll need to provide a personal access token with the\nfull **repo** oauth scope.\n\n**It's not possible to authenticate with a username and password**. Github used\nto support this, but it was discontinued in 2020.\n\n\nGithub workflow: backup issues as a markdown file in your repo\n--------------------------------------------------------------\n\n`@0ut0fcontrol \u003chttps://github.com/0ut0fcontrol\u003e`_ contributed a github workflow\nthat uses ``gh2md`` to run a nightly export to ``issues.md``, and push it back to\nyour repo. You can find the thread and workflow code `here\n\u003chttps://github.com/mattduck/gh2md/issues/11\u003e`_.\n\nThis has been added to the ``gh2md`` repo itself, so you can see an up-to-date\nexport in `issues.md \u003c./issues.md\u003e`_.\n\n\n.. |PyPI| image:: https://img.shields.io/pypi/v/gh2md.svg\n   :target: https://pypi.python.org/pypi/gh2md\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattduck%2Fgh2md","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattduck%2Fgh2md","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattduck%2Fgh2md/lists"}