github_changes 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/changelog_generator/generator.rb +8 -2
- data/lib/changelog_generator/version.rb +1 -1
- 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: a8f3629bd64337c85dc3643aa3108fe8be5029e9
|
4
|
+
data.tar.gz: 1fd0c2e78cb38ef694586c24e8c445ed7da7857e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec7c4a1ee1b2b3165c97cde0bdf26792a527e8052b438f0f8504b7673373662ea463f094f597ad983326d52b36a031f2d08119956f15e2bfcba634c94f6c6818
|
7
|
+
data.tar.gz: bb4dfcbb8802ae9670329659dfb3a5d458b3d8f54b502137e59d80226f3b605b06c1a05a151c04aa7b5409f89bacd19b10daa78bfe8186071894fc0cf4114d44
|
@@ -34,10 +34,16 @@ module ChangelogGenerator
|
|
34
34
|
private
|
35
35
|
|
36
36
|
def generate_changelog(user, repo, start_ref, end_ref, label_filter = nil, exclude_sha = nil, changelog)
|
37
|
+
unless check_github_response() { github.pull_requests.list(user, repo) }
|
38
|
+
abort "Unable to access repo `#{user}/#{repo}`. Please ensure correct spelling. If this repo is private you must ensure to configure me with a suitable GitHub oath token."
|
39
|
+
end
|
37
40
|
start_date, end_date = *date_range_for_references(start_ref, end_ref)
|
38
41
|
# puts "Start: #{start_ref}, End: #{end_ref}"
|
39
|
-
unless start_date
|
40
|
-
abort "
|
42
|
+
unless start_date
|
43
|
+
abort "Unable to parse `#{start_ref}` as a reference or date. Please specify a git tag, branch, or SHA. You can also specify a date like `last week` or `5 days ago`"
|
44
|
+
end
|
45
|
+
unless end_date
|
46
|
+
abort "Unable to parse `#{end_ref}` as a reference or date. Please specify a git tag, branch, or SHA. You can also specify a date like `last week` or `5 days ago` or `January 1, 1999`"
|
41
47
|
end
|
42
48
|
pulls = pull_requests_for_date_range(start_date, end_date)
|
43
49
|
pull_nums = pulls.map { |p| p['number'] }
|