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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3b469c45fc263d9c573736eba519b34ae855058e47b77a01428e5da3330ce052
4
- data.tar.gz: cc4eb5ab5180c02022dff9df585d848cf51c1fab8914b0e129989b812501133b
3
+ metadata.gz: 7e190dad3a9fb10f985ea2536b22c03de35927a45bb26a45ce6ce4e49a87b13d
4
+ data.tar.gz: c7a7c41fab362a5f0bfdddbac0e0a4a75de2ded745a601787dd9a98e34e046df
5
5
  SHA512:
6
- metadata.gz: 0bfbf38a960e5b308f72b28e0962eebb0425fec3a15229c77f8a01b17353012fb988db35f47363cdea5ca57151a317c09b07e9ba999019fdff2ee7c940cb8aef
7
- data.tar.gz: e8952174c4e5921e3cb7dad0e98c0f72f466aac458b50342eefabf82fc4f87727610bb303dc4b6a4d454fd41cc64739455aafc2c2ace2bde5f68733bd9c5e7f9
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 是否单个提交(默认 true)
36
- # @option params [Array<String>, String] :branches 分支名称数组,服务端 CommitLogSendMessageDto 的字段
37
- # @option params [String] :branch 分支名称(单数形式,调用方便利写法,内部归一化为 branches)
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
@@ -1,3 +1,3 @@
1
1
  module JPSClient
2
- VERSION = '2.7.2'
2
+ VERSION = '2.7.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jpsclient
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.2
4
+ version: 2.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Your Name