dngg 0.0.9 → 0.1.0

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: 46475e5573f76ae8f910ca96f92148c2fd293604f025867361937654e6a3a687
4
- data.tar.gz: d7409ea217cb0d13cd383c41147e51f1f993ddcfaa927decc15102dddcc89d92
3
+ metadata.gz: e6d5f915a14b4aea8a2e33030f9ce394a6974189b43b0861e9fb833e4718a04e
4
+ data.tar.gz: fb05504fa11446623ec4f51e75d9c5f401d2ee300ecd6249d9ac946c47327f34
5
5
  SHA512:
6
- metadata.gz: d8a1e819c468466ffc54df57fe9556e00d1b43ca06fc237eb8f1e67b02e3016f1ffd25cd739d0fa967d95c068a314666d60cbb9f640d7acc9f48c7c97b795387
7
- data.tar.gz: 478f40447cd5cde885291b88def7f81baa5d463af8b4e31a4b44c4d7245035b202afba86e2f0b7fc3c5d43c68a8b1355823fae451efe17d1fcc6ad986be14090
6
+ metadata.gz: 6ac1a49dbd6ede11aca9be3f35347db2f8c23b4e457f472a7217206841034d6c950750300372157758deea1a4e463f21650e871a866197464708a82a63dbcae2
7
+ data.tar.gz: b181f805ff8643b96ae0fb3511ec6f663bf8eb50cc43d852d0cdbde295243f9797b379b11d48577aaa72f5301d6cb311cae5fd8c62e2f84cbcc45c6cc2f1e011
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dngg (0.0.9)
4
+ dngg (0.1.0)
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)
data/lib/dngg/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module DNGG
2
- VERSION = '0.0.9'
2
+ VERSION = '0.1.0'
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.9
4
+ version: 0.1.0
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-18 00:00:00.000000000 Z
11
+ date: 2021-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor