{"id":13548559,"url":"https://github.com/lindell/multi-gitter","last_synced_at":"2025-05-14T20:09:05.606Z","repository":{"id":37015349,"uuid":"264844037","full_name":"lindell/multi-gitter","owner":"lindell","description":"Update multiple repositories in with one command","archived":false,"fork":false,"pushed_at":"2025-05-01T08:47:30.000Z","size":2006,"stargazers_count":1005,"open_issues_count":42,"forks_count":69,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-01T09:35:58.700Z","etag":null,"topics":["automation","cli","commandline","developer-tools","devops","devtools","git","github","gitlab","go","golang","productivity","script"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lindell.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-05-18T06:09:40.000Z","updated_at":"2025-05-01T08:46:41.000Z","dependencies_parsed_at":"2023-01-17T13:45:53.281Z","dependency_job_id":"479d3f87-3363-4989-b2a4-43badc529195","html_url":"https://github.com/lindell/multi-gitter","commit_stats":null,"previous_names":[],"tags_count":120,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lindell%2Fmulti-gitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lindell%2Fmulti-gitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lindell%2Fmulti-gitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lindell%2Fmulti-gitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lindell","download_url":"https://codeload.github.com/lindell/multi-gitter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254219373,"owners_count":22034397,"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","cli","commandline","developer-tools","devops","devtools","git","github","gitlab","go","golang","productivity","script"],"created_at":"2024-08-01T12:01:11.833Z","updated_at":"2025-05-14T20:09:05.597Z","avatar_url":"https://github.com/lindell.png","language":"Go","readme":"\u003ch1 align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"docs/img/logo-dark-mode.svg\" /\u003e\n    \u003cimg alt=\"Multi-gitter logo\" src=\"docs/img/logo.svg\" height=\"80\" height=\"80\" /\u003e\n  \u003c/picture\u003e\n\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/lindell/multi-gitter/actions?query=branch%3Amaster+workflow%3ABuilding\"\u003e\u003cimg alt=\"Go build status\" src=\"https://github.com/lindell/multi-gitter/actions/workflows/build.yaml/badge.svg?branch=master\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/lindell/multi-gitter/actions?query=branch%3Amaster+workflow%3ATesting\"\u003e\u003cimg alt=\"Go test status\" src=\"https://github.com/lindell/multi-gitter/actions/workflows/test.yaml/badge.svg?branch=master\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://goreportcard.com/report/github.com/lindell/multi-gitter\"\u003e\u003cimg alt=\"Go Report Card\" src=\"https://goreportcard.com/badge/github.com/lindell/multi-gitter\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://securityscorecards.dev/viewer/?uri=github.com/lindell/multi-gitter\"\u003e\u003cimg alt=\"OpenSSF Scorecard\" src=\"https://api.securityscorecards.dev/projects/github.com/lindell/multi-gitter/badge\" /\u003e\u003c/a\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n*multi-gitter* allows you to make changes in multiple repositories simultaneously. This is achieved by running a script or program in the context of multiple repositories. If any changes are made, a pull request is created that can be merged manually by the set reviewers, or automatically by multi-gitter when CI pipelines have completed successfully.\n\nAre you a bash-guru or simply prefer your scripting in Node.js? It doesn't matter, since multi-gitter support any type of script or program. **If you can script it to run in one place, you can run it in all your repositories with one command!**\n\n### Some examples:\n* Syncing a file (like a PR-template)\n* Programmatic refactoring\n* Updating a dependency\n* Automatically fixing linting issues\n* Search and replace\n* Anything else you are able to script!\n\n## Demo\n\n![Gif](docs/img/demo.gif)\n\n## Example\n\n### Run with file\n```bash\n$ multi-gitter run ./my-script.sh -O my-org -m \"Commit message\" -B branch-name\n```\n\nMake sure the script has execution permissions before running it (`chmod +x ./my-script.sh`)\n\n### Run code through interpreter\nIf you are running an interpreted language or similar, it's important to specify the path as an absolute value (since the script will be run in the context of each repository). Using the `$PWD` variable helps with this.\n```bash\n$ multi-gitter run \"python $PWD/run.py\" -O my-org -m \"Commit message\" -B branch-name\n$ multi-gitter run \"node $PWD/script.js\" -R repo1 -R repo2 -m \"Commit message\" -B branch-name\n$ multi-gitter run \"go run $PWD/main.go\" -U my-user -m \"Commit message\" -B branch-name\n```\n\n### Test before live run\nYou might want to test your changes before creating commits. The `--dry-run` flag provides an easy way to test without actually making any modifications. It works well when setting the log level to `debug`, with `--log-level=debug`, to also print the changes that would have been made.\n```\n$ multi-gitter run ./script.sh --dry-run --log-level=debug -O my-org -m \"Commit message\" -B branch-name\n```\n\n## Install\n\n### Homebrew\nIf you are using Mac or Linux, [Homebrew](https://brew.sh/) is an easy way of installing multi-gitter.\n```bash\nbrew install lindell/multi-gitter/multi-gitter\n```\n\n### Manual binary install\nFind the binary for your operating system from the [release page](https://github.com/lindell/multi-gitter/releases) and download it.\n\n### Automatic binary install\nTo automatically install the latest version\n```bash\ncurl -s https://raw.githubusercontent.com/lindell/multi-gitter/master/install.sh | sh\n```\n\n### From source\nYou can also install from source with `go install`, this is not recommended for most cases.\n```bash\ngo install github.com/lindell/multi-gitter@latest\n```\n\n## Token\n\nTo use multi-gitter, a token that is allowed to list repositories and create pull requests is needed. This token can either be set in the `GITHUB_TOKEN`, `GITLAB_TOKEN`, `GITEA_TOKEN` environment variable, or by using the `--token` flag.\n\n### GitHub\n\n[How to generate a GitHub personal access token (classic)](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic). Make sure to give it `repo` permissions.\n\n### GitLab\n\n[How to generate a GitLab personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html). Make sure to give to it the `api` permission.\n\n### Gitea\n\nIn Gitea, access tokens can be generated under Settings -\u003e Applications -\u003e Manage Access Tokens\n\n## Config file\n\nAll configuration in multi-gitter can be done through command line flags, configuration files or a combination of both. If you want to use a configuration file, simply use the `--config=./path/to/config.yaml` option. Multi-gitter will also read from the file `~/.multi-gitter/config` and take and configuration from there. The priority of configs are first flags, then defined config file and lastly the static config file.\n\n\n\n\u003cdetails\u003e\n  \u003csummary\u003eAll available run options\u003c/summary\u003e\n\n```yaml\n# Push changes through the API instead of git. Only supported for GitHub.\n# It has the benefit of automatically producing verified commits. However, it is slower and not suited for changes to large files.\napi-push: false\n\n# The username of the assignees to be added on the pull request.\nassignees:\n  - example\n\n# The authentication type. Used only for Bitbucket cloud. Available values: app-password, workspace-token.\nauth-type: app-password\n\n# Email of the committer. If not set, the global git config setting will be used.\nauthor-email:\n\n# Name of the committer. If not set, the global git config setting will be used.\nauthor-name:\n\n# The branch which the changes will be based on.\nbase-branch:\n\n# Base URL of the target platform, needs to be changed for GitHub enterprise, a self-hosted GitLab instance, Gitea or BitBucket.\nbase-url:\n\n# The name of the branch where changes are committed.\nbranch: multi-gitter-branch\n\n# The temporary directory where the repositories will be cloned. If not set, the default os temporary directory will be used.\nclone-dir:\n\n# Use a code search to find a set of repositories to target (GitHub only). Repeated results from a given repository will be ignored, forks are NOT included by default (use `fork:true` to include them). See the GitHub documentation for full syntax: https://docs.github.com/en/search-github/searching-on-github/searching-code.\ncode-search:\n\n# The commit message. Will default to title + body if none is set.\ncommit-message:\n\n# The maximum number of concurrent runs.\nconcurrent: 1\n\n# What should happen if the branch already exist.\n# Available values:\n#   skip: Skip making any changes to the existing branch and do not create a new pull request.\n#   replace: Replace the existing content of the branch by force pushing any new changes, then reuse any existing pull request, or create a new one if none exist.\nconflict-strategy: skip\n\n# Create pull request(s) as draft.\ndraft: false\n\n# Run without pushing changes or creating pull requests.\ndry-run: false\n\n# Limit fetching to the specified number of commits. Set to 0 for no limit.\nfetch-depth: 1\n\n# Fork the repository instead of creating a new branch on the same owner.\nfork: false\n\n# If set, make the fork to the defined value. Default behavior is for the fork to be on the logged in user.\nfork-owner:\n\n# The type of git implementation to use.\n# Available values:\n#   go: Uses go-git, a Go native implementation of git. This is compiled with the multi-gitter binary, and no extra dependencies are needed.\n#   cmd: Calls out to the git command. This requires git to be installed and available with by calling \"git\".\ngit-type: go\n\n# The name of a GitLab organization. All repositories in that group will be used.\ngroup:\n  - example\n\n# Include GitLab subgroups when using the --group flag.\ninclude-subgroups: false\n\n# Insecure controls whether a client verifies the server certificate chain and host name. Used only for Bitbucket server.\ninsecure: false\n\n# Take manual decision before committing any change. Requires git to be installed.\ninteractive: false\n\n# Labels to be added to any created pull request.\nlabels:\n  - example\n\n# The file where all logs should be printed to. \"-\" means stdout.\nlog-file: \"-\"\n\n# The formatting of the logs. Available values: text, json, json-pretty.\nlog-format: text\n\n# The level of logging that should be made. Available values: trace, debug, info, error.\nlog-level: info\n\n# If this value is set, reviewers will be randomized.\nmax-reviewers: 0\n\n# If this value is set, team reviewers will be randomized\nmax-team-reviewers: 0\n\n# The name of a GitHub organization. All repositories in that organization will be used.\norg:\n  - example\n\n# The file that the output of the script should be outputted to. \"-\" means stdout.\noutput: \"-\"\n\n# Don't use any terminal formatting when printing the output.\nplain-output: false\n\n# The platform that is used. Available values: github, gitlab, gitea, bitbucket_server, bitbucket_cloud. Note: bitbucket_cloud is in Beta\nplatform: github\n\n# The body of the commit message. Will default to everything but the first line of the commit message if none is set.\npr-body:\n\n# The title of the PR. Will default to the first line of the commit message if none is set.\npr-title:\n\n# The name, including owner of a GitLab project in the format \"ownerName/repoName\".\nproject:\n  - group/project\n\n# Skip pull request and only push the feature branch.\npush-only: false\n\n# The name, including owner of a GitHub repository in the format \"ownerName/repoName\".\nrepo:\n  - my-org/js-repo\n  - other-org/python-repo\n\n# Exclude repositories that match with a given Regular Expression\nrepo-exclude:\n\n# Include repositories that match with a given Regular Expression\nrepo-include:\n\n# Use a repository search to find repositories to target (GitHub only). Forks are NOT included by default, use `fork:true` to include them. See the GitHub documentation for full syntax: https://docs.github.com/en/search-github/searching-on-github/searching-for-repositories.\nrepo-search:\n\n# The username of the reviewers to be added on the pull request.\nreviewers:\n  - example\n\n# Skip repositories which are forks.\nskip-forks: false\n\n# Skip pull request and directly push to the branch.\nskip-pr: false\n\n# Skip changes on specified repositories, the name is including the owner of repository in the format \"ownerName/repoName\".\nskip-repo:\n  - example\n\n# Use SSH cloning URL instead of HTTPS + token. This requires that a setup with ssh keys that have access to all repos and that the server is already in known_hosts.\nssh-auth: false\n\n# Github team names of the reviewers, in format: 'org/team'\nteam-reviewers:\n  - example\n\n# The personal access token for the targeting platform. Can also be set using the GITHUB_TOKEN/GITLAB_TOKEN/GITEA_TOKEN/BITBUCKET_SERVER_TOKEN/BITBUCKET_CLOUD_APP_PASSWORD/BITBUCKET_CLOUD_WORKSPACE_TOKEN environment variable.\ntoken:\n\n# The topic of a GitHub/GitLab/Gitea repository. All repositories having at least one matching topic are targeted.\ntopic:\n  - example\n\n# The name of a user. All repositories owned by that user will be used.\nuser:\n  - example\n\n# The Bitbucket server username.\nusername:\n```\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n  \u003csummary\u003eAll available merge options\u003c/summary\u003e\n\n```yaml\n# The authentication type. Used only for Bitbucket cloud. Available values: app-password, workspace-token.\nauth-type: app-password\n\n# Base URL of the target platform, needs to be changed for GitHub enterprise, a self-hosted GitLab instance, Gitea or BitBucket.\nbase-url:\n\n# The name of the branch where changes are committed.\nbranch: multi-gitter-branch\n\n# Use a code search to find a set of repositories to target (GitHub only). Repeated results from a given repository will be ignored, forks are NOT included by default (use `fork:true` to include them). See the GitHub documentation for full syntax: https://docs.github.com/en/search-github/searching-on-github/searching-code.\ncode-search:\n\n# Use pull requests made from forks instead of from the same repository.\nfork: false\n\n# If set, use forks from the defined value instead of the logged in user.\nfork-owner:\n\n# The name of a GitLab organization. All repositories in that group will be used.\ngroup:\n  - example\n\n# Include GitLab subgroups when using the --group flag.\ninclude-subgroups: false\n\n# Insecure controls whether a client verifies the server certificate chain and host name. Used only for Bitbucket server.\ninsecure: false\n\n# The file where all logs should be printed to. \"-\" means stdout.\nlog-file: \"-\"\n\n# The formatting of the logs. Available values: text, json, json-pretty.\nlog-format: text\n\n# The level of logging that should be made. Available values: trace, debug, info, error.\nlog-level: info\n\n# The type of merge that should be done (GitHub). Multiple types can be used as backup strategies if the first one is not allowed.\nmerge-type:\n  - merge\n  - squash\n  - rebase\n\n# The name of a GitHub organization. All repositories in that organization will be used.\norg:\n  - example\n\n# Don't use any terminal formatting when printing the output.\nplain-output: false\n\n# The platform that is used. Available values: github, gitlab, gitea, bitbucket_server, bitbucket_cloud. Note: bitbucket_cloud is in Beta\nplatform: github\n\n# The name, including owner of a GitLab project in the format \"ownerName/repoName\".\nproject:\n  - group/project\n\n# The name, including owner of a GitHub repository in the format \"ownerName/repoName\".\nrepo:\n  - my-org/js-repo\n  - other-org/python-repo\n\n# Use a repository search to find repositories to target (GitHub only). Forks are NOT included by default, use `fork:true` to include them. See the GitHub documentation for full syntax: https://docs.github.com/en/search-github/searching-on-github/searching-for-repositories.\nrepo-search:\n\n# Skip repositories which are forks.\nskip-forks: false\n\n# Use SSH cloning URL instead of HTTPS + token. This requires that a setup with ssh keys that have access to all repos and that the server is already in known_hosts.\nssh-auth: false\n\n# The personal access token for the targeting platform. Can also be set using the GITHUB_TOKEN/GITLAB_TOKEN/GITEA_TOKEN/BITBUCKET_SERVER_TOKEN/BITBUCKET_CLOUD_APP_PASSWORD/BITBUCKET_CLOUD_WORKSPACE_TOKEN environment variable.\ntoken:\n\n# The topic of a GitHub/GitLab/Gitea repository. All repositories having at least one matching topic are targeted.\ntopic:\n  - example\n\n# The name of a user. All repositories owned by that user will be used.\nuser:\n  - example\n\n# The Bitbucket server username.\nusername:\n```\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n  \u003csummary\u003eAll available status options\u003c/summary\u003e\n\n```yaml\n# The authentication type. Used only for Bitbucket cloud. Available values: app-password, workspace-token.\nauth-type: app-password\n\n# Base URL of the target platform, needs to be changed for GitHub enterprise, a self-hosted GitLab instance, Gitea or BitBucket.\nbase-url:\n\n# The name of the branch where changes are committed.\nbranch: multi-gitter-branch\n\n# Use a code search to find a set of repositories to target (GitHub only). Repeated results from a given repository will be ignored, forks are NOT included by default (use `fork:true` to include them). See the GitHub documentation for full syntax: https://docs.github.com/en/search-github/searching-on-github/searching-code.\ncode-search:\n\n# Use pull requests made from forks instead of from the same repository.\nfork: false\n\n# If set, use forks from the defined value instead of the logged in user.\nfork-owner:\n\n# The name of a GitLab organization. All repositories in that group will be used.\ngroup:\n  - example\n\n# Include GitLab subgroups when using the --group flag.\ninclude-subgroups: false\n\n# Insecure controls whether a client verifies the server certificate chain and host name. Used only for Bitbucket server.\ninsecure: false\n\n# The file where all logs should be printed to. \"-\" means stdout.\nlog-file: \"-\"\n\n# The formatting of the logs. Available values: text, json, json-pretty.\nlog-format: text\n\n# The level of logging that should be made. Available values: trace, debug, info, error.\nlog-level: info\n\n# The name of a GitHub organization. All repositories in that organization will be used.\norg:\n  - example\n\n# The file that the output of the script should be outputted to. \"-\" means stdout.\noutput: \"-\"\n\n# Don't use any terminal formatting when printing the output.\nplain-output: false\n\n# The platform that is used. Available values: github, gitlab, gitea, bitbucket_server, bitbucket_cloud. Note: bitbucket_cloud is in Beta\nplatform: github\n\n# The name, including owner of a GitLab project in the format \"ownerName/repoName\".\nproject:\n  - group/project\n\n# The name, including owner of a GitHub repository in the format \"ownerName/repoName\".\nrepo:\n  - my-org/js-repo\n  - other-org/python-repo\n\n# Use a repository search to find repositories to target (GitHub only). Forks are NOT included by default, use `fork:true` to include them. See the GitHub documentation for full syntax: https://docs.github.com/en/search-github/searching-on-github/searching-for-repositories.\nrepo-search:\n\n# Skip repositories which are forks.\nskip-forks: false\n\n# Use SSH cloning URL instead of HTTPS + token. This requires that a setup with ssh keys that have access to all repos and that the server is already in known_hosts.\nssh-auth: false\n\n# The personal access token for the targeting platform. Can also be set using the GITHUB_TOKEN/GITLAB_TOKEN/GITEA_TOKEN/BITBUCKET_SERVER_TOKEN/BITBUCKET_CLOUD_APP_PASSWORD/BITBUCKET_CLOUD_WORKSPACE_TOKEN environment variable.\ntoken:\n\n# The topic of a GitHub/GitLab/Gitea repository. All repositories having at least one matching topic are targeted.\ntopic:\n  - example\n\n# The name of a user. All repositories owned by that user will be used.\nuser:\n  - example\n\n# The Bitbucket server username.\nusername:\n```\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n  \u003csummary\u003eAll available close options\u003c/summary\u003e\n\n```yaml\n# The authentication type. Used only for Bitbucket cloud. Available values: app-password, workspace-token.\nauth-type: app-password\n\n# Base URL of the target platform, needs to be changed for GitHub enterprise, a self-hosted GitLab instance, Gitea or BitBucket.\nbase-url:\n\n# The name of the branch where changes are committed.\nbranch: multi-gitter-branch\n\n# Use a code search to find a set of repositories to target (GitHub only). Repeated results from a given repository will be ignored, forks are NOT included by default (use `fork:true` to include them). See the GitHub documentation for full syntax: https://docs.github.com/en/search-github/searching-on-github/searching-code.\ncode-search:\n\n# Use pull requests made from forks instead of from the same repository.\nfork: false\n\n# If set, use forks from the defined value instead of the logged in user.\nfork-owner:\n\n# The name of a GitLab organization. All repositories in that group will be used.\ngroup:\n  - example\n\n# Include GitLab subgroups when using the --group flag.\ninclude-subgroups: false\n\n# Insecure controls whether a client verifies the server certificate chain and host name. Used only for Bitbucket server.\ninsecure: false\n\n# The file where all logs should be printed to. \"-\" means stdout.\nlog-file: \"-\"\n\n# The formatting of the logs. Available values: text, json, json-pretty.\nlog-format: text\n\n# The level of logging that should be made. Available values: trace, debug, info, error.\nlog-level: info\n\n# The name of a GitHub organization. All repositories in that organization will be used.\norg:\n  - example\n\n# Don't use any terminal formatting when printing the output.\nplain-output: false\n\n# The platform that is used. Available values: github, gitlab, gitea, bitbucket_server, bitbucket_cloud. Note: bitbucket_cloud is in Beta\nplatform: github\n\n# The name, including owner of a GitLab project in the format \"ownerName/repoName\".\nproject:\n  - group/project\n\n# The name, including owner of a GitHub repository in the format \"ownerName/repoName\".\nrepo:\n  - my-org/js-repo\n  - other-org/python-repo\n\n# Use a repository search to find repositories to target (GitHub only). Forks are NOT included by default, use `fork:true` to include them. See the GitHub documentation for full syntax: https://docs.github.com/en/search-github/searching-on-github/searching-for-repositories.\nrepo-search:\n\n# Skip repositories which are forks.\nskip-forks: false\n\n# Use SSH cloning URL instead of HTTPS + token. This requires that a setup with ssh keys that have access to all repos and that the server is already in known_hosts.\nssh-auth: false\n\n# The personal access token for the targeting platform. Can also be set using the GITHUB_TOKEN/GITLAB_TOKEN/GITEA_TOKEN/BITBUCKET_SERVER_TOKEN/BITBUCKET_CLOUD_APP_PASSWORD/BITBUCKET_CLOUD_WORKSPACE_TOKEN environment variable.\ntoken:\n\n# The topic of a GitHub/GitLab/Gitea repository. All repositories having at least one matching topic are targeted.\ntopic:\n  - example\n\n# The name of a user. All repositories owned by that user will be used.\nuser:\n  - example\n\n# The Bitbucket server username.\nusername:\n```\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n  \u003csummary\u003eAll available print options\u003c/summary\u003e\n\n```yaml\n# The authentication type. Used only for Bitbucket cloud. Available values: app-password, workspace-token.\nauth-type: app-password\n\n# Base URL of the target platform, needs to be changed for GitHub enterprise, a self-hosted GitLab instance, Gitea or BitBucket.\nbase-url:\n\n# The temporary directory where the repositories will be cloned. If not set, the default os temporary directory will be used.\nclone-dir:\n\n# Use a code search to find a set of repositories to target (GitHub only). Repeated results from a given repository will be ignored, forks are NOT included by default (use `fork:true` to include them). See the GitHub documentation for full syntax: https://docs.github.com/en/search-github/searching-on-github/searching-code.\ncode-search:\n\n# The maximum number of concurrent runs.\nconcurrent: 1\n\n# The file that the output of the script should be outputted to. \"-\" means stderr.\nerror-output: \"-\"\n\n# Limit fetching to the specified number of commits. Set to 0 for no limit.\nfetch-depth: 1\n\n# The type of git implementation to use.\n# Available values:\n#   go: Uses go-git, a Go native implementation of git. This is compiled with the multi-gitter binary, and no extra dependencies are needed.\n#   cmd: Calls out to the git command. This requires git to be installed and available with by calling \"git\".\ngit-type: go\n\n# The name of a GitLab organization. All repositories in that group will be used.\ngroup:\n  - example\n\n# Include GitLab subgroups when using the --group flag.\ninclude-subgroups: false\n\n# Insecure controls whether a client verifies the server certificate chain and host name. Used only for Bitbucket server.\ninsecure: false\n\n# The file where all logs should be printed to. \"-\" means stdout.\nlog-file:\n\n# The formatting of the logs. Available values: text, json, json-pretty.\nlog-format: text\n\n# The level of logging that should be made. Available values: trace, debug, info, error.\nlog-level: info\n\n# The name of a GitHub organization. All repositories in that organization will be used.\norg:\n  - example\n\n# The file that the output of the script should be outputted to. \"-\" means stdout.\noutput: \"-\"\n\n# Don't use any terminal formatting when printing the output.\nplain-output: false\n\n# The platform that is used. Available values: github, gitlab, gitea, bitbucket_server, bitbucket_cloud. Note: bitbucket_cloud is in Beta\nplatform: github\n\n# The name, including owner of a GitLab project in the format \"ownerName/repoName\".\nproject:\n  - group/project\n\n# The name, including owner of a GitHub repository in the format \"ownerName/repoName\".\nrepo:\n  - my-org/js-repo\n  - other-org/python-repo\n\n# Use a repository search to find repositories to target (GitHub only). Forks are NOT included by default, use `fork:true` to include them. See the GitHub documentation for full syntax: https://docs.github.com/en/search-github/searching-on-github/searching-for-repositories.\nrepo-search:\n\n# Skip repositories which are forks.\nskip-forks: false\n\n# Use SSH cloning URL instead of HTTPS + token. This requires that a setup with ssh keys that have access to all repos and that the server is already in known_hosts.\nssh-auth: false\n\n# The personal access token for the targeting platform. Can also be set using the GITHUB_TOKEN/GITLAB_TOKEN/GITEA_TOKEN/BITBUCKET_SERVER_TOKEN/BITBUCKET_CLOUD_APP_PASSWORD/BITBUCKET_CLOUD_WORKSPACE_TOKEN environment variable.\ntoken:\n\n# The topic of a GitHub/GitLab/Gitea repository. All repositories having at least one matching topic are targeted.\ntopic:\n  - example\n\n# The name of a user. All repositories owned by that user will be used.\nuser:\n  - example\n\n# The Bitbucket server username.\nusername:\n```\n\u003c/details\u003e\n\n\n## Usage\n\n* [run](#-usage-of-run) Clones multiple repositories, run a script in that directory, and creates a PR with those changes.\n* [merge](#-usage-of-merge) Merge pull requests.\n* [status](#-usage-of-status) Get the status of pull requests.\n* [close](#-usage-of-close) Close pull requests.\n* [print](#-usage-of-print) Clones multiple repositories, run a script in that directory, and prints the output of each run.\n\n\n### \u003cimg alt=\"run\" src=\"docs/img/fa/rabbit-fast.svg\" height=\"40\" valign=\"middle\" /\u003e Usage of `run`\n\nThis command will clone down multiple repositories. For each of those repositories, the script will be run in the context of that repository. If the script finished with a zero exit code, and the script resulted in file changes, a pull request will be created.\n\nWhen the script is invoked, these environment variables are set:\n- REPOSITORY will be set to the name of the repository currently being executed\n- DRY_RUN will be set =true, when running in with the --dry-run flag, otherwise it's absent\n\n```\nUsage:\n  multi-gitter run [script path] [flags]\n\nFlags:\n      --api-push                   Push changes through the API instead of git. Only supported for GitHub.\n                                   It has the benefit of automatically producing verified commits. However, it is slower and not suited for changes to large files.\n  -a, --assignees strings          The username of the assignees to be added on the pull request.\n      --auth-type string           The authentication type. Used only for Bitbucket cloud. Available values: app-password, workspace-token. (default \"app-password\")\n      --author-email string        Email of the committer. If not set, the global git config setting will be used.\n      --author-name string         Name of the committer. If not set, the global git config setting will be used.\n      --base-branch string         The branch which the changes will be based on.\n  -g, --base-url string            Base URL of the target platform, needs to be changed for GitHub enterprise, a self-hosted GitLab instance, Gitea or BitBucket.\n  -B, --branch string              The name of the branch where changes are committed. (default \"multi-gitter-branch\")\n      --clone-dir string           The temporary directory where the repositories will be cloned. If not set, the default os temporary directory will be used.\n      --code-search fork:true      Use a code search to find a set of repositories to target (GitHub only). Repeated results from a given repository will be ignored, forks are NOT included by default (use fork:true to include them). See the GitHub documentation for full syntax: https://docs.github.com/en/search-github/searching-on-github/searching-code.\n  -m, --commit-message string      The commit message. Will default to title + body if none is set.\n  -C, --concurrent int             The maximum number of concurrent runs. (default 1)\n      --config string              Path of the config file.\n      --conflict-strategy string   What should happen if the branch already exist.\n                                   Available values:\n                                     skip: Skip making any changes to the existing branch and do not create a new pull request.\n                                     replace: Replace the existing content of the branch by force pushing any new changes, then reuse any existing pull request, or create a new one if none exist.\n                                    (default \"skip\")\n      --draft                      Create pull request(s) as draft.\n  -d, --dry-run                    Run without pushing changes or creating pull requests.\n  -f, --fetch-depth int            Limit fetching to the specified number of commits. Set to 0 for no limit. (default 1)\n      --fork                       Fork the repository instead of creating a new branch on the same owner.\n      --fork-owner string          If set, make the fork to the defined value. Default behavior is for the fork to be on the logged in user.\n      --git-type string            The type of git implementation to use.\n                                   Available values:\n                                     go: Uses go-git, a Go native implementation of git. This is compiled with the multi-gitter binary, and no extra dependencies are needed.\n                                     cmd: Calls out to the git command. This requires git to be installed and available with by calling \"git\".\n                                    (default \"go\")\n  -G, --group strings              The name of a GitLab organization. All repositories in that group will be used.\n      --include-subgroups          Include GitLab subgroups when using the --group flag.\n      --insecure                   Insecure controls whether a client verifies the server certificate chain and host name. Used only for Bitbucket server.\n  -i, --interactive                Take manual decision before committing any change. Requires git to be installed.\n      --labels strings             Labels to be added to any created pull request.\n      --log-file string            The file where all logs should be printed to. \"-\" means stdout. (default \"-\")\n      --log-format string          The formatting of the logs. Available values: text, json, json-pretty. (default \"text\")\n  -L, --log-level string           The level of logging that should be made. Available values: trace, debug, info, error. (default \"info\")\n  -M, --max-reviewers int          If this value is set, reviewers will be randomized.\n      --max-team-reviewers int     If this value is set, team reviewers will be randomized\n  -O, --org strings                The name of a GitHub organization. All repositories in that organization will be used.\n  -o, --output string              The file that the output of the script should be outputted to. \"-\" means stdout. (default \"-\")\n      --plain-output               Don't use any terminal formatting when printing the output.\n  -p, --platform string            The platform that is used. Available values: github, gitlab, gitea, bitbucket_server, bitbucket_cloud. Note: bitbucket_cloud is in Beta (default \"github\")\n  -b, --pr-body string             The body of the commit message. Will default to everything but the first line of the commit message if none is set.\n  -t, --pr-title string            The title of the PR. Will default to the first line of the commit message if none is set.\n  -P, --project strings            The name, including owner of a GitLab project in the format \"ownerName/repoName\".\n      --push-only                  Skip pull request and only push the feature branch.\n  -R, --repo strings               The name, including owner of a GitHub repository in the format \"ownerName/repoName\".\n      --repo-exclude string        Exclude repositories that match with a given Regular Expression\n      --repo-include string        Include repositories that match with a given Regular Expression\n      --repo-search fork:true      Use a repository search to find repositories to target (GitHub only). Forks are NOT included by default, use fork:true to include them. See the GitHub documentation for full syntax: https://docs.github.com/en/search-github/searching-on-github/searching-for-repositories.\n  -r, --reviewers strings          The username of the reviewers to be added on the pull request.\n      --skip-forks                 Skip repositories which are forks.\n      --skip-pr                    Skip pull request and directly push to the branch.\n  -s, --skip-repo strings          Skip changes on specified repositories, the name is including the owner of repository in the format \"ownerName/repoName\".\n      --ssh-auth                   Use SSH cloning URL instead of HTTPS + token. This requires that a setup with ssh keys that have access to all repos and that the server is already in known_hosts.\n      --team-reviewers strings     Github team names of the reviewers, in format: 'org/team'\n  -T, --token string               The personal access token for the targeting platform. Can also be set using the GITHUB_TOKEN/GITLAB_TOKEN/GITEA_TOKEN/BITBUCKET_SERVER_TOKEN/BITBUCKET_CLOUD_APP_PASSWORD/BITBUCKET_CLOUD_WORKSPACE_TOKEN environment variable.\n      --topic strings              The topic of a GitHub/GitLab/Gitea repository. All repositories having at least one matching topic are targeted.\n  -U, --user strings               The name of a user. All repositories owned by that user will be used.\n  -u, --username string            The Bitbucket server username.\n```\n\n\n### \u003cimg alt=\"merge\" src=\"docs/img/fa/code-merge.svg\" height=\"40\" valign=\"middle\" /\u003e Usage of `merge`\nMerge pull requests with a specified branch name in an organization and with specified conditions.\n```\nUsage:\n  multi-gitter merge [flags]\n\nFlags:\n      --auth-type string        The authentication type. Used only for Bitbucket cloud. Available values: app-password, workspace-token. (default \"app-password\")\n  -g, --base-url string         Base URL of the target platform, needs to be changed for GitHub enterprise, a self-hosted GitLab instance, Gitea or BitBucket.\n  -B, --branch string           The name of the branch where changes are committed. (default \"multi-gitter-branch\")\n      --code-search fork:true   Use a code search to find a set of repositories to target (GitHub only). Repeated results from a given repository will be ignored, forks are NOT included by default (use fork:true to include them). See the GitHub documentation for full syntax: https://docs.github.com/en/search-github/searching-on-github/searching-code.\n      --config string           Path of the config file.\n      --fork                    Use pull requests made from forks instead of from the same repository.\n      --fork-owner string       If set, use forks from the defined value instead of the logged in user.\n  -G, --group strings           The name of a GitLab organization. All repositories in that group will be used.\n      --include-subgroups       Include GitLab subgroups when using the --group flag.\n      --insecure                Insecure controls whether a client verifies the server certificate chain and host name. Used only for Bitbucket server.\n      --log-file string         The file where all logs should be printed to. \"-\" means stdout. (default \"-\")\n      --log-format string       The formatting of the logs. Available values: text, json, json-pretty. (default \"text\")\n  -L, --log-level string        The level of logging that should be made. Available values: trace, debug, info, error. (default \"info\")\n      --merge-type strings      The type of merge that should be done (GitHub). Multiple types can be used as backup strategies if the first one is not allowed. (default [merge,squash,rebase])\n  -O, --org strings             The name of a GitHub organization. All repositories in that organization will be used.\n      --plain-output            Don't use any terminal formatting when printing the output.\n  -p, --platform string         The platform that is used. Available values: github, gitlab, gitea, bitbucket_server, bitbucket_cloud. Note: bitbucket_cloud is in Beta (default \"github\")\n  -P, --project strings         The name, including owner of a GitLab project in the format \"ownerName/repoName\".\n  -R, --repo strings            The name, including owner of a GitHub repository in the format \"ownerName/repoName\".\n      --repo-search fork:true   Use a repository search to find repositories to target (GitHub only). Forks are NOT included by default, use fork:true to include them. See the GitHub documentation for full syntax: https://docs.github.com/en/search-github/searching-on-github/searching-for-repositories.\n      --skip-forks              Skip repositories which are forks.\n      --ssh-auth                Use SSH cloning URL instead of HTTPS + token. This requires that a setup with ssh keys that have access to all repos and that the server is already in known_hosts.\n  -T, --token string            The personal access token for the targeting platform. Can also be set using the GITHUB_TOKEN/GITLAB_TOKEN/GITEA_TOKEN/BITBUCKET_SERVER_TOKEN/BITBUCKET_CLOUD_APP_PASSWORD/BITBUCKET_CLOUD_WORKSPACE_TOKEN environment variable.\n      --topic strings           The topic of a GitHub/GitLab/Gitea repository. All repositories having at least one matching topic are targeted.\n  -U, --user strings            The name of a user. All repositories owned by that user will be used.\n  -u, --username string         The Bitbucket server username.\n```\n\n\n### \u003cimg alt=\"status\" src=\"docs/img/fa/tasks.svg\" height=\"40\" valign=\"middle\" /\u003e Usage of `status`\nGet the status of all pull requests with a specified branch name in an organization.\n```\nUsage:\n  multi-gitter status [flags]\n\nFlags:\n      --auth-type string        The authentication type. Used only for Bitbucket cloud. Available values: app-password, workspace-token. (default \"app-password\")\n  -g, --base-url string         Base URL of the target platform, needs to be changed for GitHub enterprise, a self-hosted GitLab instance, Gitea or BitBucket.\n  -B, --branch string           The name of the branch where changes are committed. (default \"multi-gitter-branch\")\n      --code-search fork:true   Use a code search to find a set of repositories to target (GitHub only). Repeated results from a given repository will be ignored, forks are NOT included by default (use fork:true to include them). See the GitHub documentation for full syntax: https://docs.github.com/en/search-github/searching-on-github/searching-code.\n      --config string           Path of the config file.\n      --fork                    Use pull requests made from forks instead of from the same repository.\n      --fork-owner string       If set, use forks from the defined value instead of the logged in user.\n  -G, --group strings           The name of a GitLab organization. All repositories in that group will be used.\n      --include-subgroups       Include GitLab subgroups when using the --group flag.\n      --insecure                Insecure controls whether a client verifies the server certificate chain and host name. Used only for Bitbucket server.\n      --log-file string         The file where all logs should be printed to. \"-\" means stdout. (default \"-\")\n      --log-format string       The formatting of the logs. Available values: text, json, json-pretty. (default \"text\")\n  -L, --log-level string        The level of logging that should be made. Available values: trace, debug, info, error. (default \"info\")\n  -O, --org strings             The name of a GitHub organization. All repositories in that organization will be used.\n  -o, --output string           The file that the output of the script should be outputted to. \"-\" means stdout. (default \"-\")\n      --plain-output            Don't use any terminal formatting when printing the output.\n  -p, --platform string         The platform that is used. Available values: github, gitlab, gitea, bitbucket_server, bitbucket_cloud. Note: bitbucket_cloud is in Beta (default \"github\")\n  -P, --project strings         The name, including owner of a GitLab project in the format \"ownerName/repoName\".\n  -R, --repo strings            The name, including owner of a GitHub repository in the format \"ownerName/repoName\".\n      --repo-search fork:true   Use a repository search to find repositories to target (GitHub only). Forks are NOT included by default, use fork:true to include them. See the GitHub documentation for full syntax: https://docs.github.com/en/search-github/searching-on-github/searching-for-repositories.\n      --skip-forks              Skip repositories which are forks.\n      --ssh-auth                Use SSH cloning URL instead of HTTPS + token. This requires that a setup with ssh keys that have access to all repos and that the server is already in known_hosts.\n  -T, --token string            The personal access token for the targeting platform. Can also be set using the GITHUB_TOKEN/GITLAB_TOKEN/GITEA_TOKEN/BITBUCKET_SERVER_TOKEN/BITBUCKET_CLOUD_APP_PASSWORD/BITBUCKET_CLOUD_WORKSPACE_TOKEN environment variable.\n      --topic strings           The topic of a GitHub/GitLab/Gitea repository. All repositories having at least one matching topic are targeted.\n  -U, --user strings            The name of a user. All repositories owned by that user will be used.\n  -u, --username string         The Bitbucket server username.\n```\n\n\n### \u003cimg alt=\"close\" src=\"docs/img/fa/times-hexagon.svg\" height=\"40\" valign=\"middle\" /\u003e Usage of `close`\nClose pull requests with a specified branch name in an organization and with specified conditions.\n```\nUsage:\n  multi-gitter close [flags]\n\nFlags:\n      --auth-type string        The authentication type. Used only for Bitbucket cloud. Available values: app-password, workspace-token. (default \"app-password\")\n  -g, --base-url string         Base URL of the target platform, needs to be changed for GitHub enterprise, a self-hosted GitLab instance, Gitea or BitBucket.\n  -B, --branch string           The name of the branch where changes are committed. (default \"multi-gitter-branch\")\n      --code-search fork:true   Use a code search to find a set of repositories to target (GitHub only). Repeated results from a given repository will be ignored, forks are NOT included by default (use fork:true to include them). See the GitHub documentation for full syntax: https://docs.github.com/en/search-github/searching-on-github/searching-code.\n      --config string           Path of the config file.\n      --fork                    Use pull requests made from forks instead of from the same repository.\n      --fork-owner string       If set, use forks from the defined value instead of the logged in user.\n  -G, --group strings           The name of a GitLab organization. All repositories in that group will be used.\n      --include-subgroups       Include GitLab subgroups when using the --group flag.\n      --insecure                Insecure controls whether a client verifies the server certificate chain and host name. Used only for Bitbucket server.\n      --log-file string         The file where all logs should be printed to. \"-\" means stdout. (default \"-\")\n      --log-format string       The formatting of the logs. Available values: text, json, json-pretty. (default \"text\")\n  -L, --log-level string        The level of logging that should be made. Available values: trace, debug, info, error. (default \"info\")\n  -O, --org strings             The name of a GitHub organization. All repositories in that organization will be used.\n      --plain-output            Don't use any terminal formatting when printing the output.\n  -p, --platform string         The platform that is used. Available values: github, gitlab, gitea, bitbucket_server, bitbucket_cloud. Note: bitbucket_cloud is in Beta (default \"github\")\n  -P, --project strings         The name, including owner of a GitLab project in the format \"ownerName/repoName\".\n  -R, --repo strings            The name, including owner of a GitHub repository in the format \"ownerName/repoName\".\n      --repo-search fork:true   Use a repository search to find repositories to target (GitHub only). Forks are NOT included by default, use fork:true to include them. See the GitHub documentation for full syntax: https://docs.github.com/en/search-github/searching-on-github/searching-for-repositories.\n      --skip-forks              Skip repositories which are forks.\n      --ssh-auth                Use SSH cloning URL instead of HTTPS + token. This requires that a setup with ssh keys that have access to all repos and that the server is already in known_hosts.\n  -T, --token string            The personal access token for the targeting platform. Can also be set using the GITHUB_TOKEN/GITLAB_TOKEN/GITEA_TOKEN/BITBUCKET_SERVER_TOKEN/BITBUCKET_CLOUD_APP_PASSWORD/BITBUCKET_CLOUD_WORKSPACE_TOKEN environment variable.\n      --topic strings           The topic of a GitHub/GitLab/Gitea repository. All repositories having at least one matching topic are targeted.\n  -U, --user strings            The name of a user. All repositories owned by that user will be used.\n  -u, --username string         The Bitbucket server username.\n```\n\n\n### \u003cimg alt=\"print\" src=\"docs/img/fa/print.svg\" height=\"40\" valign=\"middle\" /\u003e Usage of `print`\n\nThis command will clone down multiple repositories. For each of those repositories, the script will be run in the context of that repository. The output of each script run in each repo will be printed, by default to stdout and stderr, but it can be configured to write to files as well.\n\nWhen the script is invoked, these environment variables are set:\n- REPOSITORY will be set to the name of the repository currently being executed\n\n```\nUsage:\n  multi-gitter print [script path] [flags]\n\nFlags:\n      --auth-type string        The authentication type. Used only for Bitbucket cloud. Available values: app-password, workspace-token. (default \"app-password\")\n  -g, --base-url string         Base URL of the target platform, needs to be changed for GitHub enterprise, a self-hosted GitLab instance, Gitea or BitBucket.\n      --clone-dir string        The temporary directory where the repositories will be cloned. If not set, the default os temporary directory will be used.\n      --code-search fork:true   Use a code search to find a set of repositories to target (GitHub only). Repeated results from a given repository will be ignored, forks are NOT included by default (use fork:true to include them). See the GitHub documentation for full syntax: https://docs.github.com/en/search-github/searching-on-github/searching-code.\n  -C, --concurrent int          The maximum number of concurrent runs. (default 1)\n      --config string           Path of the config file.\n  -E, --error-output string     The file that the output of the script should be outputted to. \"-\" means stderr. (default \"-\")\n  -f, --fetch-depth int         Limit fetching to the specified number of commits. Set to 0 for no limit. (default 1)\n      --git-type string         The type of git implementation to use.\n                                Available values:\n                                  go: Uses go-git, a Go native implementation of git. This is compiled with the multi-gitter binary, and no extra dependencies are needed.\n                                  cmd: Calls out to the git command. This requires git to be installed and available with by calling \"git\".\n                                 (default \"go\")\n  -G, --group strings           The name of a GitLab organization. All repositories in that group will be used.\n      --include-subgroups       Include GitLab subgroups when using the --group flag.\n      --insecure                Insecure controls whether a client verifies the server certificate chain and host name. Used only for Bitbucket server.\n      --log-file string         The file where all logs should be printed to. \"-\" means stdout.\n      --log-format string       The formatting of the logs. Available values: text, json, json-pretty. (default \"text\")\n  -L, --log-level string        The level of logging that should be made. Available values: trace, debug, info, error. (default \"info\")\n  -O, --org strings             The name of a GitHub organization. All repositories in that organization will be used.\n  -o, --output string           The file that the output of the script should be outputted to. \"-\" means stdout. (default \"-\")\n      --plain-output            Don't use any terminal formatting when printing the output.\n  -p, --platform string         The platform that is used. Available values: github, gitlab, gitea, bitbucket_server, bitbucket_cloud. Note: bitbucket_cloud is in Beta (default \"github\")\n  -P, --project strings         The name, including owner of a GitLab project in the format \"ownerName/repoName\".\n  -R, --repo strings            The name, including owner of a GitHub repository in the format \"ownerName/repoName\".\n      --repo-search fork:true   Use a repository search to find repositories to target (GitHub only). Forks are NOT included by default, use fork:true to include them. See the GitHub documentation for full syntax: https://docs.github.com/en/search-github/searching-on-github/searching-for-repositories.\n      --skip-forks              Skip repositories which are forks.\n      --ssh-auth                Use SSH cloning URL instead of HTTPS + token. This requires that a setup with ssh keys that have access to all repos and that the server is already in known_hosts.\n  -T, --token string            The personal access token for the targeting platform. Can also be set using the GITHUB_TOKEN/GITLAB_TOKEN/GITEA_TOKEN/BITBUCKET_SERVER_TOKEN/BITBUCKET_CLOUD_APP_PASSWORD/BITBUCKET_CLOUD_WORKSPACE_TOKEN environment variable.\n      --topic strings           The topic of a GitHub/GitLab/Gitea repository. All repositories having at least one matching topic are targeted.\n  -U, --user strings            The name of a user. All repositories owned by that user will be used.\n  -u, --username string         The Bitbucket server username.\n```\n\n\n\n## Example scripts\n\n### general\n\n\u003cdetails\u003e\n  \u003csummary\u003eClone all repositories locally while maintaining their group folder structure\u003c/summary\u003e\n\n```sh\n#!/bin/bash\n\n# This script should be used with the print command.\nmkdir -p ~/multi-gitter/$REPOSITORY\ncp -r . ~/multi-gitter/$REPOSITORY\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eReplace a file if it exist\u003c/summary\u003e\n\n```sh\n#!/bin/bash\n\nREPLACE_FILE=~/test/pull_request_template.md # The file that should replace the file in the repo, must be an absolute path\nFILE=.github/pull_request_template.md # Relative from any repos root\n\n# Don't replace this file if it does not already exist in the repo\nif [ ! -f \"$FILE\" ]; then\n    exit 1\nfi\n\ncp $REPLACE_FILE $FILE\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eReplace text in all files\u003c/summary\u003e\n\n```sh\n#!/bin/bash\n\n# Assuming you are using gnu sed, if you are running this on a mac, please see https://stackoverflow.com/questions/4247068/sed-command-with-i-option-failing-on-mac-but-works-on-linux\n\nfind ./ -type f -exec sed -i -e 's/apple/orange/g' {} \\;\n```\n\u003c/details\u003e\n\n### go\n\n\u003cdetails\u003e\n  \u003csummary\u003eReplace all instances of empty interface with any\u003c/summary\u003e\n\n```sh\n#!/bin/bash\n\ngofmt -r 'interface{} -\u003e any' -w **/*.go\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eFix the ioutil deprecation\u003c/summary\u003e\n\n```sh\n#!/bin/bash\n\ngofmt -w -r 'ioutil.Discard -\u003e io.Discard' .\ngofmt -w -r 'ioutil.NopCloser -\u003e io.NopCloser' .\ngofmt -w -r 'ioutil.ReadAll -\u003e io.ReadAll' .\ngofmt -w -r 'ioutil.ReadFile -\u003e os.ReadFile' .\ngofmt -w -r 'ioutil.TempDir -\u003e os.MkdirTemp' .\ngofmt -w -r 'ioutil.TempFile -\u003e os.CreateTemp' .\ngofmt -w -r 'ioutil.WriteFile -\u003e os.WriteFile' .\ngofmt -w -r 'ioutil.ReadDir -\u003e os.ReadDir ' . # (note: returns a slice of os.DirEntry rather than a slice of fs.FileInfo)\n\ngoimports -w .\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eFix linting problems in all your go repositories\u003c/summary\u003e\n\n```sh\n#!/bin/bash\n\ngolangci-lint run ./... --fix\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eUpdates a go module to a new (patch/minor) version\u003c/summary\u003e\n\n```sh\n#!/bin/bash\n\n### Change these values ###\nMODULE=github.com/go-git/go-git/v5\nVERSION=v5.1.0\n\n# Check if the module already exist, abort if it does not\ngo list -m $MODULE \u0026\u003e /dev/null\nstatus_code=$?\nif [ $status_code -ne 0 ]; then\n    echo \"Module \\\"$MODULE\\\" does not exist\"\n    exit 1\nfi\n\ngo get $MODULE@$VERSION\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eUpgrade Go version in go modules\u003c/summary\u003e\n\n```sh\n#!/bin/bash\n\ngo mod edit -go 1.18\ngo mod tidy\n```\n\u003c/details\u003e\n\n### node\n\n\u003cdetails\u003e\n  \u003csummary\u003eUpdates a npm dependency if it does exist\u003c/summary\u003e\n\n```sh\n#!/bin/bash\n\n### Change these values ###\nPACKAGE=webpack\nVERSION=4.43.0\n\nif [ ! -f \"package.json\" ]; then\n    echo \"package.json does not exist\"\n    exit 1\nfi\n\n# Check if the package already exist (without having to install all packages first), abort if it does not\ncurrent_version=`jq \".dependencies[\\\"$PACKAGE\\\"]\" package.json`\nif [ \"$current_version\" == \"null\" ];\nthen\n    echo \"Package \\\"$PACKAGE\\\" does not exist\"\n    exit 2\nfi\n\nnpm install --save $PACKAGE@$VERSION\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eSimple replace using node\u003c/summary\u003e\n\n```js\nconst { readFile, writeFile } = require(\"fs\").promises;\n\nasync function replace() {\n  let data = await readFile(\"./README.md\", \"utf8\");\n  data = data.replace(\"apple\", \"orange\");\n  await writeFile(\"./README.md\", data, \"utf8\");\n}\n\nreplace();\n```\n\u003c/details\u003e\n\n\nDo you have a nice script that might be useful to others? Please create a PR that adds it to the [examples folder](/examples).\n\n\n\u003cdetails\u003e\n\n\u003csummary\u003e Bitbucket Cloud \u003c/summary\u003e\n\n_note: bitbucket cloud support is currently in Beta_\n\nIn order to use bitbucket cloud you will need to create and use an [App Password](https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/) or [Workspace Token](https://support.atlassian.com/bitbucket-cloud/docs/access-tokens/). The app password or workspace token you create needs sufficient permissions so ensure you grant it Read and Write access to projects, repositories and pull requests and at least Read access to your account and workspace membership.\n\nYou will need to configure the bitbucket workspace using the `org` option for multi-gitter for the repositories you want to make changes to. You will also need to configure the authentication method using the `auth-type` flag e.g. `multi-gitter run examples/go/upgrade-go-version.sh -u your_username --org \"your_workspace\" --auth-type app-password`\n\n### Example\nHere is an example of using the command line options to run a script from the `examples/` directory and make pull-requests for a few repositories in a specified workspace, using app password authentication.\n```shell\nexport BITBUCKET_CLOUD_APP_PASSWORD=\"your_app_password\"\nmulti-gitter run examples/go/upgrade-go-version.sh -u your_username --org \"your_workspace\" --repo \"your_first_repository,your_second_repository\" --platform bitbucket_cloud -m \"your_commit_message\" -B your_branch_name --auth-type app-password\n```\n\nHere is an example of running the script using workspace token authentication.\n```shell\nexport BITBUCKET_CLOUD_WORKSPACE_TOKEN=\"your_workspace_token\"\nmulti-gitter run examples/go/upgrade-go-version.sh -u your_username --org \"your_workspace\" --repo \"your_first_repository,your_second_repository\" --platform bitbucket_cloud -m \"your_commit_message\" -B your_branch_name --auth-type workspace-token\n```\n\n### Bitbucket Cloud Limitations\nCurrently, we add the repositories default reviewers as a reviewer for any pull-request you create. If you want to specify specific reviewers, you will need to add them using their `UUID` instead of their username since bitbucket does not allow us to look up a `UUID` using their username. [This article has more information about where you can get a users UUID.](https://community.atlassian.com/t5/Bitbucket-articles/Retrieve-the-Atlassian-Account-ID-AAID-in-bitbucket-org/ba-p/2471787)\n\nWe don't support specifying specific projects for bitbucket cloud yet, you should still be able to make changes to the repositories you want but certain functionality, like forking, does not work as well until we implement that feature.\nUsing `fork: true` is currently experimental within multi-gitter for Bitbucket Cloud, and will be addressed in future updates.\nHere are the known limitations:\n- The forked repository will appear in the user-provided workspace/orgName, with the given repo name, but will appear in a random project within that workspace.\n- Using `git-type: cmd` is required for Bitbucket Cloud forking for now until better support is added, as `git-type: go` causes inconsistent behavior(intermittent unauthorized errors).\n\nWe also only support modifying a single workspace, any additional workspaces passed into the multi-gitter `org` option will be ignored after the first value.\n\nWe also have noticed the performance is slower with larger workspaces and we expect to resolve this when we add support for projects to make filtering repositories by project faster.\n\n\u003c/details\u003e\n","funding_links":[],"categories":["Tips, tricks, tools, and add-ons for GitHub power users","Go","Tools","Git Tools"],"sub_categories":["Comparing workflows","Polyrepo operations tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flindell%2Fmulti-gitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flindell%2Fmulti-gitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flindell%2Fmulti-gitter/lists"}