dngg 0.0.8 → 1.0.1

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: be0dd6c12a2cc8781b3c7828027f5b67bd83f78daf766f9f6a8d4ebf6bf54fc1
4
- data.tar.gz: 31cbcf1c0f1d1f038fdefb657fe20ee90e6e8ca0530ee78c0124b056f9048dc5
3
+ metadata.gz: 91176d05b0f7accbc344f92f187a7da11bce1f6ec269286f3497f1a46e46d9d3
4
+ data.tar.gz: 96a75858b12bcc7aeb91c3f15bc5742d3d333eb3c0496ada02418fd25b09a129
5
5
  SHA512:
6
- metadata.gz: 3b1579fde8500f989b65ed7099a23219191ff47b3db321c084c341ed53be6e208e6091e2e5f09b50dbcf2cbab6136c5c55d86e17604a48d38b29153a83f3a90f
7
- data.tar.gz: 83f6698ec58560949c3c628856f080cf007f7fc4b25b42ebb36bc957a8ac88cd1de7f1d5c5221b20aeec91059c26a85737808f1a73b40ec21a74e05909e08df3
6
+ metadata.gz: ed67b851f9318ce81512581175d8df15b261d2e1f3d76881113191c8c870faa61b717c0eb79f2b0bb647774290938f8722d54c3382130230da37503ee594a011
7
+ data.tar.gz: dce0208c82d7fd0d9e8f74c2691d765561630bec0220d0bb89f46afe279860f86275657c434e4caf849edf54030833b9716075f5a2dee029e28c4ee4b5619c84
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dngg (0.0.8)
4
+ dngg (1.0.1)
5
5
  colorize (= 0.8.1)
6
6
  oj (= 3.8.0)
7
7
  thor (= 1.0.0)
@@ -18,8 +18,9 @@ module DNGG
18
18
  @@msg = ''
19
19
  @@urls = {}
20
20
  @@user = ''
21
+ @@assign = ''
21
22
 
22
- def mr_flow(target_branch, msg)
23
+ def mr_flow(target_branch, name, msg)
23
24
  check_submodule(false)
24
25
 
25
26
  @@current_branch = get_current_branch
@@ -33,6 +34,12 @@ module DNGG
33
34
  @@token = init_check_token
34
35
  @@msg = msg
35
36
 
37
+ git_id = Hash["luwenjun" => 1526, "zhuruixue" => 1859,"hehongqing"=> 1949, "machenfei"=> 2199,"tanhua"=> 2031,"wulei"=> 2014, "yangyanpeng"=> 1865,"yangfan"=> 1928,"yuezhiyu"=> 2569]
38
+
39
+ @@assign = git_id[name]
40
+ if @@assign.nil?
41
+ @@assign = git_id['luwenjun']
42
+ end
36
43
  foreach_module {|sub|
37
44
  create_mr(sub)
38
45
  }
@@ -95,7 +102,8 @@ module DNGG
95
102
  params['source_branch'] = @@current_branch
96
103
  params['target_branch'] = @@target_branch
97
104
  params['title'] = @@msg
98
- # params['remove_source_branch'] = true
105
+ params['assignee_id'] = @@assign
106
+
99
107
  uri = URI.parse("https://gitlab.qima-inc.com/api/v4/projects/#{project_name}/merge_requests?private_token=#{@@token}")
100
108
  response = Net::HTTP.post_form(uri, params)
101
109
  result = Oj.load(response.body)
@@ -8,6 +8,7 @@ def commit_check
8
8
  standards.each do |standard|
9
9
  check(standard)
10
10
  end
11
+ puts @msg.red
11
12
  puts '====> commit message不符合规范,请查看规范 https://naxg5qz90v.feishu.cn/wiki/wikcnGAC0ayqRw5SSyj6QFQESKb'.red
12
13
  exit 1
13
14
  end
@@ -16,12 +16,11 @@ module DNGG
16
16
  end
17
17
 
18
18
  def get_submodule
19
- pattern = /(?<=\s)[\/0-9a-zA-Z]*(?=\s)/
19
+ pattern = /(?<=\s)[\/0-9a-zA-Z\-]*(?=\s)/
20
20
 
21
21
  sub_status = `git submodule`
22
22
  sub_status = sub_status.split(/\n/)
23
23
  match = pattern.match(sub_status[0])
24
-
25
24
  if match==nil
26
25
  puts '==> 初始化子模块'.yellow
27
26
  `git submodule update --init --recursive`
data/lib/dngg/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module DNGG
2
- VERSION = '0.0.8'
2
+ VERSION = '1.0.1'
3
3
  end
data/lib/dngg.rb CHANGED
@@ -48,9 +48,9 @@ module DNGG
48
48
  finish_flow(force)
49
49
  end
50
50
 
51
- desc 'mr <branch> <title>', '创建MR'
52
- def mr(branch, title)
53
- mr_flow(branch, title)
51
+ desc 'mr <branch> <name> <title>', '创建MR'
52
+ def mr(branch, name, title)
53
+ mr_flow(branch, name, title)
54
54
  end
55
55
 
56
56
  desc 'switch <branch>', '切换分支'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dngg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - iSnow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-10 00:00:00.000000000 Z
11
+ date: 2021-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor