{"id":13898123,"url":"https://github.com/gr2m/octokit-plugin-search-and-replace-pull-request","last_synced_at":"2025-04-22T11:27:32.378Z","repository":{"id":38175032,"uuid":"272306047","full_name":"gr2m/octokit-plugin-search-and-replace-pull-request","owner":"gr2m","description":"Octokit plugin to replace a term across all repository files via a pull request","archived":false,"fork":false,"pushed_at":"2024-06-18T05:24:15.000Z","size":683,"stargazers_count":4,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-19T12:11:54.960Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/gr2m.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":"gr2m"}},"created_at":"2020-06-15T00:19:53.000Z","updated_at":"2025-02-27T07:44:26.000Z","dependencies_parsed_at":"2023-12-24T16:02:07.419Z","dependency_job_id":"bc336719-0e79-4d4e-ae52-bf11cdcad90e","html_url":"https://github.com/gr2m/octokit-plugin-search-and-replace-pull-request","commit_stats":{"total_commits":47,"total_committers":3,"mean_commits":"15.666666666666666","dds":0.2978723404255319,"last_synced_commit":"1ca99509949410c4ae068f12e0b717047f7b6f5b"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Foctokit-plugin-search-and-replace-pull-request","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Foctokit-plugin-search-and-replace-pull-request/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Foctokit-plugin-search-and-replace-pull-request/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Foctokit-plugin-search-and-replace-pull-request/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gr2m","download_url":"https://codeload.github.com/gr2m/octokit-plugin-search-and-replace-pull-request/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250230863,"owners_count":21396373,"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-08-06T18:04:05.731Z","updated_at":"2025-04-22T11:27:32.348Z","avatar_url":"https://github.com/gr2m.png","language":"TypeScript","funding_links":["https://github.com/sponsors/gr2m"],"categories":["TypeScript"],"sub_categories":[],"readme":"# octokit-plugin-search-and-replace-pull-request\n\n\u003e Octokit plugin to replace a term across all repository files via a pull request\n\n[![@latest](https://img.shields.io/npm/v/octokit-plugin-search-and-replace-pull-request.svg)](https://www.npmjs.com/package/octokit-plugin-search-and-replace-pull-request)\n[![Build Status](https://github.com/gr2m/octokit-plugin-search-and-replace-pull-request/workflows/Test/badge.svg)](https://github.com/gr2m/octokit-plugin-search-and-replace-pull-request/actions?query=workflow%3ATest+branch%3Amain)\n[![Dependabot Status](https://api.dependabot.com/badges/status?host=github\u0026repo=gr2m/octokit-plugin-search-and-replace-pull-request)](https://dependabot.com/)\n\n## Usage\n\n\u003ctable\u003e\n\u003ctbody valign=top align=left\u003e\n\u003ctr\u003e\u003cth\u003e\n\nBrowsers\n\n\u003c/th\u003e\u003ctd width=100%\u003e\n\nLoad `octokit-plugin-search-and-replace-pull-request` and [`@octokit/core`](https://github.com/octokit/core.js) (or core-compatible module) directly from [cdn.pika.dev](https://cdn.pika.dev)\n\n```html\n\u003cscript type=\"module\"\u003e\n  import { Octokit } from \"https://cdn.pika.dev/@octokit/core\";\n  import { searchAndReplacePullRequest } from \"https://cdn.pika.dev/octokit-plugin-search-and-replace-pull-request\";\n\u003c/script\u003e\n```\n\n\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003cth\u003e\n\nNode\n\n\u003c/th\u003e\u003ctd\u003e\n\nInstall with `npm install @octokit/core octokit-plugin-search-and-replace-pull-request`. Optionally replace `@octokit/core` with a compatible module\n\n```js\nconst { Octokit } = require(\"@octokit/core\");\nconst {\n  searchAndReplacePullRequest,\n} = require(\"octokit-plugin-search-and-replace-pull-request\");\n```\n\n\u003c/td\u003e\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n```js\noctokit.createSearchAndReplacePullRequest({\n  owner: \"octocat\",\n  repo: \"hello-world\",\n  title: \"pull request title\",\n  body: \"pull request description\",\n  base: \"master\" /* optional: defaults to default branch */,\n  head: \"rename-master-to-main\",\n  terms: [\n    {\n      search: \"master\",\n      replace: \"main\",\n    },\n  ],\n});\n```\n\nOne commit is created for every term. If there are no matches at all, an empty commit is created.\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md)\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgr2m%2Foctokit-plugin-search-and-replace-pull-request","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgr2m%2Foctokit-plugin-search-and-replace-pull-request","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgr2m%2Foctokit-plugin-search-and-replace-pull-request/lists"}