pronto 0.9.1 → 0.9.2

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: 9d790438c36a0945548e93b684a0225d4f65b639
4
- data.tar.gz: ca04d65732a2caf6a2fef29ad051dfca62435e73
3
+ metadata.gz: d9e785fa465bad216b0f336498835b2aa1187fd0
4
+ data.tar.gz: 9bb5d7cda10cf493fd3ced190babc7f1cc86c42b
5
5
  SHA512:
6
- metadata.gz: db97dd116571fd0e2e43060e2356805f5a2e1e06b058d23fae943d086b9aae01ff3d57cf3624134100ae55a5fb54ba2cd9159f5d40fa50b0377c8763a6b5dc31
7
- data.tar.gz: 510838cc30c3d6a97340a9940d86876bdc303c391f7f784b75783a16bb410397eaa7911563be9fcbe3d79f251ab26c192379b36a98f01f39c852a46b21264a5d
6
+ metadata.gz: 68cf5d28920fcd9093953af0227ed63cfed52946053980b77e0b274e2a9483cd3279ed16d3ab034a019392b9ee64a325b9b5e600c9180ba3c755c3810078e460
7
+ data.tar.gz: fa5025e68712ae7bc31cb49b3ffe357dae0069af9f567892243fcd853cbf121ea8fb84b32b95b6bf17c19ee8e0bcfd5ab101792625a98221733734cc9cd6f35b
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.2
4
+
5
+ ### Bugs fixed
6
+
7
+ * [#231](https://github.com/mmozuras/pronto/pull/231): GitHub pull request review formatter was not working in some cases without Accept header.
8
+
3
9
  ## 0.9.1
4
10
 
5
11
  ### Bugs fixed
data/README.md CHANGED
@@ -14,7 +14,7 @@ to your [styleguide](https://github.com/mmozuras/pronto-rubocop), [are DRY](http
14
14
 
15
15
  ![Pronto demo](pronto.gif "")
16
16
 
17
- _This README might be ahead of the latest release. Find the README for v0.9.0 [here](https://github.com/mmozuras/pronto/blob/v0.9.0/README.md)._
17
+ _This README might be ahead of the latest release. Find the README for v0.9.2 [here](https://github.com/mmozuras/pronto/blob/v0.9.2/README.md)._
18
18
 
19
19
  * [Installation](#installation)
20
20
  * [Usage](#usage)
@@ -105,12 +105,18 @@ Then just run it:
105
105
  $ PRONTO_GITHUB_ACCESS_TOKEN=token pronto run -f github -c origin/master
106
106
  ```
107
107
 
108
- or, if you want comments to appear on pull request diff, instead of commit:
108
+ If you want comments to appear on pull request diff, instead of commit:
109
109
 
110
110
  ```sh
111
111
  $ PRONTO_GITHUB_ACCESS_TOKEN=token pronto run -f github_pr -c origin/master
112
112
  ```
113
113
 
114
+ If you want review to appear on pull request diff, instead of comments:
115
+
116
+ ```sh
117
+ $ PRONTO_GITHUB_ACCESS_TOKEN=token pronto run -f github_pr_review -c origin/master
118
+ ```
119
+
114
120
  Use `GithubStatusFormatter` to submit [commit status](https://github.com/blog/1227-commit-status-api):
115
121
 
116
122
  ```sh
@@ -129,7 +135,7 @@ As an alternative, you can also set up a rake task:
129
135
  ```ruby
130
136
  Pronto::GemNames.new.to_a.each { |gem_name| require "pronto/#{gem_name}" }
131
137
 
132
- formatter = Pronto::Formatter::GithubFormatter.new # or GithubPullRequestFormatter
138
+ formatter = Pronto::Formatter::GithubFormatter.new # also possible: GithubPullRequestFormatter, GithubPullRequestReviewFormatter
133
139
  status_formatter = Pronto::Formatter::GithubStatusFormatter.new
134
140
  formatters = [formatter, status_formatter]
135
141
  Pronto.run('origin/master', '.', formatters)
@@ -51,7 +51,7 @@ module Pronto
51
51
  if oldval.is_a?(Hash) && newval.is_a?(Hash)
52
52
  oldval.merge(newval, &merger)
53
53
  else
54
- oldval || newval
54
+ oldval.nil? ? newval : oldval
55
55
  end
56
56
  end
57
57
 
@@ -41,6 +41,7 @@ module Pronto
41
41
  def create_pull_request_review(comments)
42
42
  options = {
43
43
  event: 'COMMENT',
44
+ accept: 'application/vnd.github.black-cat-preview+json', # https://developer.github.com/v3/pulls/reviews/#create-a-pull-request-review
44
45
  comments: comments.map do |c|
45
46
  { path: c.path, position: c.position, body: c.body }
46
47
  end
@@ -1,6 +1,6 @@
1
1
  module Pronto
2
2
  module Version
3
- STRING = '0.9.1'.freeze
3
+ STRING = '0.9.2'.freeze
4
4
 
5
5
  MSG = '%s (running on %s %s %s)'.freeze
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pronto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mindaugas Mozūras
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-23 00:00:00.000000000 Z
11
+ date: 2017-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rugged