github_issue_branch 0.0.2 → 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 +4 -4
- data/lib/github_issue_branch.rb +2 -2
- data/lib/utils/git_utils.rb +2 -4
- data/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 744f2fdc287ee1279fe368c6fe87b4d066c10259
|
4
|
+
data.tar.gz: 00b77bf71e4dbe59c9cd5de336dd320f49246630
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 722a3f18c03390327a06e41614957124f95cf06bb33143329ea11319e6b059cae5f5de2b431827d06278c077aa7f339cfbe2252655e26a7a9d0d67efd1a3e20f
|
7
|
+
data.tar.gz: 4f5fa3aa95a218bf540a6aab6ed21894d2e5cf8b8450725e3904fec85f97025895c4fef893df7e1251251ff0316c623247adfb417a7776050098ee57319ba6cc
|
data/lib/github_issue_branch.rb
CHANGED
@@ -36,7 +36,6 @@ class GithubIssueBranch
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def get_issue_list
|
39
|
-
# TODO: read this from either config file or from git remotes
|
40
39
|
list = @github.issues.list user: @github_repo_owner, repo: @github_repo
|
41
40
|
list.select { |issue| issue['pull_request'].nil? }
|
42
41
|
end
|
@@ -47,7 +46,7 @@ class GithubIssueBranch
|
|
47
46
|
print_list issue_list
|
48
47
|
issue = choose_issue issue_list
|
49
48
|
# TODO: Fix the assignee as if owner is an organization it is wrong
|
50
|
-
@github.issues.edit @github_repo_owner, @github_repo, issue.number, assignee: @
|
49
|
+
@github.issues.edit @github_repo_owner, @github_repo, issue.number, assignee: @github_username
|
51
50
|
GitUtils.create_branch(StringUtils.branch_sanitize issue.title, issue.number)
|
52
51
|
end
|
53
52
|
|
@@ -67,6 +66,7 @@ class GithubIssueBranch
|
|
67
66
|
private
|
68
67
|
|
69
68
|
def load_configs
|
69
|
+
@github_username = @github.users.get.login
|
70
70
|
@github_token = read_conf 'github_auth_token', 'GITHUB_AUTH_TOKEN'
|
71
71
|
owner, repo = GitUtils.get_remote_user_repo('origin')
|
72
72
|
@github_repo_owner = read_conf('github_owner') || owner
|
data/lib/utils/git_utils.rb
CHANGED
@@ -13,12 +13,10 @@ class GitUtils
|
|
13
13
|
get_remote(name).url
|
14
14
|
end
|
15
15
|
|
16
|
-
# TODO: Use regex to extract values instead?
|
17
16
|
def self.get_remote_user_repo name
|
18
17
|
url = get_remote_url(name)
|
19
|
-
|
20
|
-
|
21
|
-
username_repository.split '/'
|
18
|
+
repo_owner_name = /.*github.com[:|\/](.*).git/.match(url).captures
|
19
|
+
repo_owner_name.first.split '/'
|
22
20
|
end
|
23
21
|
|
24
22
|
def self.create_branch name
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github_issue_branch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rui Baltazar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: github_api
|