{"id":15354640,"url":"https://github.com/kikuomax/link-commit-hash","last_synced_at":"2026-05-05T12:33:39.156Z","repository":{"id":85897039,"uuid":"381770958","full_name":"kikuomax/link-commit-hash","owner":"kikuomax","description":"Replaces commit hashes with GitHub commit page links","archived":false,"fork":false,"pushed_at":"2024-01-10T04:36:27.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T14:53:13.008Z","etag":null,"topics":["commit","github","hash","markdown"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kikuomax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2021-06-30T16:43:38.000Z","updated_at":"2024-01-10T04:36:22.000Z","dependencies_parsed_at":"2024-12-06T09:42:22.425Z","dependency_job_id":"b92517c8-a754-45d8-b613-08c5295eb1c5","html_url":"https://github.com/kikuomax/link-commit-hash","commit_stats":{"total_commits":3,"total_committers":2,"mean_commits":1.5,"dds":"0.33333333333333337","last_synced_commit":"e656b720935848f2ea7e17011b0906989083ee2f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kikuomax/link-commit-hash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kikuomax%2Flink-commit-hash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kikuomax%2Flink-commit-hash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kikuomax%2Flink-commit-hash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kikuomax%2Flink-commit-hash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kikuomax","download_url":"https://codeload.github.com/kikuomax/link-commit-hash/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kikuomax%2Flink-commit-hash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32649583,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"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":["commit","github","hash","markdown"],"created_at":"2024-10-01T12:20:16.296Z","updated_at":"2026-05-05T12:33:39.128Z","avatar_url":"https://github.com/kikuomax.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# link-commit-hash\n\nA simple Python script that replaces commit hashes and issue numbers in a markdown file with a link to the corresponding GitHub commit and issue pages respectively.\n\n## Prerequisites\n\nPython 3.7 or later.\n\n## How to use\n\nRunning `python link-commit-hash.py -h` will print something similar to the following,\n\n```\nusage: link-commit-hash.py [-h] --owner OWNER --project PROJECT MARKDOWN\n\nReplaces Git commit hashes and issue numbers with markdown links\n\npositional arguments:\n  MARKDOWN           path to a markdown file to process\n\noptions:\n  -h, --help         show this help message and exit\n  --owner OWNER      owner of the repository (required)\n  --project PROJECT  project name of the repository (required)\n```\n\n[`link-commit-hash.py`](./link-commit-hash.py) replaces every occurrence of a full SHA-1 hash, like `#0123456789abcdef0123456789ABCDEF01234567`, in a given markdown file (`MARKDOWN`) with a link to the corresponding GitHub commit page in a given project (`PROJECT`) of a given owner (`OWNER`), and writes results to the standard output.\nIt also replaces every occurrence of an issue number, like `#123`, with a link to the corresponding GitHub issue page.\n\n## Example\n\nGiven a markdown file ([`sample.md`](./sample.md)),\n\n```md\nThe initial commit: #f1433174bc39fa37e7179d6aecfac420d415f34c.\n\nIssues:\n- The first: #1\n- The second: #2\n```\n\nThe following command,\n\n```sh\npython link-commit-hash.py --owner kikuomax --project link-commit-hash sample.md\n```\n\nWill produce the following [output](./sample-after.md),\n\n```md\nThe initial commit: [#f1433174bc39fa37e7179d6aecfac420d415f34c](https://github.com/kikuomax/link-commit-hash/commit/f1433174bc39fa37e7179d6aecfac420d415f34c).\n\nIssues:\n- The first: [#1](https://github.com/kikuomax/link-commit-hash/issues/1)\n- The second: [#2](https://github.com/kikuomax/link-commit-hash/issues/2)\n```\n\n## Development\n\n### Testing\n\nMake sure that the following commands exit with 0 (success with no differences):\n\n1. Make sure conversion succeeds:\n\n    ```sh\n    python link-commit-hash.py \\\n      --owner kikuomax \\\n      --project link-commit-hash \\\n      sample.md | diff - sample-after.md\n    ```\n\n2. Make sure already converted links are not converted:\n\n    ```sh\n    python link-commit-hash.py \\\n      --owner kikuomax \\\n      --project link-commit-hash \\\n      sample-after.md | diff - sample-after.md\n    ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkikuomax%2Flink-commit-hash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkikuomax%2Flink-commit-hash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkikuomax%2Flink-commit-hash/lists"}