fleeto / issueflow

Workflow based on github issues.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

请教下翻译gitlab文档应如何配置

bubbleatgit opened this issue · comments

当前我的配置如下:

docker启动参数

version: '3'

services:
  chatbot:
    image: 'dustise/translat-chatbot:20190215-3'
    environment:
      - BOT_LOG_LEVEL=INFO
      - BOT_ADMINS=@tingshow163
      - REPOSITORY=gitlab-ce
      - REPOSITORY_CONFIG_FILE=/errbot/config/repository.yaml
      - MAX_RESULT=10
      - MAX_WRITE=30
      - TARGET_LANG="zh"
      - BOT_TOKEN=xoxb-xxxxxxx
      - BACKEND=Slack
      - CRITICAL_COMMANDS="find_new_files_in,find_updated_files_in,cache_issue"
      - OPERATORS="@bubble"
      - PRIVATE_COMMANDS="whatsnew,github_bind,github_whoami"
    volumes:
      - ./config:/errbot/config
      - ./data:/errbot/data
      - ./repository:/errorbot/repository

repository.yaml

repositories:
  gitlab-ce:
    github:
      owner: gitlab-ce-zher
      repository: gitlab-docs-official-translation
    valid_extensions:
    - ".md"
    - ".htm"
    - ".html"
    labels:
    - priority/P0
    branches:
    - name: "11.9"
      value: master
      path: "/errbot/repository/11.9"
      url_prefix:
        source: "https://github.com/gitlab-ce-zher/gitlabhq/tree/11-9-stable/"
      labels:
      - version/11.9
    source:
      name: en
      path: doc
    languages:
    - name: zh
      path: doc-zh
      labels:
      - lang/zh

使用上面的配置,在用!find new files in 11.9 时,报错如下:

chatbot_1  | Traceback (most recent call last):
chatbot_1  |   File "/usr/lib/python3.6/site-packages/errbot/core.py", line 455, in _execute_and_send
chatbot_1  |     for reply in replies:
chatbot_1  |   File "/usr/lib/python3.6/site-packages/errbot/__init__.py", line 377, in wrapper
chatbot_1  |     for reply in func(self, msg, *func_args, **func_kwargs):
chatbot_1  |   File "/errbot/plugins/transbot/transbot.py", line 289, in find_new_files_in
chatbot_1  |     REPOSITORY_NAME, branch, TARGET_LANG)
chatbot_1  |   File "/errbot/plugins/transbot/transutil/transutil.py", line 92, in find_new_files
chatbot_1  |     repository_name, language)["path"]
chatbot_1  | TypeError: 'NoneType' object is not subscriptable

REPOSITORY变量应该取什么值?

docker启动参数的环境变量 - TARGET_LANG="zh",删除zh的双引号即可