jpsclient 2.7.2 → 2.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/jpsclient/api/commit_log.rb +14 -14
- data/lib/jpsclient/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7e190dad3a9fb10f985ea2536b22c03de35927a45bb26a45ce6ce4e49a87b13d
|
|
4
|
+
data.tar.gz: c7a7c41fab362a5f0bfdddbac0e0a4a75de2ded745a601787dd9a98e34e046df
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f4ef3da2ea5cc2c413213722d2d529a1f93ed334d1739d817d8eadc2faa5945c8783737f6200095e315f227456c7b2fe0d341a0262e9a9facba32ca671824ae0
|
|
7
|
+
data.tar.gz: 75a7071f7117f8e15a7b4cca95dbd88dfaf1a116513b735b301e6a23bccd1c75535ae6313f52f96191fb2c3971f8a6399a3c379b8f802cc5e3eb3842c571c09b
|
|
@@ -27,18 +27,21 @@ module JPSClient
|
|
|
27
27
|
return request_with_auth(:post, path, body: body_params)
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
#
|
|
30
|
+
# 发送提交记录消息通知(commit_log/send_message)
|
|
31
|
+
#
|
|
32
|
+
# 以线上真实请求为准:接口文档可能滞后。
|
|
31
33
|
#
|
|
32
34
|
# @param projectId [String] 项目ID(必需)
|
|
33
35
|
# @param workflowId [Integer] 工作流ID(必需)
|
|
34
36
|
# @param params [Hash] 其他参数
|
|
35
|
-
# @option params [Boolean] :single
|
|
36
|
-
# @option params [Array<
|
|
37
|
-
# @option params [String] :branch
|
|
38
|
-
# @option params [Array<String>] :commitIds 提交ID
|
|
39
|
-
# @option params [Integer] :startTimestamp
|
|
40
|
-
# @option params [Integer] :endTimestamp
|
|
41
|
-
# @option params [Integer] :indexNo
|
|
37
|
+
# @option params [Boolean] :single 是否单条提交发送(默认 true)
|
|
38
|
+
# @option params [Array<Integer>] :ids commit_log 记录 ID 集合
|
|
39
|
+
# @option params [String] :branch 分支名称,空字符串也需要原样发送
|
|
40
|
+
# @option params [Array<String>] :commitIds 提交ID集合,single=true 时必传(取第一个)
|
|
41
|
+
# @option params [Integer] :startTimestamp 提交时间下界(epoch 毫秒,闭区间,仅 single=false)
|
|
42
|
+
# @option params [Integer] :endTimestamp 提交时间上界(epoch 毫秒,开区间,仅 single=false)
|
|
43
|
+
# @option params [Integer] :indexNo 项目包索引号
|
|
44
|
+
# @option params [Array<String>] :repoTypes 仓库类型过滤(仅 single=false)
|
|
42
45
|
# @return [Hash] API响应
|
|
43
46
|
def send_commit_log_message(projectId:, workflowId:, params: {})
|
|
44
47
|
config = @request_config && @request_config["commit_log_send_message"]
|
|
@@ -51,16 +54,13 @@ module JPSClient
|
|
|
51
54
|
single: params.fetch(:single, true)
|
|
52
55
|
}
|
|
53
56
|
|
|
54
|
-
|
|
55
|
-
# 服务端 CommitLogSendMessageDto 只有 branches 数组字段,branch 单数会被直接丢弃,
|
|
56
|
-
# 因此单数写法在这里归一化为数组,不再原样透传
|
|
57
|
-
branches = params[:branches] || params[:branch]
|
|
58
|
-
body_params[:branches] = Array(branches).compact if branches
|
|
59
|
-
|
|
57
|
+
body_params[:ids] = params[:ids] if params[:ids]
|
|
60
58
|
body_params[:commitIds] = params[:commitIds] if params[:commitIds]
|
|
59
|
+
body_params[:branch] = params[:branch] if params.key?(:branch)
|
|
61
60
|
body_params[:startTimestamp] = params[:startTimestamp] if params[:startTimestamp]
|
|
62
61
|
body_params[:endTimestamp] = params[:endTimestamp] if params[:endTimestamp]
|
|
63
62
|
body_params[:indexNo] = params[:indexNo] if params[:indexNo]
|
|
63
|
+
body_params[:repoTypes] = params[:repoTypes] if params[:repoTypes]
|
|
64
64
|
|
|
65
65
|
return request_with_auth(:post, path, body: body_params)
|
|
66
66
|
end
|
data/lib/jpsclient/version.rb
CHANGED