gitlab_merge_request 0.0.1 → 0.0.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
  SHA1:
3
- metadata.gz: a758a214532e1d5540aae86d98603e80584de919
4
- data.tar.gz: 455ad4f58ef0bf58beb90e66ab61e32408d4a33e
3
+ metadata.gz: 003d0c496a0f9f9155624d2fbeeddadb1c4fd8a8
4
+ data.tar.gz: df6eec68e1b08dd9b3828fd3f65cb958b0820f02
5
5
  SHA512:
6
- metadata.gz: 000f72a901c5a4124ecc475e3274ddf413d5e560aa8de56e8f052e2ccbf79ee46730d021286b8b5220c14d996abd031d8906963a598e7b77ef372516447b35af
7
- data.tar.gz: 15af86916fba125de585d8b4aac2788323f34919e1bca86445af87bf70de4169bddec2373adb7ba93cba93f1761654d5bb5219d2242712c4ec4f9a137bef056b
6
+ metadata.gz: b118d2dfbac13dd9ab3bc9f3b90556b5f456828c43e714a2ea32611ff7889fe34a75a87153e900e437ba037647b6062aed7db971134ba5a29d328494e0a60667
7
+ data.tar.gz: 96ddb4417e36d45913e73fe7473e80f88a9d15f36842e6b775d94e4e879789b1392e455b9c89e2cd97bce9a5f947b7fc1f689de99c5ec792ed92bd6f7c344545
data/bin/git-mr CHANGED
@@ -52,19 +52,19 @@ title = gets.chomp
52
52
  task_id = $1 if source_branch.match(/\At(\d+)_/)
53
53
 
54
54
  if task_id
55
- note_text = "#{task_url_template % task_id}\n"
55
+ description = "#{task_url_template % task_id}\n"
56
56
  end
57
57
 
58
58
  print "Text:
59
- #{note_text}"
59
+ #{description}"
60
60
  additional_text = STDIN.read.chomp
61
- note_text = (note_text.to_s + additional_text).chomp
61
+ description = (description.to_s + additional_text).chomp
62
62
 
63
63
  puts "Going to create merge request with following data (blank note will not be created):"
64
64
  ap source_branch: source_branch,
65
65
  target_branch: target_branch,
66
66
  title: title,
67
- note_text: note_text
67
+ description: description
68
68
  puts "Proceed? [Y/n]"
69
69
  answer = gets
70
70
 
@@ -72,12 +72,12 @@ case answer
72
72
  when nil,/[Nn]/
73
73
  puts "Merge request aborted"
74
74
  when "\n", /[Yy]/
75
- mr = Gitlab.create_merge_request(
76
- project_id,
77
- title,
78
- source_branch: source_branch,
79
- target_branch: target_branch)
80
- Gitlab.create_note("#{project_id}/merge_requests/#{mr.id}", note_text) unless note_text.blank?
75
+ options = {
76
+ source_branch: source_branch,
77
+ target_branch: target_branch,
78
+ }
79
+ options[:description] = description unless description.empty?
80
+ mr = Gitlab.create_merge_request(project_id, title, options)
81
81
  mr_url = "#{Gitlab.project(project_id).web_url}/merge_requests/#{mr.id}"
82
82
  puts "Created merge request: #{mr_url}"
83
83
  end
@@ -52,19 +52,19 @@ title = gets.chomp
52
52
  task_id = $1 if source_branch.match(/\At(\d+)_/)
53
53
 
54
54
  if task_id
55
- note_text = "#{task_url_template % task_id}\n"
55
+ description = "#{task_url_template % task_id}\n"
56
56
  end
57
57
 
58
58
  print "Text:
59
- #{note_text}"
59
+ #{description}"
60
60
  additional_text = STDIN.read.chomp
61
- note_text = (note_text.to_s + additional_text).chomp
61
+ description = (description.to_s + additional_text).chomp
62
62
 
63
63
  puts "Going to create merge request with following data (blank note will not be created):"
64
64
  ap source_branch: source_branch,
65
65
  target_branch: target_branch,
66
66
  title: title,
67
- note_text: note_text
67
+ description: description
68
68
  puts "Proceed? [Y/n]"
69
69
  answer = gets
70
70
 
@@ -72,12 +72,12 @@ case answer
72
72
  when nil,/[Nn]/
73
73
  puts "Merge request aborted"
74
74
  when "\n", /[Yy]/
75
- mr = Gitlab.create_merge_request(
76
- project_id,
77
- title,
78
- source_branch: source_branch,
79
- target_branch: target_branch)
80
- Gitlab.create_note("#{project_id}/merge_requests/#{mr.id}", note_text) unless note_text.blank?
75
+ options = {
76
+ source_branch: source_branch,
77
+ target_branch: target_branch,
78
+ }
79
+ options[:description] = description unless description.empty?
80
+ mr = Gitlab.create_merge_request(project_id, title, options)
81
81
  mr_url = "#{Gitlab.project(project_id).web_url}/merge_requests/#{mr.id}"
82
82
  puts "Created merge request: #{mr_url}"
83
83
  end
@@ -1,3 +1,3 @@
1
1
  module GitlabMergeRequest
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab_merge_request
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ales Guzik