1 个不稳定版本
0.1.0 | 2021年3月20日 |
---|
#26 in #refactoring
38KB
912 代码行
我来修复了!
这是一个用于自动化组织仓库重复性任务的工具。
它做什么
当你提供计划时,流程如下
- 从你的组织中获取仓库列表。
- 应用仓库和拒绝仓库过滤器
- 在缓存文件夹中克隆它们
- 切换到默认分支
- 拉取更改(因为这是缓存的,最好确保它有最新的更改)
- 检出到你想要的分支
- 遍历文件并运行所有处理器
- 提交更改
- 推送
- 打开拉取请求
- 盈利!
用法
there-i-fixed-it 0.1.0
USAGE:
there-i-fixed-it [FLAGS] --plan-file <plan-file>
FLAGS:
-h, --help Prints help information
-s, --skip-repository-cache
-V, --version Prints version information
OPTIONS:
-f, --plan-file <plan-file>
计划的示例
branch_name = "automated/update-flag"
git_message = "chore: Update flag that should be false"
pull_request_title = "Update flag that should be false" # Optional, if missing git_message is used
pull_request_body = "This updates the flag that should be false @jaysonsantos."
repositories = ["my-repo"] # Also works with globs like python-*, *-rs, or *
deny_repositories = [
] # Optional, if present it runs after the above filter to remove denied repositories
[provider]
name = "github" # Only github is implemented but others should be easy to implement
user = "user-name"
token = "token"
organization = "my-organization"
[[files]]
glob = "terraform/**/*.tf"
processors = [
{ type = "regex", operations = [
{ from = "(delete_everything\\W+=\\W+)true", to = "${1}false" },
] }
]
# You can have multiple [[files]]
[[files]]
glob = "**.py"
processors = [
{ type = "regex", operations = [
{ from = "(def\\W+)wrong_function_name", to = "${1}right_function_name" }
] }
]
免责声明
不提供任何保证!
依赖关系
~15–30MB
~456K SLoC