0.0.1 • Published 1 year ago

@afuteam-nx/plugin-add-hooks v0.0.1

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

plugin-add-hooks

批量给项目仓库添加 webHooks

环境

本插件基于 nx 开发,请在对应初始化好的 your-app 中使用;

安装

pnpm i @afuteam-nx/plugin-add-hooks -D

配置

# 在 apps/your-app/project.json 中配置
"targets": {
  "fetch-repos": {
    "executor": "@afuteam-nx/plugin-add-hooks:run",
    "options": {
        "NODE_ENV": "production", // production  test local
        "GITLAB_URL": "",
        "HOOK_URL_LOCAL": "",
        "HOOK_URL_PROD": "",
        "HOOK_URL_TEST": "",
        "GITLAB_TOKEN": "",
        "WEBHOOK_TOKEN_LOCAL": "",
        "WEBHOOK_TOKEN_PROD": "",
        "WEBHOOK_TOKEN_TEST": "",
        "localFileRepoListPath": "",
        "DING_LOCAL_secretKey": "",
        "DING_PROD_secretKey": "",
        "DING_LOCAL_robotswebhook": "",
        "DING_PROD_robotswebhook": ""
    }
  }
}

使用

nx run your-app:add-hooks

文件数据结构

allProjects.json

[
  {
    "id": "",
    "name": "",
    "created_at": "",
    "last_activity_at": "",
    "name": "",
    "web_url": ""
  }
]
0.0.1

1 year ago