contribution-checker 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -4
- data/lib/contribution-checker/checker.rb +25 -9
- data/lib/contribution-checker/version.rb +1 -1
- data/spec/contribution-checker/checker_spec.rb +52 -9
- data/spec/fixtures/issues_and_prs.json +137 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2e0818376e281959857ad59fcf196dbe5a107d2
|
4
|
+
data.tar.gz: f822111b754aa62875a4cbfdddb108af1736929d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00594f72065361343a7121e7563f6908031de2685bb0f9bfa03ee0dd810320d8c70578362815ab9eb42707d063e0e21b695fd775746516577c50e3a67152a324
|
7
|
+
data.tar.gz: 953c874712e16d57886dfa59983d429ac8ead173850d5d1a75922f24f36b908ca728febc4f0e2be373887f16aba73e46389e60cbe8970bb8a37f8f2464e0c89f
|
data/README.md
CHANGED
@@ -23,10 +23,11 @@ checker.check
|
|
23
23
|
:default_branch => "master"
|
24
24
|
},
|
25
25
|
:or_criteria => {
|
26
|
-
:user_has_starred_repo
|
27
|
-
:user_can_push_to_repo
|
28
|
-
:user_is_repo_org_member
|
29
|
-
:user_has_fork_of_repo
|
26
|
+
:user_has_starred_repo => false,
|
27
|
+
:user_can_push_to_repo => false,
|
28
|
+
:user_is_repo_org_member => true,
|
29
|
+
:user_has_fork_of_repo => false,
|
30
|
+
:user_has_opened_issue_or_pr_in_repo => false
|
30
31
|
}
|
31
32
|
}
|
32
33
|
```
|
@@ -35,10 +36,13 @@ You might also like to try out the [Contribution Checker][app] app built on top
|
|
35
36
|
|
36
37
|
![checker](https://cloud.githubusercontent.com/assets/65057/3352063/2a90d4b4-fa31-11e3-8733-c52d5df05bad.png)
|
37
38
|
|
39
|
+
The source for the app is in [jdennes/contribution-checker-app][contribution-checker-app].
|
40
|
+
|
38
41
|
Created by [@izuzak][izuzak] and [@jdennes][jdennes] at the [Hamburg Hackathon][hamburg-hackathon], June 2014.
|
39
42
|
|
40
43
|
[contributions]: https://help.github.com/articles/why-are-my-contributions-not-showing-up-on-my-profile
|
41
44
|
[app]: http://contribution-checker.herokuapp.com/
|
45
|
+
[contribution-checker-app]: https://github.com/jdennes/contribution-checker-app
|
42
46
|
[izuzak]: https://github.com/izuzak
|
43
47
|
[jdennes]: https://github.com/jdennes
|
44
48
|
[hamburg-hackathon]: http://hamburg-hackathon.de/hackathon/
|
@@ -41,16 +41,19 @@ module ContributionChecker
|
|
41
41
|
# :default_branch => "master"
|
42
42
|
# },
|
43
43
|
# :or_criteria => {
|
44
|
-
# :user_has_starred_repo
|
45
|
-
# :user_can_push_to_repo
|
46
|
-
# :user_is_repo_org_member
|
47
|
-
# :user_has_fork_of_repo
|
44
|
+
# :user_has_starred_repo => false,
|
45
|
+
# :user_can_push_to_repo => false,
|
46
|
+
# :user_is_repo_org_member => true,
|
47
|
+
# :user_has_fork_of_repo => false,
|
48
|
+
# :user_has_opened_issue_or_pr_in_repo => false
|
48
49
|
# }
|
49
50
|
# }
|
50
51
|
def check
|
51
52
|
@nwo, @sha = parse_commit_url @commit_url
|
52
53
|
begin
|
53
54
|
@commit = @client.commit @nwo, @sha
|
55
|
+
rescue ArgumentError
|
56
|
+
raise ContributionChecker::InvalidCommitUrlError
|
54
57
|
rescue Octokit::NotFound
|
55
58
|
raise ContributionChecker::InvalidCommitUrlError
|
56
59
|
rescue Octokit::Unauthorized
|
@@ -67,6 +70,7 @@ module ContributionChecker
|
|
67
70
|
@user_can_push_to_repo = user_can_push_to_repo?
|
68
71
|
@user_is_repo_org_member = user_is_repo_org_member?
|
69
72
|
@user_has_fork_of_repo = user_has_fork_of_repo?
|
73
|
+
@user_has_opened_issue_or_pr_in_repo = user_has_opened_issue_or_pr_in_repo?
|
70
74
|
|
71
75
|
{
|
72
76
|
:contribution => and_criteria_met? && or_criteria_met?,
|
@@ -79,10 +83,11 @@ module ContributionChecker
|
|
79
83
|
:default_branch => @repo[:default_branch],
|
80
84
|
},
|
81
85
|
:or_criteria => {
|
82
|
-
:user_has_starred_repo
|
83
|
-
:user_can_push_to_repo
|
84
|
-
:user_is_repo_org_member
|
85
|
-
:user_has_fork_of_repo
|
86
|
+
:user_has_starred_repo => @user_has_starred_repo,
|
87
|
+
:user_can_push_to_repo => @user_can_push_to_repo,
|
88
|
+
:user_is_repo_org_member => @user_is_repo_org_member,
|
89
|
+
:user_has_fork_of_repo => @user_has_fork_of_repo,
|
90
|
+
:user_has_opened_issue_or_pr_in_repo => @user_has_opened_issue_or_pr_in_repo,
|
86
91
|
}
|
87
92
|
}
|
88
93
|
end
|
@@ -232,6 +237,16 @@ module ContributionChecker
|
|
232
237
|
false
|
233
238
|
end
|
234
239
|
|
240
|
+
# Checks whether the authenticated user has opened an issue or pull request
|
241
|
+
# in the repository in which the commit exists.
|
242
|
+
#
|
243
|
+
# @return [Boolean]
|
244
|
+
def user_has_opened_issue_or_pr_in_repo?
|
245
|
+
issues_and_prs = @client.list_issues @nwo,
|
246
|
+
:creator => @user[:login], :state => "all"
|
247
|
+
issues_and_prs.any?
|
248
|
+
end
|
249
|
+
|
235
250
|
# Checks whether the "and" criteria for counting a commit as a contribution
|
236
251
|
# are correctly met.
|
237
252
|
#
|
@@ -251,7 +266,8 @@ module ContributionChecker
|
|
251
266
|
@user_has_starred_repo ||
|
252
267
|
@user_can_push_to_repo ||
|
253
268
|
@user_is_repo_org_member ||
|
254
|
-
@user_has_fork_of_repo
|
269
|
+
@user_has_fork_of_repo ||
|
270
|
+
@user_has_opened_issue_or_pr_in_repo
|
255
271
|
end
|
256
272
|
end
|
257
273
|
end
|
@@ -31,6 +31,22 @@ describe ContributionChecker::Checker do
|
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
|
+
context "when a repository URL is provided which isn't a commit URL" do
|
35
|
+
let(:checker) { checker = ContributionChecker::Checker.new \
|
36
|
+
:access_token => "your token",
|
37
|
+
:commit_url => "https://github.com/github/linguist/blahblah"
|
38
|
+
}
|
39
|
+
|
40
|
+
before do
|
41
|
+
stub_request(:get, "https://api.github.com/repos/github/linguist/commits/").to_return(
|
42
|
+
:status => 404, :body => "")
|
43
|
+
end
|
44
|
+
|
45
|
+
it "raises an error" do
|
46
|
+
expect { checker.check }.to raise_error ContributionChecker::InvalidCommitUrlError
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
34
50
|
context "when an invalid access token is provided" do
|
35
51
|
let(:checker) { checker = ContributionChecker::Checker.new \
|
36
52
|
:access_token => "invalid access token",
|
@@ -66,7 +82,9 @@ describe ContributionChecker::Checker do
|
|
66
82
|
to_return(json_response("emails.json"))
|
67
83
|
stub_get("/user/starred?per_page=100").
|
68
84
|
to_return(json_response("starred.json"))
|
69
|
-
|
85
|
+
stub_get("/repos/jdennes/contribution-checker/issues?creator=jdennes&per_page=100&state=all").
|
86
|
+
to_return(json_response("issues_and_prs.json"))
|
87
|
+
end
|
70
88
|
|
71
89
|
it "returns the check result" do
|
72
90
|
result = checker.check
|
@@ -85,6 +103,7 @@ describe ContributionChecker::Checker do
|
|
85
103
|
expect(result[:or_criteria][:user_can_push_to_repo]).to eq(true)
|
86
104
|
expect(result[:or_criteria][:user_is_repo_org_member]).to eq(false)
|
87
105
|
expect(result[:or_criteria][:user_has_fork_of_repo]).to eq(false)
|
106
|
+
expect(result[:or_criteria][:user_has_opened_issue_or_pr_in_repo]).to eq(true)
|
88
107
|
end
|
89
108
|
end
|
90
109
|
|
@@ -109,7 +128,9 @@ describe ContributionChecker::Checker do
|
|
109
128
|
to_return(json_response("emails.json"))
|
110
129
|
stub_get("/user/starred?per_page=100").
|
111
130
|
to_return(json_response("starred.json"))
|
112
|
-
|
131
|
+
stub_get("/repos/jdennes/contribution-checker/issues?creator=jdennes&per_page=100&state=all").
|
132
|
+
to_return(json_response("issues_and_prs.json"))
|
133
|
+
end
|
113
134
|
|
114
135
|
it "returns the check result" do
|
115
136
|
result = checker.check
|
@@ -128,6 +149,7 @@ describe ContributionChecker::Checker do
|
|
128
149
|
expect(result[:or_criteria][:user_can_push_to_repo]).to eq(true)
|
129
150
|
expect(result[:or_criteria][:user_is_repo_org_member]).to eq(false)
|
130
151
|
expect(result[:or_criteria][:user_has_fork_of_repo]).to eq(false)
|
152
|
+
expect(result[:or_criteria][:user_has_opened_issue_or_pr_in_repo]).to eq(true)
|
131
153
|
end
|
132
154
|
end
|
133
155
|
|
@@ -152,7 +174,9 @@ describe ContributionChecker::Checker do
|
|
152
174
|
to_return(json_response("emails.json"))
|
153
175
|
stub_get("/user/starred?per_page=100").
|
154
176
|
to_return(json_response("starred.json"))
|
155
|
-
|
177
|
+
stub_get("/repos/jdennes/contribution-checker/issues?creator=jdennes&per_page=100&state=all").
|
178
|
+
to_return(json_response("issues_and_prs.json"))
|
179
|
+
end
|
156
180
|
|
157
181
|
it "returns the check result" do
|
158
182
|
result = checker.check
|
@@ -171,6 +195,7 @@ describe ContributionChecker::Checker do
|
|
171
195
|
expect(result[:or_criteria][:user_can_push_to_repo]).to eq(true)
|
172
196
|
expect(result[:or_criteria][:user_is_repo_org_member]).to eq(false)
|
173
197
|
expect(result[:or_criteria][:user_has_fork_of_repo]).to eq(false)
|
198
|
+
expect(result[:or_criteria][:user_has_opened_issue_or_pr_in_repo]).to eq(true)
|
174
199
|
end
|
175
200
|
end
|
176
201
|
|
@@ -195,7 +220,9 @@ describe ContributionChecker::Checker do
|
|
195
220
|
to_return(json_response("emails.json"))
|
196
221
|
stub_get("/user/starred?per_page=100").
|
197
222
|
to_return(json_response("starred.json"))
|
198
|
-
|
223
|
+
stub_get("/repos/jdennes/contribution-checker/issues?creator=jdennes&per_page=100&state=all").
|
224
|
+
to_return(json_response("issues_and_prs.json"))
|
225
|
+
end
|
199
226
|
|
200
227
|
it "returns the check result" do
|
201
228
|
result = checker.check
|
@@ -214,6 +241,7 @@ describe ContributionChecker::Checker do
|
|
214
241
|
expect(result[:or_criteria][:user_can_push_to_repo]).to eq(true)
|
215
242
|
expect(result[:or_criteria][:user_is_repo_org_member]).to eq(false)
|
216
243
|
expect(result[:or_criteria][:user_has_fork_of_repo]).to eq(false)
|
244
|
+
expect(result[:or_criteria][:user_has_opened_issue_or_pr_in_repo]).to eq(true)
|
217
245
|
end
|
218
246
|
end
|
219
247
|
|
@@ -239,7 +267,9 @@ describe ContributionChecker::Checker do
|
|
239
267
|
to_return(json_response("starred.json"))
|
240
268
|
stub_get("/orgs/github/members/jdennes").
|
241
269
|
to_return(:status => 204)
|
242
|
-
|
270
|
+
stub_get("/repos/jdennes/contribution-checker/issues?creator=jdennes&per_page=100&state=all").
|
271
|
+
to_return(json_response("issues_and_prs.json"))
|
272
|
+
end
|
243
273
|
|
244
274
|
it "returns the check result" do
|
245
275
|
result = checker.check
|
@@ -258,6 +288,7 @@ describe ContributionChecker::Checker do
|
|
258
288
|
expect(result[:or_criteria][:user_can_push_to_repo]).to eq(true)
|
259
289
|
expect(result[:or_criteria][:user_is_repo_org_member]).to eq(true)
|
260
290
|
expect(result[:or_criteria][:user_has_fork_of_repo]).to eq(false)
|
291
|
+
expect(result[:or_criteria][:user_has_opened_issue_or_pr_in_repo]).to eq(true)
|
261
292
|
end
|
262
293
|
end
|
263
294
|
|
@@ -282,7 +313,9 @@ describe ContributionChecker::Checker do
|
|
282
313
|
to_return(json_response("starred.json"))
|
283
314
|
stub_get("/repos/jdennes/contribution-checker/forks?per_page=100").
|
284
315
|
to_return(json_response("repo_forks.json"))
|
285
|
-
|
316
|
+
stub_get("/repos/jdennes/contribution-checker/issues?creator=jdennes&per_page=100&state=all").
|
317
|
+
to_return(json_response("issues_and_prs.json"))
|
318
|
+
end
|
286
319
|
|
287
320
|
it "returns the check result" do
|
288
321
|
result = checker.check
|
@@ -301,6 +334,7 @@ describe ContributionChecker::Checker do
|
|
301
334
|
expect(result[:or_criteria][:user_can_push_to_repo]).to eq(true)
|
302
335
|
expect(result[:or_criteria][:user_is_repo_org_member]).to eq(false)
|
303
336
|
expect(result[:or_criteria][:user_has_fork_of_repo]).to eq(true)
|
337
|
+
expect(result[:or_criteria][:user_has_opened_issue_or_pr_in_repo]).to eq(true)
|
304
338
|
end
|
305
339
|
end
|
306
340
|
|
@@ -325,7 +359,9 @@ describe ContributionChecker::Checker do
|
|
325
359
|
to_return(json_response("starred.json"))
|
326
360
|
stub_get("/repos/jdennes/contribution-checker").
|
327
361
|
to_return(json_response("potential_fork.json"))
|
328
|
-
|
362
|
+
stub_get("/repos/someone/contribution-checker/issues?creator=jdennes&per_page=100&state=all").
|
363
|
+
to_return(json_response("issues_and_prs.json"))
|
364
|
+
end
|
329
365
|
|
330
366
|
it "returns the check result" do
|
331
367
|
result = checker.check
|
@@ -344,6 +380,7 @@ describe ContributionChecker::Checker do
|
|
344
380
|
expect(result[:or_criteria][:user_can_push_to_repo]).to eq(true)
|
345
381
|
expect(result[:or_criteria][:user_is_repo_org_member]).to eq(false)
|
346
382
|
expect(result[:or_criteria][:user_has_fork_of_repo]).to eq(true)
|
383
|
+
expect(result[:or_criteria][:user_has_opened_issue_or_pr_in_repo]).to eq(true)
|
347
384
|
end
|
348
385
|
end
|
349
386
|
|
@@ -372,7 +409,9 @@ describe ContributionChecker::Checker do
|
|
372
409
|
to_return(json_response("user_repos.json"))
|
373
410
|
stub_get("/repos/jdennes/myfork").
|
374
411
|
to_return(json_response("user_fork.json"))
|
375
|
-
|
412
|
+
stub_get("/repos/someone/contribution-checker/issues?creator=jdennes&per_page=100&state=all").
|
413
|
+
to_return(json_response("issues_and_prs.json"))
|
414
|
+
end
|
376
415
|
|
377
416
|
it "returns the check result" do
|
378
417
|
result = checker.check
|
@@ -391,6 +430,7 @@ describe ContributionChecker::Checker do
|
|
391
430
|
expect(result[:or_criteria][:user_can_push_to_repo]).to eq(true)
|
392
431
|
expect(result[:or_criteria][:user_is_repo_org_member]).to eq(false)
|
393
432
|
expect(result[:or_criteria][:user_has_fork_of_repo]).to eq(true)
|
433
|
+
expect(result[:or_criteria][:user_has_opened_issue_or_pr_in_repo]).to eq(true)
|
394
434
|
end
|
395
435
|
end
|
396
436
|
|
@@ -419,7 +459,9 @@ describe ContributionChecker::Checker do
|
|
419
459
|
to_return(json_response("user_repos.json"))
|
420
460
|
stub_get("/repos/jdennes/myfork").
|
421
461
|
to_return(json_response("user_fork_not_matching.json"))
|
422
|
-
|
462
|
+
stub_get("/repos/someone/contribution-checker/issues?creator=jdennes&per_page=100&state=all").
|
463
|
+
to_return(json_response("issues_and_prs.json"))
|
464
|
+
end
|
423
465
|
|
424
466
|
it "returns the check result" do
|
425
467
|
result = checker.check
|
@@ -438,6 +480,7 @@ describe ContributionChecker::Checker do
|
|
438
480
|
expect(result[:or_criteria][:user_can_push_to_repo]).to eq(true)
|
439
481
|
expect(result[:or_criteria][:user_is_repo_org_member]).to eq(false)
|
440
482
|
expect(result[:or_criteria][:user_has_fork_of_repo]).to eq(false)
|
483
|
+
expect(result[:or_criteria][:user_has_opened_issue_or_pr_in_repo]).to eq(true)
|
441
484
|
end
|
442
485
|
end
|
443
486
|
|
@@ -0,0 +1,137 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"url": "https://api.github.com/repos/jdennes/contribution-checker/issues/11",
|
4
|
+
"labels_url": "https://api.github.com/repos/jdennes/contribution-checker/issues/11/labels{/name}",
|
5
|
+
"comments_url": "https://api.github.com/repos/jdennes/contribution-checker/issues/11/comments",
|
6
|
+
"events_url": "https://api.github.com/repos/jdennes/contribution-checker/issues/11/events",
|
7
|
+
"html_url": "https://github.com/jdennes/contribution-checker/pull/11",
|
8
|
+
"id": 58511832,
|
9
|
+
"number": 11,
|
10
|
+
"title": "[WIP] Add missing criterion",
|
11
|
+
"user": {
|
12
|
+
"login": "jdennes",
|
13
|
+
"id": 65057,
|
14
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/65057?v=3",
|
15
|
+
"gravatar_id": "",
|
16
|
+
"url": "https://api.github.com/users/jdennes",
|
17
|
+
"html_url": "https://github.com/jdennes",
|
18
|
+
"followers_url": "https://api.github.com/users/jdennes/followers",
|
19
|
+
"following_url": "https://api.github.com/users/jdennes/following{/other_user}",
|
20
|
+
"gists_url": "https://api.github.com/users/jdennes/gists{/gist_id}",
|
21
|
+
"starred_url": "https://api.github.com/users/jdennes/starred{/owner}{/repo}",
|
22
|
+
"subscriptions_url": "https://api.github.com/users/jdennes/subscriptions",
|
23
|
+
"organizations_url": "https://api.github.com/users/jdennes/orgs",
|
24
|
+
"repos_url": "https://api.github.com/users/jdennes/repos",
|
25
|
+
"events_url": "https://api.github.com/users/jdennes/events{/privacy}",
|
26
|
+
"received_events_url": "https://api.github.com/users/jdennes/received_events",
|
27
|
+
"type": "User",
|
28
|
+
"site_admin": true
|
29
|
+
},
|
30
|
+
"labels": [
|
31
|
+
|
32
|
+
],
|
33
|
+
"state": "open",
|
34
|
+
"locked": false,
|
35
|
+
"assignee": null,
|
36
|
+
"milestone": null,
|
37
|
+
"comments": 4,
|
38
|
+
"created_at": "2015-02-22T18:09:15Z",
|
39
|
+
"updated_at": "2015-02-22T18:56:04Z",
|
40
|
+
"closed_at": null,
|
41
|
+
"pull_request": {
|
42
|
+
"url": "https://api.github.com/repos/jdennes/contribution-checker/pulls/11",
|
43
|
+
"html_url": "https://github.com/jdennes/contribution-checker/pull/11",
|
44
|
+
"diff_url": "https://github.com/jdennes/contribution-checker/pull/11.diff",
|
45
|
+
"patch_url": "https://github.com/jdennes/contribution-checker/pull/11.patch"
|
46
|
+
},
|
47
|
+
"body": "Not ready to merge. Work in progress to add the following \"or\" criterion:\r\n\r\n> \"You have opened a pull request or issue in the repository.\"\r\n\r\nNot yet implemented. Probably going to try to use the Search API to search for either issues or PRs created by the user in the specified repository (hopefully that should work in a single call).\r\n\r\nAims to fix #9.\r\n\r\n/cc @izuzak "
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"url": "https://api.github.com/repos/jdennes/contribution-checker/issues/10",
|
51
|
+
"labels_url": "https://api.github.com/repos/jdennes/contribution-checker/issues/10/labels{/name}",
|
52
|
+
"comments_url": "https://api.github.com/repos/jdennes/contribution-checker/issues/10/comments",
|
53
|
+
"events_url": "https://api.github.com/repos/jdennes/contribution-checker/issues/10/events",
|
54
|
+
"html_url": "https://github.com/jdennes/contribution-checker/pull/10",
|
55
|
+
"id": 58508412,
|
56
|
+
"number": 10,
|
57
|
+
"title": "Cater for change in Octokit behaviour",
|
58
|
+
"user": {
|
59
|
+
"login": "jdennes",
|
60
|
+
"id": 65057,
|
61
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/65057?v=3",
|
62
|
+
"gravatar_id": "",
|
63
|
+
"url": "https://api.github.com/users/jdennes",
|
64
|
+
"html_url": "https://github.com/jdennes",
|
65
|
+
"followers_url": "https://api.github.com/users/jdennes/followers",
|
66
|
+
"following_url": "https://api.github.com/users/jdennes/following{/other_user}",
|
67
|
+
"gists_url": "https://api.github.com/users/jdennes/gists{/gist_id}",
|
68
|
+
"starred_url": "https://api.github.com/users/jdennes/starred{/owner}{/repo}",
|
69
|
+
"subscriptions_url": "https://api.github.com/users/jdennes/subscriptions",
|
70
|
+
"organizations_url": "https://api.github.com/users/jdennes/orgs",
|
71
|
+
"repos_url": "https://api.github.com/users/jdennes/repos",
|
72
|
+
"events_url": "https://api.github.com/users/jdennes/events{/privacy}",
|
73
|
+
"received_events_url": "https://api.github.com/users/jdennes/received_events",
|
74
|
+
"type": "User",
|
75
|
+
"site_admin": true
|
76
|
+
},
|
77
|
+
"labels": [
|
78
|
+
|
79
|
+
],
|
80
|
+
"state": "closed",
|
81
|
+
"locked": false,
|
82
|
+
"assignee": null,
|
83
|
+
"milestone": null,
|
84
|
+
"comments": 3,
|
85
|
+
"created_at": "2015-02-22T16:30:55Z",
|
86
|
+
"updated_at": "2015-02-22T16:48:59Z",
|
87
|
+
"closed_at": "2015-02-22T16:48:59Z",
|
88
|
+
"pull_request": {
|
89
|
+
"url": "https://api.github.com/repos/jdennes/contribution-checker/pulls/10",
|
90
|
+
"html_url": "https://github.com/jdennes/contribution-checker/pull/10",
|
91
|
+
"diff_url": "https://github.com/jdennes/contribution-checker/pull/10.diff",
|
92
|
+
"patch_url": "https://github.com/jdennes/contribution-checker/pull/10.patch"
|
93
|
+
},
|
94
|
+
"body": "While working on a new branch, I noticed this test failing because of a change in Octokit's exception handling behaviour:\r\n\r\nhttps://travis-ci.org/jdennes/contribution-checker/builds/51730061#L135\r\n\r\nThis fixes that."
|
95
|
+
},
|
96
|
+
{
|
97
|
+
"url": "https://api.github.com/repos/jdennes/contribution-checker/issues/9",
|
98
|
+
"labels_url": "https://api.github.com/repos/jdennes/contribution-checker/issues/9/labels{/name}",
|
99
|
+
"comments_url": "https://api.github.com/repos/jdennes/contribution-checker/issues/9/comments",
|
100
|
+
"events_url": "https://api.github.com/repos/jdennes/contribution-checker/issues/9/events",
|
101
|
+
"html_url": "https://github.com/jdennes/contribution-checker/issues/9",
|
102
|
+
"id": 58394546,
|
103
|
+
"number": 9,
|
104
|
+
"title": "Add missing criterion",
|
105
|
+
"user": {
|
106
|
+
"login": "jdennes",
|
107
|
+
"id": 65057,
|
108
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/65057?v=3",
|
109
|
+
"gravatar_id": "",
|
110
|
+
"url": "https://api.github.com/users/jdennes",
|
111
|
+
"html_url": "https://github.com/jdennes",
|
112
|
+
"followers_url": "https://api.github.com/users/jdennes/followers",
|
113
|
+
"following_url": "https://api.github.com/users/jdennes/following{/other_user}",
|
114
|
+
"gists_url": "https://api.github.com/users/jdennes/gists{/gist_id}",
|
115
|
+
"starred_url": "https://api.github.com/users/jdennes/starred{/owner}{/repo}",
|
116
|
+
"subscriptions_url": "https://api.github.com/users/jdennes/subscriptions",
|
117
|
+
"organizations_url": "https://api.github.com/users/jdennes/orgs",
|
118
|
+
"repos_url": "https://api.github.com/users/jdennes/repos",
|
119
|
+
"events_url": "https://api.github.com/users/jdennes/events{/privacy}",
|
120
|
+
"received_events_url": "https://api.github.com/users/jdennes/received_events",
|
121
|
+
"type": "User",
|
122
|
+
"site_admin": true
|
123
|
+
},
|
124
|
+
"labels": [
|
125
|
+
|
126
|
+
],
|
127
|
+
"state": "open",
|
128
|
+
"locked": false,
|
129
|
+
"assignee": null,
|
130
|
+
"milestone": null,
|
131
|
+
"comments": 0,
|
132
|
+
"created_at": "2015-02-20T18:52:27Z",
|
133
|
+
"updated_at": "2015-02-20T18:52:27Z",
|
134
|
+
"closed_at": null,
|
135
|
+
"body": "The following [documented](https://help.github.com/articles/why-are-my-contributions-not-showing-up-on-my-profile/#commits) criterion is missing from the `or_criteria` in the check results:\r\n\r\n> \"You have opened a pull request or issue in the repository.\""
|
136
|
+
}
|
137
|
+
]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contribution-checker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Dennes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|
@@ -132,6 +132,7 @@ files:
|
|
132
132
|
- spec/fixtures/default_compare_ahead.json
|
133
133
|
- spec/fixtures/emails.json
|
134
134
|
- spec/fixtures/gh-pages_compare.json
|
135
|
+
- spec/fixtures/issues_and_prs.json
|
135
136
|
- spec/fixtures/org_owned_repo.json
|
136
137
|
- spec/fixtures/potential_fork.json
|
137
138
|
- spec/fixtures/repo.json
|
@@ -164,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
164
165
|
version: '0'
|
165
166
|
requirements: []
|
166
167
|
rubyforge_project:
|
167
|
-
rubygems_version: 2.
|
168
|
+
rubygems_version: 2.4.5
|
168
169
|
signing_key:
|
169
170
|
specification_version: 4
|
170
171
|
summary: Check whether a commit is counted as a contribution.
|
@@ -175,6 +176,7 @@ test_files:
|
|
175
176
|
- spec/fixtures/default_compare_ahead.json
|
176
177
|
- spec/fixtures/emails.json
|
177
178
|
- spec/fixtures/gh-pages_compare.json
|
179
|
+
- spec/fixtures/issues_and_prs.json
|
178
180
|
- spec/fixtures/org_owned_repo.json
|
179
181
|
- spec/fixtures/potential_fork.json
|
180
182
|
- spec/fixtures/repo.json
|