{"id":20812310,"url":"https://github.com/ukayani/repoman","last_synced_at":"2026-05-05T15:39:24.966Z","repository":{"id":40084340,"uuid":"248123954","full_name":"ukayani/repoman","owner":"ukayani","description":"Github repository automation client","archived":false,"fork":false,"pushed_at":"2023-04-12T05:23:58.000Z","size":78,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-18T14:53:13.278Z","etag":null,"topics":["automation","git","github","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/ukayani.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":"2020-03-18T02:52:25.000Z","updated_at":"2024-12-09T21:27:57.000Z","dependencies_parsed_at":"2025-01-18T14:51:24.225Z","dependency_job_id":"009c7e8a-3b7a-4e7a-aa3e-8c0e148e0ea1","html_url":"https://github.com/ukayani/repoman","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ukayani%2Frepoman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ukayani%2Frepoman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ukayani%2Frepoman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ukayani%2Frepoman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ukayani","download_url":"https://codeload.github.com/ukayani/repoman/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243158973,"owners_count":20245669,"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":["automation","git","github","typescript"],"created_at":"2024-11-17T20:52:53.600Z","updated_at":"2026-05-05T15:39:19.926Z","avatar_url":"https://github.com/ukayani.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Repoman\n![Typescript](https://github.com/ukayani/repoman/workflows/Typescript/badge.svg?branch=master)\n\nThis is a GitHub client library with a focus on performing bulk operations across several repos.\nThe aim is to expose multi file commits purely via the [Github Data API](https://docs.github.com/en/rest/reference/git) to remove the need to clone\nrepositories to disk for bulk operations. \n\n## Example Use Cases\nSome example use cases which this library can be used for are:\n\n- Updating the version of some dependency (package.json, pom.xml, build.gradle) across several repos.\n- Adding a `.gitignore` file to multiple repos\n- Removing unused files across several repos\n- Updating broken links in MarkDown files across several repos \n   \nIn general, it enables you to quickly set up a multi-repo automation\nwhich makes file modifications, issues a PR, merges and deletes the branch -- all without \ncloning a single file to disk.\n\n## Feature Highlights\n\n- a high level API for making multi-file commits\n- output a diff of file changes from a commit\n- do a dry run of changes to a repo with a diff output of potential changes\n- create and merge pull requests\n- use glob patterns to modify files in a git repo\n- make changes to files without local clone\n- delete branches\n- load a list of repositories from a YAML file\n- get a list of repositories matching a [GitHub Code Search](https://docs.github.com/en/github/searching-for-information-on-github/searching-code)\n- get a list of repositories filtered by attributes such as language, star count, etc.\n- save a list of repositories to a YAML file\n\n# Docs\n\nFor details on usage and examples visit the docs page:\n[Documentation](https://ukayani.github.io/repoman/)\n\n## Installation\n\n```bash\n$ npm i @ukayani/repoman --save\n```\n\n## Github Token\n\nA GitHub token can be configured via:\n- a `GITHUB_TOKEN` environment variable \n- a `config.yaml` file in the working directory with a `token` key\n- the constructor of the GitHub class `new GitHub(token)`\n\n## Sample Code\n\nBelow is an automation which reads a list of repos from a file\nand then removes all Maven Wrapper files from them. It then creates a PR\nfor each change and optionally merges the PR.\n\n```typescript\nimport { Config, GitHub } from \"@ukayani/repoman\";\n\nasync function main() {\n  const github = await GitHub.init();\n  const config = await Config.load(\"services.yaml\");\n  const repos = await github.getRepositories(config.repos);\n  const automerge = false;\n\n  for (const repo of repos) {\n    const result = await repo\n      .checkout(\"maven-wrapper-removal\")\n      .deleteFile(\".mvn\")\n      .deleteFile(\"mvnw\")\n      .deleteFile(\"mvnw.cmd\")\n      .commit(\"Remove maven wrapper\");\n    console.log(`Changes for ${repo.name}`);\n    console.log(result.changelog());\n\n    if (result.hasChanges()) {\n      const pr = await repo.createPullRequest(\n        result.branch,\n        \"PR Title\",\n        \"body\",\n        [\"ukayani\"]\n      );\n      if (automerge) {\n        await repo.mergePullRequest(pr);\n      }\n      console.log(pr);\n    }\n  }\n}\n\nmain().catch(console.error);\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fukayani%2Frepoman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fukayani%2Frepoman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fukayani%2Frepoman/lists"}