invoke AssignAccount for new account
+2. assign-account
这是个独立的service, 通过 RESTful API 从 mail-robot or CLI tool 接收JSON参数。
它不应该需要 ParseApplyAccountEmail.
可能你在这里想表达的意思是mail-robot直接调用的这些类代码,不是container/assign-account服务。 那么请把所有这里的assign字样去掉。别到处用,混淆概念。 其实我一直是受害者。这几个月就被绕的晕乎晕乎的。
assign这个动词只能用于container/assign-account服务。 该服务的调用者代码里,一律用apply。
ok, I will optimize it
Thanks, Luan Shengde
Thanks, Fengguang
- init my_info
- my_email
- my_name
- send_account
- parse_commit_url_pub_key
invoke ParseApplyAccountEmail
parse_commit_url
extract_commit_url
check whether there is a standard commit url
base_url_in_upstream_repos
check whether the repo's url in upstream-repos
commit_url_availability
check whether the commit url valid
- gitee_commit
clone the repo and check the commit
- non_gitee_commit(url)
check the commit with curl
parse_pub_key
check whether there is a ssh pub_key in the email file
attachment:
first attachment
file_name:
id_ras.pub
rescue error
error type:
- no commit url
- commit url not in upstream-repos
- commit url not available
- no pub_key
build_error_email with raised error message
send fail email
- apply_my_account
my_uuid
generate uuid
apply_account
invoke ApplyJumperAccount to apply new account with my_info and pub_key
my_info:
- my_email
- my_name
- my_uuid
apply_jumper_account
required data: pub_key
complete my_info
my_info add:
- my_login_name
- my_commit_url
store my_info
invoke es to store the apply infos
- send_mail
build_uuid_email
send mail
+3. continue the monitor
continue to monitor the mailbox for new email file
cycle run step 1 and 2 if matched email files
+4. service log
use the following command to get the logs
docker logs -f --tail=100 fluentd | grep mail-robot
-- 2.23.0