
On Thu, Oct 15, 2020 at 10:31:19AM +0800, Wu Fengguang wrote:
While these JSON field names look logical in DB context, they could be confusing when used in other context.
+ def store_account_info(sum_infos) + account_uuid_info = { + 'email' => sum_infos['email'], + 'name' => sum_infos['email'].split('@')[0], + 'uuid' => sum_infos['account_uuid'], + 'user' => sum_infos['acct_infos']['account'], + 'my_commit_url' => sum_infos['url'] + } + + es = ESClient.new(index: 'accounts') + es.put_source_by_id(sum_infos['email'], account_uuid_info)
Let's make the names more specific and use the specific names throughout the project consistently.
variable (or hash key) example value ============================================== my_email wfg@kernel.org my_name Wu Fengguang
will need user to add his/her name in the apply account email? if not, where can I get the "my_name"
my_commit_url https://gitee.com/wu_fengguang/compass-ci/commit/b14b8b5b2ba3c47d1bd13eaf734... my_uuid 88c756ad-9707-491b-b406-13515ffcb887 my_login_name hi1000
where the below vars should be set in the user's defaults config (.config/compass-ci/defaults/xxx.yaml), to be auto included in every job he/she submits.
my_name my_email my_uuid
Thanks, Fengguang