rubhub 0.2.9 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/github/issues/issues.rb +37 -38
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19d4a83ea1736893826253694f9f4dbfb46364c6
|
4
|
+
data.tar.gz: 4bbf3d1931151e450fefa2a45b181e02ba769cfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46e83c2c53ca100bdaa70fca749030b8423bfd3b7e0418aa779882e00400bd479d7cad6e7e4fc0ab409290e100d223ce850ede04256b82327548777637130dd2
|
7
|
+
data.tar.gz: 4be00c372f26e01d0ad103579c3ee3f74ac628c161293bffc0896397f0668185f8bb81651da8cba830fd8d3d3f50a6307dd3ca6408a41352850b77c2e4689238
|
data/lib/github/issues/issues.rb
CHANGED
@@ -9,71 +9,70 @@ class Issues
|
|
9
9
|
@milestones = IssuesMilestones.new(github)
|
10
10
|
end
|
11
11
|
|
12
|
-
def listIssues(filter
|
13
|
-
sort
|
12
|
+
def listIssues(filter: 'all', state: 'open', labels: nil,
|
13
|
+
sort: 'created', direction: 'desc', since: nil)
|
14
14
|
params = {
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
15
|
+
filter: filter,
|
16
|
+
state: state,
|
17
|
+
labels: labels,
|
18
|
+
sort: sort,
|
19
|
+
direction: direction,
|
20
|
+
since: since
|
21
21
|
}
|
22
22
|
params = @github.removeEmptyParams(params)
|
23
23
|
url = 'issues?%s' % @github.parameterize(params)
|
24
24
|
@github.get(url)
|
25
25
|
end
|
26
26
|
|
27
|
-
def listRepoIssues(repo, milestone
|
28
|
-
mentioned
|
29
|
-
sort
|
30
|
-
user
|
27
|
+
def listRepoIssues(repo, milestone: nil, assignee: nil,
|
28
|
+
mentioned: nil, state: 'open', labels: nil,
|
29
|
+
sort: 'created', direction: 'desc', since: nil,
|
30
|
+
user: nil, filter: 'all')
|
31
31
|
params = {
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
32
|
+
filter: filter,
|
33
|
+
state: state,
|
34
|
+
assignee: assignee,
|
35
|
+
mentioned: mentioned,
|
36
|
+
labels: labels,
|
37
|
+
sort: sort,
|
38
|
+
direction: direction,
|
39
|
+
since: since,
|
40
|
+
milestone: milestone
|
41
41
|
}
|
42
42
|
params = @github.removeEmptyParams(params)
|
43
43
|
url = 'repos/%s/%s/issues?%s' % [user, repo, @github.parameterize(params)]
|
44
44
|
@github.get(url)
|
45
45
|
end
|
46
46
|
|
47
|
-
def getIssue(repo, number, user
|
47
|
+
def getIssue(repo, number, user: nil)
|
48
48
|
username = user == nil ? @github.username : user
|
49
49
|
@github.get('repos/%s/%s/issues/%s' % [username, repo, number])
|
50
50
|
end
|
51
51
|
|
52
|
-
def createIssue(repo, title, body
|
53
|
-
milestone
|
52
|
+
def createIssue(repo, title, body: nil, assignee: nil,
|
53
|
+
milestone: nil, labels: nil, user: nil)
|
54
54
|
params = {
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
55
|
+
title: title,
|
56
|
+
body: body,
|
57
|
+
assignee: assignee,
|
58
|
+
milestone: milestone,
|
59
|
+
labels: labels
|
60
60
|
}
|
61
61
|
params = @github.removeEmptyParams(params)
|
62
62
|
data = params.to_json
|
63
63
|
@github.post('repos/%s/%s/issues' % [user, repo], data)
|
64
64
|
end
|
65
65
|
|
66
|
-
def editIssue(repo, id, title
|
67
|
-
state
|
68
|
-
user=nil)
|
66
|
+
def editIssue(repo, id, title: nil, body: nil, assignee: nil,
|
67
|
+
state: nil, milestone: nil, labels: nil, user: nil)
|
69
68
|
username = user == nil ? @github.username : user
|
70
69
|
params = {
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
70
|
+
title: title,
|
71
|
+
body: body,
|
72
|
+
assignee: assignee,
|
73
|
+
state: state,
|
74
|
+
milestone: milestone,
|
75
|
+
labels: labels
|
77
76
|
}
|
78
77
|
params = @github.removeEmptyParams(params)
|
79
78
|
data = params.to_json
|