# octohot
A git command automation for multiple repositories
#### Installation
pip3 install octohot
# First use
Create a octohot.yml in an empty folder with organization name, your token and a optional
repo list.
#### octohot.yml example
github_organization: Hotmart-Org
github_token: <GITHUB_TOKEN>
repositories:
- git@github.com:organization/repo1.git
- git@github.com:organization/repo2.git
- git@github.com:organization/repo3.git
# Sync, replace and apply usage
octohot github org import # import all repositories from organization to octohot.yml
octohot sync # Clone, reset, delete unpushed Branches, pull all repos in octohot.yml
octohot regex find "[A-Z]*" # Find all upper case words
octohot regex replace "[0-9]*" "" # remove all numbers
octohot regex replace "foo" "baz" # replace foo to baz
octohot apply # Pull, branch, add, commit, push and make a optional PR
# Main commands
### Clone, reset, delete unpushed branches, pull all repos
octohot sync
### Pull, create branch, add, commit, push and make an optional PR on all branches
octohot apply
Some examples you can do:
```shell
$ octohot apply -pr <branch_from_pr> <PR title> <PR message>
Options:
$ octohot apply -pr --origin-branch main <pr_branch> <PR title> <PR message>
$ octohot apply -pr --default-branch <branch_from_pr> <PR title> <PR message>
```
> This case, if you choose for --default-branch, during the push, the branch that will be compared default_branch of the
> repository. If you choose for --origin-branch/-o, during the push, they will be the ones chosen to be compared
> (in order).
# All Commands
octohot --help
### git Provider
git provider for octohot
octohot git --help
Create/Change branch in all repos
octohot git branch
Clone all repos
octohot git clone
Commit added changes in all repos
octohot git commit
Get diff from all repos
octohot git diff
Pull all repos
octohot git pull
Push all repos
octohot git push
Reset all repos
octohot git reset
### GitHub Provider
GitHub provider for octohot
octohot github --help
Make a PR in all GitHub repos from a specific branch
octohot github pr
Import all repositories to octohot.yml config file from a Organization from
GitHub
octohot github org import
List all repositories to octohot.yml config file from a Organization from
GitHub
octohot github org list
### RegEx Provider
Perl RegEx provider for octohot
octohot regex --help
Find a regular expression in all repos and list files and matches
octohot regex find
Find and replace a string in all repos
octohot regex replace
## Contributing
Pull requests for new features, bug fixes and suggestions are welcome!
## License
GNU General Public License v3 (GPLv3)
Raw data
{
"_id": null,
"home_page": "https://github.com/Hotmart-Org/octohot",
"name": "octohot",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "git automation github repositories",
"author": "J\u00f4natas Renan Camilo Alves",
"author_email": "jonatas.alves@hotmart.com",
"download_url": "https://files.pythonhosted.org/packages/15/21/24ed4153b980ab250a9e4cdd820dedf9b99347b62fa55e0e4b1f172c22ce/octohot-0.0.12.tar.gz",
"platform": null,
"description": "# octohot\n\nA git command automation for multiple repositories\n\n#### Installation\n\n pip3 install octohot\n\n# First use\n\nCreate a octohot.yml in an empty folder with organization name, your token and a optional\nrepo list.\n#### octohot.yml example \n github_organization: Hotmart-Org\n github_token: <GITHUB_TOKEN>\n repositories:\n - git@github.com:organization/repo1.git\n - git@github.com:organization/repo2.git\n - git@github.com:organization/repo3.git\n\n# Sync, replace and apply usage\n\n octohot github org import # import all repositories from organization to octohot.yml\n octohot sync # Clone, reset, delete unpushed Branches, pull all repos in octohot.yml\n octohot regex find \"[A-Z]*\" # Find all upper case words\n octohot regex replace \"[0-9]*\" \"\" # remove all numbers\n octohot regex replace \"foo\" \"baz\" # replace foo to baz \n octohot apply # Pull, branch, add, commit, push and make a optional PR\n \n# Main commands\n\n### Clone, reset, delete unpushed branches, pull all repos\n\n octohot sync\n \n### Pull, create branch, add, commit, push and make an optional PR on all branches\n\n octohot apply\n\nSome examples you can do:\n```shell\n$ octohot apply -pr <branch_from_pr> <PR title> <PR message>\n\nOptions:\n$ octohot apply -pr --origin-branch main <pr_branch> <PR title> <PR message>\n$ octohot apply -pr --default-branch <branch_from_pr> <PR title> <PR message>\n```\n\n> This case, if you choose for --default-branch, during the push, the branch that will be compared default_branch of the\n> repository. If you choose for --origin-branch/-o, during the push, they will be the ones chosen to be compared \n> (in order).\n\n\n# All Commands\n \n octohot --help\n\n### git Provider\n\ngit provider for octohot\n\n octohot git --help\n \nCreate/Change branch in all repos\n\n octohot git branch\n\nClone all repos\n\n octohot git clone\n \nCommit added changes in all repos\n\n octohot git commit\n \nGet diff from all repos\n\n octohot git diff\n\nPull all repos\n\n octohot git pull\n \nPush all repos \n \n octohot git push\n \nReset all repos\n\n octohot git reset\n \n### GitHub Provider\n\nGitHub provider for octohot\n\n octohot github --help\n\nMake a PR in all GitHub repos from a specific branch\n\n octohot github pr\n \nImport all repositories to octohot.yml config file from a Organization from \nGitHub\n\n octohot github org import\n \nList all repositories to octohot.yml config file from a Organization from \nGitHub\n\n octohot github org list\n \n### RegEx Provider\n\nPerl RegEx provider for octohot\n \n octohot regex --help\n\nFind a regular expression in all repos and list files and matches\n\n octohot regex find\n \nFind and replace a string in all repos\n\n octohot regex replace \n\n## Contributing\n\nPull requests for new features, bug fixes and suggestions are welcome!\n\n## License\n\nGNU General Public License v3 (GPLv3)\n\n\n\n",
"bugtrack_url": null,
"license": "",
"summary": "A git command automation for multiple repositories",
"version": "0.0.12",
"split_keywords": [
"git",
"automation",
"github",
"repositories"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "152124ed4153b980ab250a9e4cdd820dedf9b99347b62fa55e0e4b1f172c22ce",
"md5": "282cb246fe9c528e54cac529528ae90c",
"sha256": "dcdeead5d0c60c09186e93c637a3f72d4d95492caab60ad74aa585e5da9d1ba7"
},
"downloads": -1,
"filename": "octohot-0.0.12.tar.gz",
"has_sig": false,
"md5_digest": "282cb246fe9c528e54cac529528ae90c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 23924,
"upload_time": "2023-03-14T13:35:31",
"upload_time_iso_8601": "2023-03-14T13:35:31.511782Z",
"url": "https://files.pythonhosted.org/packages/15/21/24ed4153b980ab250a9e4cdd820dedf9b99347b62fa55e0e4b1f172c22ce/octohot-0.0.12.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-14 13:35:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "Hotmart-Org",
"github_project": "octohot",
"lcname": "octohot"
}