neetob 0.3.1 → 0.3.2

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: c24a5c688914c96c2ab4652e673124a9f794e1cdb57ca86e606e61134717b015
4
- data.tar.gz: b66c79be8be99068e154fdd811556fa3a6dc947f9f8ac232fdc82654241236b5
3
+ metadata.gz: 33a5009ec9b17cb67db7709598632c5001f487460c4a393ff4415c657f8f2a26
4
+ data.tar.gz: 7ef5bae6ffe881a4b3507865b35c56a68beb35cc0af5114cd348c163678fcc1d
5
5
  SHA512:
6
- metadata.gz: d07b6d3b394a6ce90d6feaa8031c506bb49be5bdcf076761cdc1c55b9e555400cc9fafdb766816de82d4bfbc438e8e8a3784c9c2c94d4ab49a3c66795f5f4da0
7
- data.tar.gz: 8fbfe0585f64116cd3404873d19a7518e034ffe250d789c5775bc6186c808bcf88c1407e10cbca5c73fe1333ef069642095577c3142054ef2fc6260cd90ee33b
6
+ metadata.gz: 89aec8ad58378aef387e4bf6a2ac5b8bbc40cb15432a4c884b1ba05e752f660c0a8785b3021bdc98e85c193bfa8b505f36b5ba68ae428af08a36a2634e2112fb
7
+ data.tar.gz: e4831981bfc7e6136489583f91f592aa2ff1931b9d248cfd3d2683a3128931fe9b1e5b58a6f94906d3d2a7c6e60923f125534b89cf0f17b00ceb3dd6e3a54e10
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ### [0.3.2](https://www.github.com/bigbinary/neetob/compare/v0.3.1...v0.3.2) (2023-03-29)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * Added multiline input format logic for issue create command ([#236](https://www.github.com/bigbinary/neetob/issues/236)) ([71f1442](https://www.github.com/bigbinary/neetob/commit/71f1442ff92938bb84661c42853fb6f72bbc8fba))
9
+
3
10
  ### [0.3.1](https://www.github.com/bigbinary/neetob/compare/v0.3.0...v0.3.1) (2023-03-23)
4
11
 
5
12
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- neetob (0.3.1)
4
+ neetob (0.3.2)
5
5
  dotenv (~> 2.8.1)
6
6
  launchy (~> 2.5.0)
7
7
  octokit (~> 4.0)
@@ -30,7 +30,7 @@ module Neetob
30
30
  end
31
31
 
32
32
  desc "create", "Create a issue in the Github repos"
33
- option :title, type: :string, required: true, aliases: "-t", desc: "Title of the issue"
33
+ option :title, type: :string, aliases: "-t", desc: "Title of the issue"
34
34
  option :description, type: :string, aliases: "-d", desc: "Description of the issue"
35
35
  option :assignee, type: :string, desc: "Username of the user you want to assign this issue."
36
36
  option :labels, type: :string, desc: "List of comma separated labels you want to add in this issue. Example: \"--labels bug,ui\""
@@ -20,12 +20,13 @@ sandbox = false)
20
20
  @issue_assignee = issue_assignee
21
21
  @issue_labels = issue_labels
22
22
  @sandbox = sandbox
23
+ get_issue_title_or_description_and_confirm_data
23
24
  end
24
25
 
25
26
  def run
26
27
  matching_repos = find_all_matching_apps_or_repos(repos, :github, sandbox)
27
28
  matching_repos.each do |repo|
28
- ui.info("\n Creating issue in \"#{repo}\" \n")
29
+ ui.info("\nCreating issue in \"#{repo}\" \n")
29
30
  begin
30
31
  issue_options = { assignee: issue_assignee, labels: issue_labels }
31
32
  issue = client.create_issue(repo, issue_title, issue_description, issue_options)
@@ -35,6 +36,28 @@ sandbox = false)
35
36
  end
36
37
  end
37
38
  end
39
+
40
+ private
41
+
42
+ def get_issue_title_or_description_and_confirm_data
43
+ until issue_title.present?
44
+ ui.info("Enter the issue title below. Once you are done then just press enter:\n~ ")
45
+ @issue_title = STDIN.gets.chomp
46
+ ui.say("Title can't be blank.") if issue_title.blank?
47
+ end
48
+ if issue_description.blank?
49
+ ui.info(
50
+ "Enter the issue body below. Once you are done then press Ctrl-D: " +
51
+ "(While creating the issue body you can use the enter key to type multiline message)\n")
52
+ @issue_description = STDIN.read.chomp
53
+ end
54
+ ui.info(
55
+ "Please review the issue title & the issue body that you have typed and also check the repos " +
56
+ "for which issues will be created. If everything looks good then type " +
57
+ "\"proceed\" below. Type anything else to cancel the operation.\n~ ")
58
+ proceed = STDIN.gets.chomp
59
+ ui.error("Cancelled creating issue(s)") and exit(true) if proceed.casecmp?("proceed") == false
60
+ end
38
61
  end
39
62
  end
40
63
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Neetob
4
- VERSION = "0.3.1"
4
+ VERSION = "0.3.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neetob
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Udai Gupta
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-03-23 00:00:00.000000000 Z
11
+ date: 2023-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor