github_changes 0.1.2 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 271f7ac2411a473f933f57f6abd6e15bc7a1915a
4
- data.tar.gz: 8c9d02ba79d7903207688464906477dcb7c9e193
3
+ metadata.gz: a8f3629bd64337c85dc3643aa3108fe8be5029e9
4
+ data.tar.gz: 1fd0c2e78cb38ef694586c24e8c445ed7da7857e
5
5
  SHA512:
6
- metadata.gz: 3e13751f86e772d8dc7c7a3dc072cea73817f68445d2b4cf4515da0f6175c88281b2f2546de920f179c0afcba528a3a1bad782224baa31df5ef93174d41c73d0
7
- data.tar.gz: 587767b2d9f9be65232b0ba416706ab0196b40f2b6a55540e236b8f2bb890c61a7188d6e9a7989d78be1363eafe55725f51a06fff58475bae788c35287aad461
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 && end_date
40
- abort "Failed to acquire date range from references"
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'] }
@@ -1,3 +1,3 @@
1
1
  module ChangelogGenerator
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github_changes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Rayment