Issues Translate Action
将非英文 issue 实时翻译成英文 issue 的 action 。
github 仓库地址 - https://github.com/tomsun28/issues-translate-action
快速使用
使用默认的机器人账户 @Issues-translate-bot
创建一个 github action
在仓库的 .github/workflows/ 下创建 issue-translator.yml 如下:
name: 'issue-translator' on: issue_comment: types: [created] issues: types: [opened] jobs: build: runs-on: ubuntu-latest steps: - uses: tomsun28/[email protected] with: IS_MODIFY_TITLE: false # 非必须,决定是否需要修改 issue 标题内容 # 若是 true,则机器人账户 @Issues-translate-bot 必须拥有修改此仓库 issue 权限。可以通过邀请 @Issues-translate-bot 加入仓库协作者实现。 CUSTOM_BOT_NOTE: Bot detected the issue body's language is not English, translate it automatically. # 非必须,自定义机器人翻译的前缀开始内容。 高级自定义
通过配置 BOT_GITHUB_TOKEN 使用自定义的机器人账户
-
创建一个 github 账户作为您的机器人账户
-
使用此账户生成对应的 token 作为 BOT_GITHUB_TOKEN
-
将 BOT_GITHUB_TOKEN = ${token} 作为 Secrets BOT_GITHUB_TOKEN = ${token} 配置到您的仓库中
-
创建一个下面的 github action(在仓库的 .github/workflows/ 下创建 issue-translator.yml 如下)
name: 'issue-translator' on: issue_comment: types: [created] issues: types: [opened] jobs: build: runs-on: ubuntu-latest steps: - uses: tomsun28/[email protected] with: BOT_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} # 非必须,填写您的机器人 github 账户 token BOT_LOGIN_NAME: Issue-translate-bot # 非必须,建议不填写,机器人名称会根据 token 获取到,若填写,请一定与 token 对应的 github 账户名相同 