geet 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 24a7f62fafb16b3920cb80f2f8d426cab3122fa6
4
- data.tar.gz: 1ee1a9199b4ded572993b15b437efeb70cf9ab98
3
+ metadata.gz: 810fe20ea861a01c88e0cad7fc14bfbb92ee7bf1
4
+ data.tar.gz: 6aebe64e41a3fc69e6e6e8628d1d3d4bf74a2723
5
5
  SHA512:
6
- metadata.gz: 37a3767213474b09a881ce84074d3f48240870bfd404f8b12609f78153d41ab995630445dd9901cba750c50b307db5cd2c303f7b2c45c607cd12c4f8d5798e67
7
- data.tar.gz: 4f8686315885d94a7aae287432b4b9d1c3b1afcbc0ffaa20d937b9d50538817602481546c968b6f797e0f8877860eb2f9cdb9cc89ac55b28c21eeee54b83e644
6
+ metadata.gz: 37d3ef70153f9ff4fa010c3e28883e4e3f5d1ba896e737c6f6597cdfceb9d8e986ab5f1c5cdf2d5c4f1dd179bd1a871e0edf6cf89f98b655b3ab83ca890f5329
7
+ data.tar.gz: c76276bb1bf6d9147e17fa92eb49baca3cd7f96a90a3c1786b4b6c60964ab24c6daca1df5e1a7164f69f3bebe09cb3683de26c1498b538b1c8f243a8575680d9
@@ -2,6 +2,10 @@ language: ruby
2
2
  rvm:
3
3
  - 2.3
4
4
  - 2.4
5
+ - 2.5
5
6
  # API tokens are always required, but not used in testing, since no requests are actually made.
6
7
  env:
7
8
  - GITHUB_API_TOKEN=phony GITLAB_API_TOKEN=phony
9
+ # Bundler+Rubygems issue; see https://github.com/travis-ci/travis-ci/issues/8978
10
+ before_install:
11
+ - gem update --system
data/bin/geet CHANGED
@@ -5,6 +5,7 @@ require_relative '../lib/geet/commandline/configuration.rb'
5
5
  require_relative '../lib/geet/commandline/commands.rb'
6
6
  require_relative '../lib/geet/commandline/editor.rb'
7
7
  require_relative '../lib/geet/git/repository.rb'
8
+ require_relative '../lib/geet/utils/git.rb'
8
9
  Dir[File.join(__dir__, '../lib/geet/services/*.rb')].each { |filename| require filename }
9
10
 
10
11
  class GeetLauncher
@@ -33,13 +34,18 @@ class GeetLauncher
33
34
 
34
35
  Services::CreateLabel.new.execute(repository, name, options)
35
36
  when ISSUE_LIST_COMMAND
36
- Services::ListIssues.new.execute(repository)
37
+ Services::ListIssues.new.execute(repository, options)
37
38
  when LABEL_LIST_COMMAND
38
39
  Services::ListLabels.new.execute(repository)
39
40
  when MILESTONE_LIST_COMMAND
40
41
  Services::ListMilestones.new.execute(repository)
41
42
  when PR_CREATE_COMMAND
42
- title, description = Commandline::Editor.new.edit_summary
43
+ # Tricky. It would be best to have Git logic exlusively inside the services,
44
+ # but at the same time, the summary editing should be out.
45
+ git = Utils::Git.new(repository)
46
+ summary = git.cherry('master').size == 1 ? git.show_description('HEAD') : ''
47
+
48
+ title, description = Commandline::Editor.new.edit_summary(summary: summary)
43
49
  options[:milestone_pattern] = options.delete(:milestone) if options.key?(:milestone)
44
50
 
45
51
  Services::CreatePr.new.execute(repository, title, description, options)
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.platform = Gem::Platform::RUBY
11
11
  s.required_ruby_version = '>= 2.3.0'
12
12
  s.authors = ['Saverio Miroddi']
13
- s.date = '2017-12-30'
13
+ s.date = '2018-01-14'
14
14
  s.email = ['saverio.pub2@gmail.com']
15
15
  s.homepage = 'https://github.com/saveriomiroddi/geet'
16
16
  s.summary = 'Commandline interface for performing SCM (eg. GitHub) operations (eg. PR creation).'
@@ -35,6 +35,7 @@ module Geet
35
35
  ].freeze
36
36
 
37
37
  ISSUE_LIST_OPTIONS = [
38
+ ['-a', '--assignee-pattern john', 'Assignee pattern'],
38
39
  ['-u', '--upstream', 'List on the upstream repository'],
39
40
  ].freeze
40
41
 
@@ -48,7 +49,8 @@ module Geet
48
49
  ['-m', '--milestone number_or_pattern', 'Milestone number or description pattern'],
49
50
  ['-r', '--reviewer-patterns john,tom,adrian,kevin', 'Reviewer login patterns'],
50
51
  ['-u', '--upstream', 'Create on the upstream repository'],
51
- long_help: 'The default editor will be opened for editing title and description.'
52
+ long_help: 'The default editor will be opened for editing title and description; if the PR adds one commit only, '\
53
+ 'the content will be prepopulated with the commit description.'
52
54
  ]
53
55
 
54
56
  PR_LIST_OPTIONS = [
@@ -18,8 +18,10 @@ module Geet
18
18
  # A summary is a composition with a title and an optional description;
19
19
  # if the description is not found, a blank string is returned.
20
20
  #
21
- def edit_summary
22
- raw_summary = edit_content_in_default_editor(IO.read(SUMMARY_TEMPLATE))
21
+ def edit_summary(summary: '')
22
+ full_summary = summary + IO.read(SUMMARY_TEMPLATE)
23
+
24
+ raw_summary = edit_content_in_default_editor(full_summary)
23
25
 
24
26
  split_raw_summary(raw_summary)
25
27
  end
@@ -40,6 +40,7 @@ module Geet
40
40
  end
41
41
 
42
42
  def create_issue(title, description)
43
+ ask_confirm_action if location_action_with_upstream_repository?
43
44
  attempt_provider_call(:Issue, :create, title, description, api_interface)
44
45
  end
45
46
 
@@ -55,8 +56,8 @@ module Geet
55
56
  attempt_provider_call(:AbstractIssue, :list, api_interface, milestone: milestone)
56
57
  end
57
58
 
58
- def issues
59
- attempt_provider_call(:Issue, :list, api_interface)
59
+ def issues(assignee: nil)
60
+ attempt_provider_call(:Issue, :list, api_interface, assignee: assignee)
60
61
  end
61
62
 
62
63
  def milestone(number)
@@ -68,6 +69,7 @@ module Geet
68
69
  end
69
70
 
70
71
  def create_pr(title, description, head)
72
+ ask_confirm_action if location_action_with_upstream_repository?
71
73
  attempt_provider_call(:PR, :create, title, description, head, api_interface)
72
74
  end
73
75
 
@@ -111,6 +113,17 @@ module Geet
111
113
  remote_url
112
114
  end
113
115
 
116
+ # "Lightweight" version of #remote.
117
+ # Doesn't sanity check for the remote url format; this action is for querying
118
+ # purposes, any any action that needs to work with the remote, uses #remote.
119
+ #
120
+ def has_remote?(name)
121
+ gitdir_option = "--git-dir #{@location.shellescape}/.git" if @location
122
+ remote_url = `git #{gitdir_option} ls-remote --get-url #{name}`.strip
123
+
124
+ remote_url != name
125
+ end
126
+
114
127
  # PROVIDER
115
128
 
116
129
  def extract_env_api_token
@@ -173,6 +186,16 @@ module Geet
173
186
 
174
187
  remote(remote_name)[REMOTE_ORIGIN_REGEX, 3]
175
188
  end
189
+
190
+ def ask_confirm_action
191
+ puts "WARNING! The action will be performed on a fork, but an upstream repository has been found!"
192
+ print "Press Enter to continue, or Ctrl+C to exit now."
193
+ gets
194
+ end
195
+
196
+ def location_action_with_upstream_repository?
197
+ has_remote?('upstream') && !@upstream
198
+ end
176
199
  end
177
200
  end
178
201
  end
@@ -22,9 +22,12 @@ module Geet
22
22
 
23
23
  # See https://developer.github.com/v3/issues/#list-issues-for-a-repository
24
24
  #
25
- def self.list(api_interface, only_issues: false, milestone: nil)
25
+ def self.list(api_interface, only_issues: false, milestone: nil, assignee: nil)
26
26
  api_path = 'issues'
27
- request_params = { milestone: milestone } if milestone
27
+
28
+ request_params = {}
29
+ request_params[:milestone] = milestone if milestone
30
+ request_params[:assignee] = assignee if assignee
28
31
 
29
32
  response = api_interface.send_request(api_path, params: request_params, multipage: true)
30
33
 
@@ -19,8 +19,8 @@ module Geet
19
19
 
20
20
  # See https://developer.github.com/v3/issues/#list-issues-for-a-repository
21
21
  #
22
- def self.list(api_interface)
23
- super(api_interface, only_issues: true)
22
+ def self.list(api_interface, assignee: nil)
23
+ super(api_interface, only_issues: true, assignee: assignee)
24
24
  end
25
25
  end
26
26
  end
@@ -11,7 +11,9 @@ module Geet
11
11
  @link = link
12
12
  end
13
13
 
14
- def self.list(api_interface)
14
+ def self.list(api_interface, assignee: nil)
15
+ raise "Assignee filtering not currently supported!" if assignee
16
+
15
17
  api_path = "projects/#{api_interface.path_with_namespace(encoded: true)}/issues"
16
18
 
17
19
  response = api_interface.send_request(api_path, multipage: true)
@@ -3,13 +3,29 @@
3
3
  module Geet
4
4
  module Services
5
5
  class ListIssues
6
- def execute(repository, output: $stdout)
7
- issues = repository.issues
6
+ def execute(repository, assignee_pattern: nil, output: $stdout, **)
7
+ assignee_thread = find_assignee(repository, assignee_pattern, output) if assignee_pattern
8
+
9
+ assignee = assignee_thread&.join&.value
10
+
11
+ issues = repository.issues(assignee: assignee)
8
12
 
9
13
  issues.each do |issue|
10
14
  output.puts "#{issue.number}. #{issue.title} (#{issue.link})"
11
15
  end
12
16
  end
17
+
18
+ private
19
+
20
+ def find_assignee(repository, assignee_pattern, output)
21
+ output.puts 'Finding assignee...'
22
+
23
+ Thread.new do
24
+ collaborators = repository.collaborators
25
+ collaborator = collaborators.find { |collaborator| collaborator =~ /#{assignee_pattern}/i }
26
+ collaborator || raise("No collaborator found for pattern: #{assignee_pattern.inspect}")
27
+ end
28
+ end
13
29
  end
14
30
  end
15
31
  end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'shellwords'
4
+
5
+ module Geet
6
+ module Utils
7
+ # Represents the git program interface; used for performing git operations.
8
+ #
9
+ class Git
10
+ def initialize(repository)
11
+ @repository = repository
12
+ end
13
+
14
+ # Return the commit shas between HEAD and `limit`, excluding the already applied commits
15
+ # (which start with `-`)
16
+ #
17
+ def cherry(limit)
18
+ raw_commits = `git cherry #{limit.shellescape}`.strip
19
+
20
+ raw_commits.split("\n").grep(/^\+/).map { |line| line[3..-1] }
21
+ end
22
+
23
+ # Show the description ("<subject>\n\n<body>") for the given git object.
24
+ #
25
+ def show_description(object)
26
+ `git show --quiet --format='%s\n\n%b' #{object.shellescape}`.strip
27
+ end
28
+ end
29
+ end
30
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Geet
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
@@ -10,7 +10,7 @@ describe Geet::Services::ListIssues do
10
10
  let(:upstream_repository) { Geet::Git::Repository.new(upstream: true) }
11
11
 
12
12
  context 'with github.com' do
13
- it 'should list the issues' do
13
+ it 'should list the default issues' do
14
14
  allow(repository).to receive(:remote).with('origin').and_return('git@github.com:donaldduck/testrepo')
15
15
 
16
16
  expected_output = <<~STR
@@ -31,6 +31,30 @@ describe Geet::Services::ListIssues do
31
31
  expect(actual_issue_numbers).to eql(expected_issue_numbers)
32
32
  end
33
33
 
34
+ context 'with assignee filtering' do
35
+ it 'should list the issues' do
36
+ allow(repository).to receive(:remote).with('origin').and_return('git@github.com:donaldduck/testrepo_gh')
37
+
38
+ expected_output = <<~STR
39
+ Finding assignee...
40
+ 12. test issue 3 (https://github.com/donaldduck/testrepo_gh/issues/12)
41
+ 10. test issue 1 (https://github.com/donaldduck/testrepo_gh/issues/10)
42
+ STR
43
+ expected_issue_numbers = [12, 10]
44
+
45
+ actual_output = StringIO.new
46
+
47
+ service_result = VCR.use_cassette('github_com/list_issues_with_assignee') do
48
+ described_class.new.execute(repository, assignee_pattern: 'donald-fr', output: actual_output)
49
+ end
50
+
51
+ actual_issue_numbers = service_result.map(&:number)
52
+
53
+ expect(actual_output.string).to eql(expected_output)
54
+ expect(actual_issue_numbers).to eql(expected_issue_numbers)
55
+ end
56
+ end
57
+
34
58
  it 'should list the upstream issues' do
35
59
  allow(upstream_repository).to receive(:remote).with('origin').and_return('git@github.com:donaldduck/testrepo_2f')
36
60
  allow(upstream_repository).to receive(:remote).with('upstream').and_return('git@github.com:donald-fr/testrepo_u')
@@ -0,0 +1,155 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.github.com/repos/donaldduck/testrepo_gh/collaborators
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept-Encoding:
11
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
+ Accept:
13
+ - application/vnd.github.v3+json
14
+ User-Agent:
15
+ - Ruby
16
+ Host:
17
+ - api.github.com
18
+ Authorization:
19
+ - Basic <GITHUB_CREDENTIALS>
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Server:
26
+ - GitHub.com
27
+ Date:
28
+ - Fri, 05 Jan 2018 22:08:21 GMT
29
+ Content-Type:
30
+ - application/json; charset=utf-8
31
+ Transfer-Encoding:
32
+ - chunked
33
+ Status:
34
+ - 200 OK
35
+ X-Ratelimit-Limit:
36
+ - '5000'
37
+ X-Ratelimit-Remaining:
38
+ - '4974'
39
+ X-Ratelimit-Reset:
40
+ - '1515191050'
41
+ Cache-Control:
42
+ - private, max-age=60, s-maxage=60
43
+ Vary:
44
+ - Accept, Authorization, Cookie, X-GitHub-OTP
45
+ Etag:
46
+ - W/"46dff1ccc47eba7864e9695443ac0ecd"
47
+ X-Oauth-Scopes:
48
+ - admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook,
49
+ delete_repo, gist, notifications, repo, user
50
+ X-Accepted-Oauth-Scopes:
51
+ - ''
52
+ X-Github-Media-Type:
53
+ - github.v3; format=json
54
+ Access-Control-Expose-Headers:
55
+ - ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining,
56
+ X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
57
+ Access-Control-Allow-Origin:
58
+ - "*"
59
+ Content-Security-Policy:
60
+ - default-src 'none'
61
+ Strict-Transport-Security:
62
+ - max-age=31536000; includeSubdomains; preload
63
+ X-Content-Type-Options:
64
+ - nosniff
65
+ X-Frame-Options:
66
+ - deny
67
+ X-Xss-Protection:
68
+ - 1; mode=block
69
+ X-Runtime-Rack:
70
+ - '0.046658'
71
+ X-Github-Request-Id:
72
+ - C360:1BD7D:6A56AF:DE8FF0:5A4FF755
73
+ body:
74
+ encoding: ASCII-8BIT
75
+ string: '[{"login":"pizza-delivery","id":12345678,"avatar_url":"https://avatars0.githubusercontent.com/u/12345678?v=4","gravatar_id":"","url":"https://api.github.com/users/pizza-delivery","html_url":"https://github.com/pizza-delivery","followers_url":"https://api.github.com/users/pizza-delivery/followers","following_url":"https://api.github.com/users/pizza-delivery/following{/other_user}","gists_url":"https://api.github.com/users/pizza-delivery/gists{/gist_id}","starred_url":"https://api.github.com/users/pizza-delivery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pizza-delivery/subscriptions","organizations_url":"https://api.github.com/users/pizza-delivery/orgs","repos_url":"https://api.github.com/users/pizza-delivery/repos","events_url":"https://api.github.com/users/pizza-delivery/events{/privacy}","received_events_url":"https://api.github.com/users/pizza-delivery/received_events","type":"User","site_admin":false,"permissions":{"admin":true,"push":true,"pull":true}},{"login":"donald-fr","id":33847412,"avatar_url":"https://avatars2.githubusercontent.com/u/33847412?v=4","gravatar_id":"","url":"https://api.github.com/users/donald-fr","html_url":"https://github.com/donald-fr","followers_url":"https://api.github.com/users/donald-fr/followers","following_url":"https://api.github.com/users/donald-fr/following{/other_user}","gists_url":"https://api.github.com/users/donald-fr/gists{/gist_id}","starred_url":"https://api.github.com/users/donald-fr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donald-fr/subscriptions","organizations_url":"https://api.github.com/users/donald-fr/orgs","repos_url":"https://api.github.com/users/donald-fr/repos","events_url":"https://api.github.com/users/donald-fr/events{/privacy}","received_events_url":"https://api.github.com/users/donald-fr/received_events","type":"User","site_admin":false,"permissions":{"admin":false,"push":true,"pull":true}}]'
76
+ http_version:
77
+ recorded_at: Fri, 05 Jan 2018 22:08:21 GMT
78
+ - request:
79
+ method: get
80
+ uri: https://api.github.com/repos/donaldduck/testrepo_gh/issues?assignee=donald-fr
81
+ body:
82
+ encoding: US-ASCII
83
+ string: ''
84
+ headers:
85
+ Accept-Encoding:
86
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
87
+ Accept:
88
+ - application/vnd.github.v3+json
89
+ User-Agent:
90
+ - Ruby
91
+ Host:
92
+ - api.github.com
93
+ Authorization:
94
+ - Basic <GITHUB_CREDENTIALS>
95
+ response:
96
+ status:
97
+ code: 200
98
+ message: OK
99
+ headers:
100
+ Server:
101
+ - GitHub.com
102
+ Date:
103
+ - Fri, 05 Jan 2018 22:08:22 GMT
104
+ Content-Type:
105
+ - application/json; charset=utf-8
106
+ Transfer-Encoding:
107
+ - chunked
108
+ Status:
109
+ - 200 OK
110
+ X-Ratelimit-Limit:
111
+ - '5000'
112
+ X-Ratelimit-Remaining:
113
+ - '4973'
114
+ X-Ratelimit-Reset:
115
+ - '1515191050'
116
+ Cache-Control:
117
+ - private, max-age=60, s-maxage=60
118
+ Vary:
119
+ - Accept, Authorization, Cookie, X-GitHub-OTP
120
+ Etag:
121
+ - W/"d6b5b2a00c4e811eac8f00b39a5c172d"
122
+ X-Oauth-Scopes:
123
+ - admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook,
124
+ delete_repo, gist, notifications, repo, user
125
+ X-Accepted-Oauth-Scopes:
126
+ - repo
127
+ X-Github-Media-Type:
128
+ - github.v3; format=json
129
+ Access-Control-Expose-Headers:
130
+ - ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining,
131
+ X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
132
+ Access-Control-Allow-Origin:
133
+ - "*"
134
+ Content-Security-Policy:
135
+ - default-src 'none'
136
+ Strict-Transport-Security:
137
+ - max-age=31536000; includeSubdomains; preload
138
+ X-Content-Type-Options:
139
+ - nosniff
140
+ X-Frame-Options:
141
+ - deny
142
+ X-Xss-Protection:
143
+ - 1; mode=block
144
+ X-Runtime-Rack:
145
+ - '0.072448'
146
+ X-Github-Request-Id:
147
+ - C362:1BD7E:C64D10:166B84B:5A4FF756
148
+ body:
149
+ encoding: ASCII-8BIT
150
+ string: '[{"url":"https://api.github.com/repos/donaldduck/testrepo_gh/issues/12","repository_url":"https://api.github.com/repos/donaldduck/testrepo_gh","labels_url":"https://api.github.com/repos/donaldduck/testrepo_gh/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/donaldduck/testrepo_gh/issues/12/comments","events_url":"https://api.github.com/repos/donaldduck/testrepo_gh/issues/12/events","html_url":"https://github.com/donaldduck/testrepo_gh/issues/12","id":286418444,"number":12,"title":"test
151
+ issue 3","user":{"login":"donaldduck","id":1595356,"avatar_url":"https://avatars2.githubusercontent.com/u/1595356?v=4","gravatar_id":"","url":"https://api.github.com/users/donaldduck","html_url":"https://github.com/donaldduck","followers_url":"https://api.github.com/users/donaldduck/followers","following_url":"https://api.github.com/users/donaldduck/following{/other_user}","gists_url":"https://api.github.com/users/donaldduck/gists{/gist_id}","starred_url":"https://api.github.com/users/donaldduck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donaldduck/subscriptions","organizations_url":"https://api.github.com/users/donaldduck/orgs","repos_url":"https://api.github.com/users/donaldduck/repos","events_url":"https://api.github.com/users/donaldduck/events{/privacy}","received_events_url":"https://api.github.com/users/donaldduck/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"donald-fr","id":33847412,"avatar_url":"https://avatars2.githubusercontent.com/u/33847412?v=4","gravatar_id":"","url":"https://api.github.com/users/donald-fr","html_url":"https://github.com/donald-fr","followers_url":"https://api.github.com/users/donald-fr/followers","following_url":"https://api.github.com/users/donald-fr/following{/other_user}","gists_url":"https://api.github.com/users/donald-fr/gists{/gist_id}","starred_url":"https://api.github.com/users/donald-fr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donald-fr/subscriptions","organizations_url":"https://api.github.com/users/donald-fr/orgs","repos_url":"https://api.github.com/users/donald-fr/repos","events_url":"https://api.github.com/users/donald-fr/events{/privacy}","received_events_url":"https://api.github.com/users/donald-fr/received_events","type":"User","site_admin":false},"assignees":[{"login":"donald-fr","id":33847412,"avatar_url":"https://avatars2.githubusercontent.com/u/33847412?v=4","gravatar_id":"","url":"https://api.github.com/users/donald-fr","html_url":"https://github.com/donald-fr","followers_url":"https://api.github.com/users/donald-fr/followers","following_url":"https://api.github.com/users/donald-fr/following{/other_user}","gists_url":"https://api.github.com/users/donald-fr/gists{/gist_id}","starred_url":"https://api.github.com/users/donald-fr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donald-fr/subscriptions","organizations_url":"https://api.github.com/users/donald-fr/orgs","repos_url":"https://api.github.com/users/donald-fr/repos","events_url":"https://api.github.com/users/donald-fr/events{/privacy}","received_events_url":"https://api.github.com/users/donald-fr/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-01-05T22:06:17Z","updated_at":"2018-01-05T22:06:17Z","closed_at":null,"author_association":"COLLABORATOR","body":""},{"url":"https://api.github.com/repos/donaldduck/testrepo_gh/issues/10","repository_url":"https://api.github.com/repos/donaldduck/testrepo_gh","labels_url":"https://api.github.com/repos/donaldduck/testrepo_gh/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/donaldduck/testrepo_gh/issues/10/comments","events_url":"https://api.github.com/repos/donaldduck/testrepo_gh/issues/10/events","html_url":"https://github.com/donaldduck/testrepo_gh/issues/10","id":286418384,"number":10,"title":"test
152
+ issue 1","user":{"login":"donaldduck","id":1595356,"avatar_url":"https://avatars2.githubusercontent.com/u/1595356?v=4","gravatar_id":"","url":"https://api.github.com/users/donaldduck","html_url":"https://github.com/donaldduck","followers_url":"https://api.github.com/users/donaldduck/followers","following_url":"https://api.github.com/users/donaldduck/following{/other_user}","gists_url":"https://api.github.com/users/donaldduck/gists{/gist_id}","starred_url":"https://api.github.com/users/donaldduck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donaldduck/subscriptions","organizations_url":"https://api.github.com/users/donaldduck/orgs","repos_url":"https://api.github.com/users/donaldduck/repos","events_url":"https://api.github.com/users/donaldduck/events{/privacy}","received_events_url":"https://api.github.com/users/donaldduck/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"donald-fr","id":33847412,"avatar_url":"https://avatars2.githubusercontent.com/u/33847412?v=4","gravatar_id":"","url":"https://api.github.com/users/donald-fr","html_url":"https://github.com/donald-fr","followers_url":"https://api.github.com/users/donald-fr/followers","following_url":"https://api.github.com/users/donald-fr/following{/other_user}","gists_url":"https://api.github.com/users/donald-fr/gists{/gist_id}","starred_url":"https://api.github.com/users/donald-fr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donald-fr/subscriptions","organizations_url":"https://api.github.com/users/donald-fr/orgs","repos_url":"https://api.github.com/users/donald-fr/repos","events_url":"https://api.github.com/users/donald-fr/events{/privacy}","received_events_url":"https://api.github.com/users/donald-fr/received_events","type":"User","site_admin":false},"assignees":[{"login":"donald-fr","id":33847412,"avatar_url":"https://avatars2.githubusercontent.com/u/33847412?v=4","gravatar_id":"","url":"https://api.github.com/users/donald-fr","html_url":"https://github.com/donald-fr","followers_url":"https://api.github.com/users/donald-fr/followers","following_url":"https://api.github.com/users/donald-fr/following{/other_user}","gists_url":"https://api.github.com/users/donald-fr/gists{/gist_id}","starred_url":"https://api.github.com/users/donald-fr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donald-fr/subscriptions","organizations_url":"https://api.github.com/users/donald-fr/orgs","repos_url":"https://api.github.com/users/donald-fr/repos","events_url":"https://api.github.com/users/donald-fr/events{/privacy}","received_events_url":"https://api.github.com/users/donald-fr/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-01-05T22:06:01Z","updated_at":"2018-01-05T22:06:01Z","closed_at":null,"author_association":"COLLABORATOR","body":""}]'
153
+ http_version:
154
+ recorded_at: Fri, 05 Jan 2018 22:08:22 GMT
155
+ recorded_with: VCR 3.0.3
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Saverio Miroddi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-30 00:00:00.000000000 Z
11
+ date: 2018-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simple_scripting
@@ -75,6 +75,7 @@ files:
75
75
  - lib/geet/services/list_milestones.rb
76
76
  - lib/geet/services/list_prs.rb
77
77
  - lib/geet/services/merge_pr.rb
78
+ - lib/geet/utils/git.rb
78
79
  - lib/geet/version.rb
79
80
  - spec/integration/create_gist_spec.rb
80
81
  - spec/integration/create_issue_spec.rb
@@ -96,6 +97,7 @@ files:
96
97
  - spec/vcr_cassettes/create_pr_upstream.yml
97
98
  - spec/vcr_cassettes/github_com/list_issues.yml
98
99
  - spec/vcr_cassettes/github_com/list_issues_upstream.yml
100
+ - spec/vcr_cassettes/github_com/list_issues_with_assignee.yml
99
101
  - spec/vcr_cassettes/github_com/list_labels.yml
100
102
  - spec/vcr_cassettes/gitlab_com/list_issues.yml
101
103
  - spec/vcr_cassettes/gitlab_com/list_labels.yml