请教下翻译gitlab文档应如何配置
bubbleatgit opened this issue · comments
愿圣光忽悠着你 commented
当前我的配置如下:
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
Vincent commented
REPOSITORY 变量错了
愿圣光忽悠着你 <notifications@github.com>于2019年3月7日 周四09:40写道:
当前我的配置如下:
docker启动参数
version: '3'
services:
chatbot:
image: 'dustise/translat-chatbot:20190215-3'
environment:
- BOT_LOG_LEVEL=INFO
- ***@***.***
- REPOSITORY=gitlabhq
- 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"
- ***@***.***"
- 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 | File "/errbot/plugins/transbot/gitutil/configure.py", line 57, in get_languages
chatbot_1 | repo_data = self._get_repository(repository_name)
chatbot_1 | File "/errbot/plugins/transbot/gitutil/configure.py", line 16, in _get_repository
chatbot_1 | return self.__configure_object["repositories"][repository_name]
chatbot_1 | KeyError: 'gitlabhq'
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGotjTAgsFGYZh9sdXUCfa_QttIUtiWyks5vUG3ngaJpZM4biLLi>
.
--
*-------------------*
*B.R*
*Vincent*
愿圣光忽悠着你 commented
REPOSITORY
变量应该取什么值?
愿圣光忽悠着你 commented
docker启动参数的环境变量 - TARGET_LANG="zh"
,删除zh的双引号即可