pronto 0.9.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/CODEOWNERS +3 -0
- data/CHANGELOG.md +144 -56
- data/CONTRIBUTING.md +1 -1
- data/LICENSE +1 -1
- data/README.md +140 -28
- data/lib/pronto.rb +2 -0
- data/lib/pronto/bitbucket.rb +7 -0
- data/lib/pronto/cli.rb +10 -5
- data/lib/pronto/clients/bitbucket_client.rb +52 -13
- data/lib/pronto/clients/bitbucket_server_client.rb +1 -1
- data/lib/pronto/config.rb +17 -1
- data/lib/pronto/config_file.rb +7 -3
- data/lib/pronto/formatter/bitbucket_pull_request_formatter.rb +10 -0
- data/lib/pronto/formatter/checkstyle_formatter.rb +1 -1
- data/lib/pronto/formatter/formatter.rb +2 -0
- data/lib/pronto/formatter/git_formatter.rb +2 -0
- data/lib/pronto/formatter/github_combined_status_formatter.rb +24 -0
- data/lib/pronto/formatter/github_pull_request_review_formatter.rb +1 -1
- data/lib/pronto/formatter/gitlab_merge_request_review_formatter.rb +29 -0
- data/lib/pronto/formatter/json_formatter.rb +1 -1
- data/lib/pronto/formatter/null_formatter.rb +1 -1
- data/lib/pronto/formatter/text_formatter.rb +1 -1
- data/lib/pronto/formatter/text_message_decorator.rb +3 -0
- data/lib/pronto/git/patch.rb +0 -2
- data/lib/pronto/git/repository.rb +15 -4
- data/lib/pronto/github.rb +35 -13
- data/lib/pronto/github_pull.rb +43 -0
- data/lib/pronto/gitlab.rb +58 -1
- data/lib/pronto/runner.rb +8 -1
- data/lib/pronto/version.rb +1 -1
- data/pronto.gemspec +11 -11
- metadata +89 -80
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 46470dd7ac5341cc9bebbf13127f62c06d5d5a19cf55578a40439265761d59b3
|
4
|
+
data.tar.gz: a6a51d6593f9c4e521c8adf4a7fca559c3342931e7b207659e620d8d3585678a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e500bc433123227725e318c285995986ba6cf4a5281cbcb2be92aaac130515a788be5fabdd957d9d95e2f58fb95708bed6db193ab340c123760d8210471f4995
|
7
|
+
data.tar.gz: 1342570798515c8efdfcc17eaf383c308c8875031dd61cb4eef5821513c8e3a748b411b7112d5c210dabda11afc0831fc5767f08729dcad8d452e9c1215c60c1
|
data/.github/CODEOWNERS
ADDED
data/CHANGELOG.md
CHANGED
@@ -1,31 +1,119 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## Unreleased
|
4
|
+
|
5
|
+
## 0.11.0
|
6
|
+
|
7
|
+
### New features
|
8
|
+
|
9
|
+
* [#304](https://github.com/prontolabs/pronto/pull/304) add option to limit comments per PR review
|
10
|
+
* [#333](https://github.com/prontolabs/pronto/pull/333) add github_combined_status formatter
|
11
|
+
* [#334](https://github.com/prontolabs/pronto/pull/334) add configurable review_type for GitHub (with REQUEST_CHANGES as default)
|
12
|
+
* [#351](https://github.com/prontolabs/pronto/pull/351) add gitLab_mr formatter
|
13
|
+
* [#369](https://github.com/prontolabs/pronto/pull/369) make Pronto::Git::Patch#new_file_path public
|
14
|
+
* update to the BitBucket 2.0 API (_as the 1.0 API was deprecated_) via [#347](https://github.com/prontolabs/pronto/pull/347), [#348](https://github.com/prontolabs/pronto/pull/348), [#352](https://github.com/prontolabs/pronto/pull/352) and [#354](https://github.com/prontolabs/pronto/pull/354)
|
15
|
+
|
16
|
+
### Bugs fixed
|
17
|
+
|
18
|
+
* [#344](https://github.com/prontolabs/pronto/pull/344) treat Gemfile and .gemspecs as Ruby
|
19
|
+
* [#380](https://github.com/prontolabs/pronto/pull/380) fix compatibility with rugged >= 0.99
|
20
|
+
* [#387](https://github.com/prontolabs/pronto/pull/387) fix running pronto inside git submodules
|
21
|
+
|
22
|
+
### Changes
|
23
|
+
|
24
|
+
* [#370](https://github.com/prontolabs/pronto/pull/370) allow thor 1.x gem versions
|
25
|
+
* [#379](https://github.com/prontolabs/pronto/pull/379) allow rugged 1.0.x gem versions
|
26
|
+
* [#386](https://github.com/prontolabs/pronto/pull/386) add ruby 2.7 to CI
|
27
|
+
* [#390](https://github.com/prontolabs/pronto/pull/390) fix issue with generating Sorbet RBI
|
28
|
+
* [#396](https://github.com/prontolabs/pronto/pull/396) add support for Ruby 3.0
|
29
|
+
* document/improve GitHub Actions integration in README.md via [#360](https://github.com/prontolabs/pronto/pull/360), [#378](https://github.com/prontolabs/pronto/pull/378) and [#389](https://github.com/prontolabs/pronto/pull/389)
|
30
|
+
* add links to additional pronto runners in README.md
|
31
|
+
|
32
|
+
## 0.10.0
|
33
|
+
|
34
|
+
### New features
|
35
|
+
|
36
|
+
* [#301](https://github.com/prontolabs/pronto/pull/301): add ability to auto approve Bitbucket pull requests.
|
37
|
+
* [#331](https://github.com/prontolabs/pronto/pull/331): allow to specify PATH in "run" command.
|
38
|
+
|
39
|
+
### Bugs fixed
|
40
|
+
|
41
|
+
* [#258](https://github.com/prontolabs/pronto/pull/258): fix blame returning nil when file does not exist in the git tree.
|
42
|
+
* [#270](https://github.com/prontolabs/pronto/pull/270): fix ${line} in text format to mean line number.
|
43
|
+
* [#282](https://github.com/prontolabs/pronto/issues/282): relax rainbow dependency.
|
44
|
+
* [#329](https://github.com/prontolabs/pronto/pull/329): correctly handle renamed-only files.
|
45
|
+
|
46
|
+
### Changes
|
47
|
+
|
48
|
+
* Depend on thor `0.20.*`.
|
49
|
+
* [#298](https://github.com/prontolabs/pronto/pull/298): change default GitLab API endpoint to v4.
|
50
|
+
* [#332](https://github.com/prontolabs/pronto/pull/332): remove support for Ruby older than 2.3.0.
|
51
|
+
|
52
|
+
## 0.9.5
|
53
|
+
|
54
|
+
### Bugs fixed
|
55
|
+
|
56
|
+
* [#253](https://github.com/prontolabs/pronto/pull/253): fix an infinite loop when Bitbucket Server sends a paginated response.
|
57
|
+
|
58
|
+
### Changes
|
59
|
+
|
60
|
+
* [#250](https://github.com/prontolabs/pronto/issues/250): allow HTTParty `0.15.*`.
|
61
|
+
|
62
|
+
## 0.9.4
|
63
|
+
|
64
|
+
### Changes
|
65
|
+
|
66
|
+
* [#227](https://github.com/prontolabs/pronto/issues/227): the repository was converted from an individual one (mmozuras/pronto) to an org (prontolabs/pronto).
|
67
|
+
* [#247](https://github.com/prontolabs/pronto/pull/247): try to find GitHub pull request by sha when HEAD is detached.
|
68
|
+
|
69
|
+
### Bugs fixed
|
70
|
+
|
71
|
+
* [#235](https://github.com/prontolabs/pronto/pull/235): do not submit empty pull request reviews to GitHub.
|
72
|
+
|
73
|
+
## 0.9.3
|
74
|
+
|
75
|
+
### Bugs fixed
|
76
|
+
|
77
|
+
* [#234](https://github.com/prontolabs/pronto/pull/234): text formatter was not working, require delegate.rb in text_message_decorator.rb to fix.
|
78
|
+
|
79
|
+
## 0.9.2
|
80
|
+
|
81
|
+
### Bugs fixed
|
82
|
+
|
83
|
+
* [#231](https://github.com/prontolabs/pronto/pull/231): GitHub pull request review formatter was not working in some cases without Accept header.
|
84
|
+
|
85
|
+
## 0.9.1
|
86
|
+
|
87
|
+
### Bugs fixed
|
88
|
+
|
89
|
+
* Poper and some other runners were not working correctly. When using staged/unstaged flags, pass a string instead of Rugged::Commit as commit parameter for runners.
|
90
|
+
|
3
91
|
## 0.9.0
|
4
92
|
|
5
93
|
### New features
|
6
94
|
|
7
|
-
* [#206](https://github.com/
|
8
|
-
* [#204](https://github.com/
|
9
|
-
* [#111](https://github.com/
|
10
|
-
* [#217](https://github.com/
|
95
|
+
* [#206](https://github.com/prontolabs/pronto/pull/216): add Bitbucket Server pull request formatter.
|
96
|
+
* [#204](https://github.com/prontolabs/pronto/pull/204): add ability configure message format for each formatter.
|
97
|
+
* [#111](https://github.com/prontolabs/pronto/issues/111): add `--staged` option for `pronto run` to analyze staged changes.
|
98
|
+
* [#217](https://github.com/prontolabs/pronto/issues/217): add GitHub pull request review formatter.
|
11
99
|
|
12
100
|
### Changes
|
13
101
|
|
14
|
-
* [#193](https://github.com/
|
15
|
-
* [#49](https://github.com/
|
16
|
-
* [#217](https://github.com/
|
17
|
-
* [#224](https://github.com/
|
18
|
-
* [#222](https://github.com/
|
102
|
+
* [#193](https://github.com/prontolabs/pronto/issues/193): rename `pronto run --index` option to `--unstaged`.
|
103
|
+
* [#49](https://github.com/prontolabs/pronto/issues/49): handle nonexistence of GitHub pull requests gracefully.
|
104
|
+
* [#217](https://github.com/prontolabs/pronto/issues/217): depend on `octokit >= 4.7.0`.
|
105
|
+
* [#224](https://github.com/prontolabs/pronto/issues/224): depend on `gitlab >= 4.0.0`.
|
106
|
+
* [#222](https://github.com/prontolabs/pronto/pull/184): prefix PULL_REQUEST_ID env variable with `PRONTO_`.
|
19
107
|
|
20
108
|
### Bugs fixed
|
21
109
|
|
22
|
-
* [#215](https://github.com/
|
110
|
+
* [#215](https://github.com/prontolabs/pronto/pull/215): an exclusion of files for single runner led to those files being excluded for all runners.
|
23
111
|
|
24
112
|
## 0.8.2
|
25
113
|
|
26
114
|
### Bugs fixed
|
27
115
|
|
28
|
-
* [#203](https://github.com/
|
116
|
+
* [#203](https://github.com/prontolabs/pronto/pull/203): fix unintentional class conversion that led to exclude config option not working.
|
29
117
|
|
30
118
|
## 0.8.1
|
31
119
|
|
@@ -35,28 +123,28 @@
|
|
35
123
|
|
36
124
|
### Bugs fixed
|
37
125
|
|
38
|
-
* [#125](https://github.com/
|
126
|
+
* [#125](https://github.com/prontolabs/pronto/issues/125): check whether message has a line before posting to GitLab.
|
39
127
|
* Post on commit comments on correct commit: use message.commit_sha to set comment.sha instead of head.
|
40
|
-
* [#201](https://github.com/
|
128
|
+
* [#201](https://github.com/prontolabs/pronto/issues/201): allow messages without line positions or paths.
|
41
129
|
|
42
130
|
## 0.8.0
|
43
131
|
|
44
132
|
### New features
|
45
133
|
|
46
|
-
* [#199](https://github.com/
|
134
|
+
* [#199](https://github.com/prontolabs/pronto/pull/199): add support for Ruby 2.4.0.
|
47
135
|
|
48
136
|
### Changes
|
49
137
|
|
50
|
-
* [#181](https://github.com/
|
51
|
-
* [#184](https://github.com/
|
52
|
-
* [#185](https://github.com/
|
138
|
+
* [#181](https://github.com/prontolabs/pronto/pull/181): add ENV variables for all configuration options.
|
139
|
+
* [#184](https://github.com/prontolabs/pronto/pull/184): prefix all ENV variables with `PRONTO_`.
|
140
|
+
* [#185](https://github.com/prontolabs/pronto/pull/185): allow excluding files to lint for single runner.
|
53
141
|
|
54
142
|
### Bugs fixed
|
55
143
|
|
56
|
-
* [#179](https://github.com/
|
57
|
-
* [#187](https://github.com/
|
58
|
-
* [#189](https://github.com/
|
59
|
-
* [#195](https://github.com/
|
144
|
+
* [#179](https://github.com/prontolabs/pronto/pull/179): correctly select branch name for fix Bitbucket pull request formatter.
|
145
|
+
* [#187](https://github.com/prontolabs/pronto/pull/187): correctly handle nil/false with consolidate_comments config option.
|
146
|
+
* [#189](https://github.com/prontolabs/pronto/pull/189): do not post anything when all consolidated comments already exist.
|
147
|
+
* [#195](https://github.com/prontolabs/pronto/pull/195): fix warning for default formatters value.
|
60
148
|
|
61
149
|
## 0.7.1
|
62
150
|
|
@@ -66,47 +154,47 @@
|
|
66
154
|
|
67
155
|
### Bugs fixed
|
68
156
|
|
69
|
-
* [#149](https://github.com/
|
157
|
+
* [#149](https://github.com/prontolabs/pronto/issues/149): use patches to correctly find line position for GitHub pull request formatter.
|
70
158
|
|
71
159
|
## 0.7.0
|
72
160
|
|
73
161
|
### New features
|
74
162
|
|
75
|
-
* [#135](https://github.com/
|
76
|
-
* [#135](https://github.com/
|
77
|
-
* [#134](https://github.com/
|
78
|
-
* [#144](https://github.com/
|
79
|
-
* [#157](https://github.com/
|
80
|
-
* [#154](https://github.com/
|
163
|
+
* [#135](https://github.com/prontolabs/pronto/pull/135): add Bitbucket formatter.
|
164
|
+
* [#135](https://github.com/prontolabs/pronto/pull/135): add Bitbucket pull request formatter.
|
165
|
+
* [#134](https://github.com/prontolabs/pronto/pull/134): colorize text formatter.
|
166
|
+
* [#144](https://github.com/prontolabs/pronto/pull/144): add GitHub status formatter.
|
167
|
+
* [#157](https://github.com/prontolabs/pronto/pull/157): ability to run pronto CLI from within subdirectories of a git repository.
|
168
|
+
* [#154](https://github.com/prontolabs/pronto/pull/154): add an option to consolidate pull request comments.
|
81
169
|
|
82
170
|
### Changes
|
83
171
|
|
84
|
-
* [#162](https://github.com/
|
172
|
+
* [#162](https://github.com/prontolabs/pronto/pull/162): don't count info messages for error exit code.
|
85
173
|
|
86
174
|
### Bugs fixed
|
87
175
|
|
88
|
-
* [#153](https://github.com/
|
176
|
+
* [#153](https://github.com/prontolabs/pronto/pull/153): correctly get repo_path.
|
89
177
|
|
90
178
|
## 0.6.0
|
91
179
|
|
92
180
|
### New features
|
93
181
|
|
94
182
|
* Add `-V/--verbose-version` option that displays Ruby version.
|
95
|
-
* [#127](https://github.com/
|
96
|
-
* [#18](https://github.com/
|
97
|
-
* [#83](https://github.com/
|
183
|
+
* [#127](https://github.com/prontolabs/pronto/pull/127): ability to specify `max_warnings` via configuration or environment variable.
|
184
|
+
* [#18](https://github.com/prontolabs/pronto/issues/18): ability to specify `verbose` via configuration, which can provide more output for debugging purposes.
|
185
|
+
* [#83](https://github.com/prontolabs/pronto/issues/83): support multiple formatters as an option to `pronto run`.
|
98
186
|
|
99
187
|
### Changes
|
100
188
|
|
101
189
|
* `--version` only displays the version itself without any additional text.
|
102
190
|
* Replace `Pronto.gem_names` with `Pronto::GemNames.new.to_a`.
|
103
|
-
* [#116](https://github.com/
|
104
|
-
* [#123](https://github.com/
|
191
|
+
* [#116](https://github.com/prontolabs/pronto/pull/116): improve GitHub formatter error output.
|
192
|
+
* [#123](https://github.com/prontolabs/pronto/pull/126): add runner attribute to message initialization.
|
105
193
|
* Runner expects to receive patches/commit via `initialize(patches, commit)`, instead of `run(patches, commit)`.
|
106
194
|
|
107
195
|
### Bugs fixed
|
108
196
|
|
109
|
-
* [#122](https://github.com/
|
197
|
+
* [#122](https://github.com/prontolabs/pronto/pull/122): ignore symlink directories.
|
110
198
|
|
111
199
|
## 0.5.3
|
112
200
|
|
@@ -130,25 +218,25 @@
|
|
130
218
|
|
131
219
|
### New features
|
132
220
|
|
133
|
-
* [#104](https://github.com/
|
134
|
-
* [#86](https://github.com/
|
135
|
-
* [#77](https://github.com/
|
136
|
-
* [#108](https://github.com/
|
221
|
+
* [#104](https://github.com/prontolabs/pronto/pull/104): configure via .pronto.yml file.
|
222
|
+
* [#86](https://github.com/prontolabs/pronto/pull/86): ability to specify GitHub slug via configuration or environment variable.
|
223
|
+
* [#77](https://github.com/prontolabs/pronto/pull/77): ability to specify GitHub endpoints via configuration or environment variable.
|
224
|
+
* [#108](https://github.com/prontolabs/pronto/pull/108): ability to specify excluded files via configuration.
|
137
225
|
|
138
226
|
### Changes
|
139
227
|
|
140
|
-
* [#82](https://github.com/
|
141
|
-
* [#107](https://github.com/
|
228
|
+
* [#82](https://github.com/prontolabs/pronto/pull/82): treat Rake files as Ruby files.
|
229
|
+
* [#107](https://github.com/prontolabs/pronto/pull/107): use desc: instead of banner: for CLI options descriptions.
|
142
230
|
|
143
231
|
### Bugs fixed
|
144
232
|
|
145
|
-
* [#87](https://github.com/
|
146
|
-
* [#91](https://github.com/
|
147
|
-
* [#92](https://github.com/
|
148
|
-
* [#93](https://github.com/
|
149
|
-
* [#94](https://github.com/
|
150
|
-
* [poper#4](https://github.com/
|
151
|
-
* [#101](https://github.com/
|
233
|
+
* [#87](https://github.com/prontolabs/pronto/pull/87): handle github remote urls without .git suffix.
|
234
|
+
* [#91](https://github.com/prontolabs/pronto/pull/91): find position in full diff and fix how commit id is used in GithubPullRequestFormatter.
|
235
|
+
* [#92](https://github.com/prontolabs/pronto/pull/92): ignore failed pull request comments.
|
236
|
+
* [#93](https://github.com/prontolabs/pronto/pull/93): comments didn't have position when outdated.
|
237
|
+
* [#94](https://github.com/prontolabs/pronto/pull/94): duplicate comment detection was failing for large GitHub pull requests.
|
238
|
+
* [poper#4](https://github.com/prontolabs/pronto-poper/issues/4): handle message uniqueness when they're without line numbers.
|
239
|
+
* [#101](https://github.com/prontolabs/pronto/pull/101): make GitLab work with ssh port urls.
|
152
240
|
|
153
241
|
## 0.4.3
|
154
242
|
|
@@ -166,16 +254,16 @@
|
|
166
254
|
|
167
255
|
### Bugs fixed
|
168
256
|
|
169
|
-
* [#58](https://github.com/
|
257
|
+
* [#58](https://github.com/prontolabs/pronto/pull/58): GitlabFormatter uses a high +per_page+ value to avoid pagination (and thus duplicate comments).
|
170
258
|
|
171
259
|
## 0.4.0
|
172
260
|
|
173
261
|
### New features
|
174
262
|
|
175
263
|
* Try to detect pull request id automatically, if `PULL_REQUEST_ID` is not specified. Inspired by @willnet/prid.
|
176
|
-
* [#40](https://github.com/
|
177
|
-
* [#50](https://github.com/
|
178
|
-
* [#52](https://github.com/
|
264
|
+
* [#40](https://github.com/prontolabs/pronto/issues/40): add '--index' option for 'pronto run'. Pronto analyzes changes before committing.
|
265
|
+
* [#50](https://github.com/prontolabs/pronto/pull/50): add GitLab formatter
|
266
|
+
* [#52](https://github.com/prontolabs/pronto/pull/52): allow specifying a path for 'pronto run'.
|
179
267
|
|
180
268
|
### Changes
|
181
269
|
|
@@ -203,11 +291,11 @@
|
|
203
291
|
|
204
292
|
### New features
|
205
293
|
|
206
|
-
* [#27](https://github.com/
|
207
|
-
* [#16](https://github.com/
|
294
|
+
* [#27](https://github.com/prontolabs/pronto/issues/27): '--exit-code' option for 'pronto run'. Pronto exits with non-zero code if there were any warnings/errors.
|
295
|
+
* [#16](https://github.com/prontolabs/pronto/issues/16): new formatter: GithubPullRequestFormatter. Writes review comments on GitHub pull requests.
|
208
296
|
|
209
297
|
### Changes
|
210
298
|
|
211
|
-
* [#29](https://github.com/
|
299
|
+
* [#29](https://github.com/prontolabs/pronto/issues/29): be compatible and depend on rugged '0.21.0'.
|
212
300
|
* Performance improvement: use Rugged::Blame instead of one provided by Grit.
|
213
301
|
* Performance improvement: cache comments retrieved from GitHub.
|
data/CONTRIBUTING.md
CHANGED
@@ -27,7 +27,7 @@ do so.
|
|
27
27
|
* Open a [pull request][4] that relates to *only* one subject with a clear title
|
28
28
|
and description in grammatically correct, complete sentences.
|
29
29
|
|
30
|
-
[1]: https://github.com/
|
30
|
+
[1]: https://github.com/prontolabs/pronto/issues
|
31
31
|
[2]: http://gun.io/blog/how-to-github-fork-branch-and-pull-request
|
32
32
|
[3]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
|
33
33
|
[4]: https://help.github.com/articles/using-pull-requests
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,20 +1,19 @@
|
|
1
1
|
# Pronto
|
2
2
|
|
3
|
-
[![Build Status](https://secure.travis-ci.org/
|
4
|
-
[![Coverage Status](https://img.shields.io/codeclimate/coverage/
|
5
|
-
[![Code Climate](https://codeclimate.com/github/
|
3
|
+
[![Build Status](https://secure.travis-ci.org/prontolabs/pronto.svg)](http://travis-ci.org/prontolabs/pronto)
|
4
|
+
[![Coverage Status](https://img.shields.io/codeclimate/coverage/prontolabs/pronto.svg)](https://codeclimate.com/github/prontolabs/pronto)
|
5
|
+
[![Code Climate](https://codeclimate.com/github/prontolabs/pronto.svg)](https://codeclimate.com/github/prontolabs/pronto)
|
6
6
|
[![Gem Version](https://badge.fury.io/rb/pronto.svg)](http://badge.fury.io/rb/pronto)
|
7
|
-
[![
|
8
|
-
[![Inline docs](http://inch-ci.org/github/mmozuras/pronto.svg)](http://inch-ci.org/github/mmozuras/pronto)
|
7
|
+
[![Inline docs](http://inch-ci.org/github/prontolabs/pronto.svg)](http://inch-ci.org/github/prontolabs/pronto)
|
9
8
|
|
10
9
|
**Pronto** runs analysis quickly by checking only the relevant changes. Created to
|
11
10
|
be used on [GitHub pull requests](#github-integration), but also works [locally](#local-changes) and integrates with [GitLab](#gitlab-integration) and [Bitbucket](#bitbucket-integration).
|
12
11
|
Perfect if you want to find out quickly if a branch introduces changes that conform
|
13
|
-
to your [styleguide](https://github.com/
|
12
|
+
to your [styleguide](https://github.com/prontolabs/pronto-rubocop), [are DRY](https://github.com/prontolabs/pronto-flay), [don't introduce security holes](https://github.com/prontolabs/pronto-brakeman) and [more](#runners).
|
14
13
|
|
15
14
|
![Pronto demo](pronto.gif "")
|
16
15
|
|
17
|
-
_This README might be ahead of the latest release. Find the README for v0.9.
|
16
|
+
_This README might be ahead of the latest release. Find the README for v0.9.2 [here](https://github.com/prontolabs/pronto/blob/v0.9.2/README.md)._
|
18
17
|
|
19
18
|
* [Installation](#installation)
|
20
19
|
* [Usage](#usage)
|
@@ -105,18 +104,46 @@ Then just run it:
|
|
105
104
|
$ PRONTO_GITHUB_ACCESS_TOKEN=token pronto run -f github -c origin/master
|
106
105
|
```
|
107
106
|
|
108
|
-
|
107
|
+
If you want comments to appear on pull request diff, instead of commit:
|
109
108
|
|
110
109
|
```sh
|
111
110
|
$ PRONTO_GITHUB_ACCESS_TOKEN=token pronto run -f github_pr -c origin/master
|
112
111
|
```
|
113
112
|
|
113
|
+
If you want review to appear on pull request diff, instead of separate comments:
|
114
|
+
|
115
|
+
```sh
|
116
|
+
$ PRONTO_GITHUB_ACCESS_TOKEN=token pronto run -f github_pr_review -c origin/master
|
117
|
+
```
|
118
|
+
|
119
|
+
All the **N** pending comments will be now separated into **X** number of PR reviews.
|
120
|
+
The number of the PR reviews will be controlled by an additional environment variable or with the help of a config setting.
|
121
|
+
This way, by a single pronto run, all the comments will be published to the PR, but divided into small reviews
|
122
|
+
in order to avoid the rate limit of the providers.
|
123
|
+
|
124
|
+
```
|
125
|
+
X = N / {PRONTO_WARNINGS_PER_REVIEW || warnings_per_review || 30})
|
126
|
+
```
|
127
|
+
|
128
|
+
Note: In case no environment variable or config setting is specified in `.pronto.yml`,
|
129
|
+
a default value of `30` will be used.
|
130
|
+
|
131
|
+
```sh
|
132
|
+
$ PRONTO_WARNINGS_PER_REVIEW=30 PRONTO_GITHUB_ACCESS_TOKEN=token pronto run -f github_pr_review -c origin/master
|
133
|
+
```
|
134
|
+
|
114
135
|
Use `GithubStatusFormatter` to submit [commit status](https://github.com/blog/1227-commit-status-api):
|
115
136
|
|
116
137
|
```sh
|
117
138
|
$ PRONTO_GITHUB_ACCESS_TOKEN=token pronto run -f github_status -c origin/master
|
118
139
|
```
|
119
140
|
|
141
|
+
If you want to show a one single status for all runners, instead of status per runner:
|
142
|
+
|
143
|
+
```sh
|
144
|
+
$ PRONTO_GITHUB_ACCESS_TOKEN=token pronto run -f github_combined_status -c origin/master
|
145
|
+
```
|
146
|
+
|
120
147
|
It's possible to combine multiple formatters.
|
121
148
|
To get both pull request comments and commit status summary use:
|
122
149
|
|
@@ -129,12 +156,45 @@ As an alternative, you can also set up a rake task:
|
|
129
156
|
```ruby
|
130
157
|
Pronto::GemNames.new.to_a.each { |gem_name| require "pronto/#{gem_name}" }
|
131
158
|
|
132
|
-
formatter = Pronto::Formatter::GithubFormatter.new #
|
159
|
+
formatter = Pronto::Formatter::GithubFormatter.new # also possible: GithubPullRequestFormatter, GithubPullRequestReviewFormatter
|
133
160
|
status_formatter = Pronto::Formatter::GithubStatusFormatter.new
|
134
161
|
formatters = [formatter, status_formatter]
|
135
162
|
Pronto.run('origin/master', '.', formatters)
|
136
163
|
```
|
137
164
|
|
165
|
+
#### GitHub Actions Integration
|
166
|
+
|
167
|
+
You can also run Pronto as a GitHub action.
|
168
|
+
|
169
|
+
Here's an example `.github/workflows/pronto.yml` workflow file using the `github_status` and `github_pr` formatters and running on each GitHub PR, with `pronto-rubocop` as the runner:
|
170
|
+
|
171
|
+
|
172
|
+
```yml
|
173
|
+
name: Pronto
|
174
|
+
on: [pull_request]
|
175
|
+
|
176
|
+
jobs:
|
177
|
+
pronto:
|
178
|
+
|
179
|
+
runs-on: ubuntu-latest
|
180
|
+
|
181
|
+
steps:
|
182
|
+
- name: Checkout code
|
183
|
+
uses: actions/checkout@v2
|
184
|
+
- run: |
|
185
|
+
git fetch --no-tags --prune --depth=10 origin +refs/heads/*:refs/remotes/origin/*
|
186
|
+
- name: Setup Ruby
|
187
|
+
uses: ruby/setup-ruby@v1
|
188
|
+
- name: Setup pronto
|
189
|
+
run: gem install pronto pronto-rubocop
|
190
|
+
- name: Run Pronto
|
191
|
+
run: pronto run -f github_status github_pr -c origin/${{ github.base_ref }}
|
192
|
+
env:
|
193
|
+
PRONTO_PULL_REQUEST_ID: ${{ github.event.pull_request.number }}
|
194
|
+
PRONTO_GITHUB_ACCESS_TOKEN: "${{ github.token }}"
|
195
|
+
```
|
196
|
+
check Wiki on [GitHub Actions Integration](https://github.com/prontolabs/pronto/wiki/GitHub-Actions-Integration) for more info.
|
197
|
+
|
138
198
|
### GitLab Integration
|
139
199
|
|
140
200
|
You can run Pronto as a step of your CI builds and get the results as comments
|
@@ -145,7 +205,7 @@ on GitLab commits using `GitlabFormatter`.
|
|
145
205
|
Set the `PRONTO_GITLAB_API_ENDPOINT` environment variable or value in `.pronto.yml` to
|
146
206
|
your API endpoint URL. If you are using Gitlab.com's hosted service your
|
147
207
|
endpoint will be set by default.
|
148
|
-
Set the `PRONTO_GITLAB_API_PRIVATE_TOKEN` environment variable or value in `.pronto.yml
|
208
|
+
Set the `PRONTO_GITLAB_API_PRIVATE_TOKEN` environment variable or value in `.pronto.yml`
|
149
209
|
to your Gitlab private token which you can find in your account settings.
|
150
210
|
|
151
211
|
Then just run it:
|
@@ -154,6 +214,29 @@ Then just run it:
|
|
154
214
|
$ PRONTO_GITLAB_API_PRIVATE_TOKEN=token pronto run -f gitlab -c origin/master
|
155
215
|
```
|
156
216
|
|
217
|
+
**note: this requires at least Gitlab 11.6+**
|
218
|
+
|
219
|
+
Merge request integration:
|
220
|
+
|
221
|
+
```sh
|
222
|
+
$ PRONTO_GITLAB_API_PRIVATE_TOKEN=token PRONTO_PULL_REQUEST_ID=id pronto run -f gitlab_mr -c origin/master
|
223
|
+
```
|
224
|
+
|
225
|
+
On GitLabCI make make sure to run Pronto in a [merge request pipeline](https://docs.gitlab.com/ce/ci/merge_request_pipelines/):
|
226
|
+
|
227
|
+
```yml
|
228
|
+
lint:
|
229
|
+
image: ruby
|
230
|
+
variables:
|
231
|
+
PRONTO_GITLAB_API_ENDPOINT: "https://gitlab.com/api/v4"
|
232
|
+
PRONTO_GITLAB_API_PRIVATE_TOKEN: token
|
233
|
+
only:
|
234
|
+
- merge_requests
|
235
|
+
script:
|
236
|
+
- bundle install
|
237
|
+
- bundle exec pronto run -f gitlab_mr -c origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME
|
238
|
+
```
|
239
|
+
|
157
240
|
### Bitbucket Integration
|
158
241
|
|
159
242
|
You can run Pronto as a step of your CI builds and get the results as comments
|
@@ -162,7 +245,6 @@ on Bitbucket commits using `BitbucketFormatter` or `BitbucketPullRequestFormatte
|
|
162
245
|
Add Pronto runners you want to use to your Gemfile:
|
163
246
|
|
164
247
|
Set the PRONTO_BITBUCKET_USERNAME and PRONTO_BITBUCKET_PASSWORD environment variables or values in `.pronto.yml`.
|
165
|
-
.
|
166
248
|
|
167
249
|
Then just run it:
|
168
250
|
|
@@ -192,7 +274,7 @@ eslint:
|
|
192
274
|
exclude:
|
193
275
|
- 'app/assets/**/*'
|
194
276
|
github:
|
195
|
-
slug:
|
277
|
+
slug: prontolabs/pronto
|
196
278
|
access_token: B26354
|
197
279
|
api_endpoint: https://api.github.com/
|
198
280
|
web_endpoint: https://github.com/
|
@@ -201,11 +283,12 @@ gitlab:
|
|
201
283
|
api_private_token: 46751
|
202
284
|
api_endpoint: https://api.vinted.com/gitlab
|
203
285
|
bitbucket:
|
204
|
-
slug:
|
286
|
+
slug: prontolabs/pronto
|
205
287
|
username: user
|
206
288
|
password: pass
|
207
289
|
web_endpoint: https://bitbucket.org/
|
208
290
|
max_warnings: 150
|
291
|
+
warnings_per_review: 30
|
209
292
|
verbose: false
|
210
293
|
```
|
211
294
|
|
@@ -256,54 +339,83 @@ The following values are available only to the text formatter:
|
|
256
339
|
Pronto can run various tools and libraries, as long as there's a runner for it.
|
257
340
|
Currently available:
|
258
341
|
|
259
|
-
* [pronto-
|
342
|
+
* [pronto-bigfiles](https://github.com/apiology/pronto-bigfiles)
|
343
|
+
* [pronto-blacklist](https://github.com/pbstriker38/pronto-blacklist)
|
344
|
+
* [pronto-brakeman](https://github.com/prontolabs/pronto-brakeman)
|
345
|
+
* [pronto-bundler_audit](https://github.com/pdobb/pronto-bundler_audit)
|
346
|
+
* [pronto-checkstyle](https://github.com/seikichi/pronto-checkstyle)
|
260
347
|
* [pronto-coffeelint](https://github.com/siebertm/pronto-coffeelint)
|
348
|
+
* [pronto-clang_format](https://github.com/micjabbour/pronto-clang_format)
|
349
|
+
* [pronto-clang_tidy](https://github.com/micjabbour/pronto-clang_tidy)
|
261
350
|
* [pronto-clippy](https://github.com/hauleth/pronto-clippy)
|
262
351
|
* [pronto-credo](https://github.com/carakan/pronto-credo)
|
352
|
+
* [pronto-dialyxir](https://github.com/Apelsinka223/pronto-dialyxir)
|
263
353
|
* [pronto-dialyzer](https://github.com/iurifq/pronto-dialyzer)
|
354
|
+
* [pronto-dirty_words](https://github.com/kevinjalbert/pronto-dirty_words)
|
264
355
|
* [pronto-dogma](https://github.com/iurifq/pronto-dogma)
|
265
|
-
* [pronto-
|
356
|
+
* [pronto-erb_lint](https://github.com/tleish/pronto-erb_lint)
|
357
|
+
* [pronto-eslint](https://github.com/prontolabs/pronto-eslint) (uses [eslintrb](https://github.com/zendesk/eslintrb))
|
266
358
|
* [pronto-eslint_npm](https://github.com/doits/pronto-eslint_npm) (uses eslint installed from npm)
|
267
|
-
* [pronto-fasterer](https://github.com/
|
268
|
-
* [pronto-
|
269
|
-
* [pronto-
|
270
|
-
* [pronto-
|
359
|
+
* [pronto-fasterer](https://github.com/prontolabs/pronto-fasterer)
|
360
|
+
* [pronto-findbugs](https://github.com/seikichi/pronto-findbugs)
|
361
|
+
* [pronto-flake8](https://github.com/scoremedia/pronto-flake8)
|
362
|
+
* [pronto-flay](https://github.com/prontolabs/pronto-flay)
|
363
|
+
* [pronto-flow](https://github.com/kevinjalbert/pronto-flow)
|
364
|
+
* [pronto-foodcritic](https://github.com/prontolabs/pronto-foodcritic)
|
365
|
+
* [pronto-goodcheck](https://github.com/aergonaut/pronto-goodcheck)
|
366
|
+
* [pronto-haml](https://github.com/prontolabs/pronto-haml)
|
367
|
+
* [pronto-hlint](https://github.com/fretlink/pronto-hlint/) (uses Haskell code suggestions [hlint](https://github.com/ndmitchell/hlint))
|
368
|
+
* [pronto-infer](https://github.com/seikichi/pronto-infer)
|
369
|
+
* [pronto-inspec](https://github.com/stiller-leser/pronto-inspec)
|
271
370
|
* [pronto-jscs](https://github.com/spajus/pronto-jscs)
|
272
|
-
* [pronto-jshint](https://github.com/
|
371
|
+
* [pronto-jshint](https://github.com/prontolabs/pronto-jshint)
|
273
372
|
* [pronto-json](https://github.com/deees/pronto-json)
|
274
373
|
* [pronto-luacheck](https://github.com/seikichi/pronto-luacheck)
|
275
374
|
* [pronto-perl_lint](https://github.com/bells17/pronto-perl_lint)
|
276
375
|
* [pronto-phpcs](https://github.com/EllisV/pronto-phpcs)
|
277
376
|
* [pronto-phpmd](https://github.com/EllisV/pronto-phpmd)
|
278
|
-
* [pronto-
|
279
|
-
* [pronto-
|
377
|
+
* [pronto-phpstan](https://github.com/Powerhamster/pronto-phpstan)
|
378
|
+
* [pronto-poper](https://github.com/prontolabs/pronto-poper)
|
379
|
+
* [pronto-punchlist](https://github.com/apiology/pronto-punchlist)
|
380
|
+
* [pronto-rails_best_practices](https://github.com/prontolabs/pronto-rails_best_practices)
|
381
|
+
* [pronto-rails_data_schema](https://github.com/mbajur/pronto-rails_data_schema)
|
280
382
|
* [pronto-rails_schema](https://github.com/raimondasv/pronto-rails_schema)
|
281
|
-
* [pronto-reek](https://github.com/
|
282
|
-
* [pronto-rubocop](https://github.com/
|
283
|
-
* [pronto-scss](https://github.com/
|
383
|
+
* [pronto-reek](https://github.com/prontolabs/pronto-reek)
|
384
|
+
* [pronto-rubocop](https://github.com/prontolabs/pronto-rubocop)
|
385
|
+
* [pronto-scss](https://github.com/prontolabs/pronto-scss)
|
284
386
|
* [pronto-shellcheck](https://github.com/pclalv/pronto-shellcheck)
|
285
387
|
* [pronto-slim](https://github.com/nysthee/pronto-slim)
|
286
388
|
* [pronto-slim_lint](https://github.com/ibrahima/pronto-slim_lint)
|
287
|
-
* [pronto-
|
389
|
+
* [pronto-sorbet](https://github.com/teamsimplepay/pronto-sorbet)
|
390
|
+
* [pronto-spell](https://github.com/prontolabs/pronto-spell)
|
391
|
+
* [pronto-standardrb](https://github.com/julianrubisch/pronto-standardrb)
|
288
392
|
* [pronto-stylelint](https://github.com/kevinjalbert/pronto-stylelint)
|
289
393
|
* [pronto-swiftlint](https://github.com/ajanauskas/pronto-swiftlint)
|
290
394
|
* [pronto-tailor](https://github.com/ajanauskas/pronto-tailor)
|
291
395
|
* [pronto-textlint](https://github.com/seikichi/pronto-textlint)
|
396
|
+
* [pronto-tslint_npm](https://github.com/eprislac/pronto-tslint_npm)
|
397
|
+
* [pronto-yamllint](https://github.com/pauliusm/pronto-yamllint)
|
398
|
+
* [pronto-undercover](https://github.com/grodowski/pronto-undercover)
|
399
|
+
* [pronto-xmllint](https://github.com/pauliusm/pronto-xmllint)
|
292
400
|
|
293
401
|
## Articles
|
294
402
|
|
295
403
|
Articles to help you to get started:
|
296
404
|
|
405
|
+
* [Effortless Code Conventions Review for Pull Request Changes](https://jtway.co/effortless-code-review-for-pull-request-changes-241206b1cb04)
|
297
406
|
* [Automating code review with Pronto (and friends)](http://everydayrails.com/2015/02/17/pronto-ruby-code-review.html)
|
298
407
|
* [Setup Pronto with CircleCI](https://medium.com/@MaximAbramchuk/circleci-github-pr-commenting-ruby-scss-coffeescript-javascript-git-and-etc-fbcbe2a378a5#.gk5f14p3j)
|
299
408
|
* [Continuous Static Analysis using Pronto](http://codingfearlessly.com/2014/11/06/continuous-static-analysis/)
|
300
409
|
* [Pronto and git hooks](http://elliotthilaire.net/gem-pronto-and-git-hooks/)
|
301
410
|
* [How to end fruitless dev discussions about your project’s code style?](https://medium.com/appaloosa-store-engineering/how-to-end-fruitless-dev-discussions-about-your-project-s-code-style-245070bff6d4)
|
302
|
-
* [Free automated code reviews using Pronto](https://hovancik.net/blog/2016/04/11/free-automated-code-reviews-using-pronto
|
411
|
+
* [Free automated code reviews using Pronto](https://hovancik.net/blog/2016/04/11/free-automated-code-reviews-using-pronto/)
|
303
412
|
* [Automated Elixir code review with Github, Credo and Travis CI](https://medium.com/fazibear/automated-elixir-code-review-with-github-credo-and-travis-ci-986cd56b8f02)
|
304
413
|
* [Running Rubocop before git commit](https://christoph.luppri.ch/articles/2016/11/21/running-rubocop-before-git-commit/)
|
305
414
|
* [Pronto, Codeship and GitHub for automatic code review](http://abinoam.tl1n.com/pronto-codeship-and-github-for-automatic-code-review/)
|
306
415
|
* [How to automatically review your PRs for style violations with Pronto and RuboCop](https://christoph.luppri.ch/articles/2017/03/05/how-to-automatically-review-your-prs-for-style-violations-with-pronto-and-rubocop/)
|
416
|
+
* [Create your own Pronto Runner](https://kevinjalbert.com/create-your-own-pronto-runner/)
|
417
|
+
* [Make Code Reviews A Little Bit Better With Automation](https://medium.com/jimmy-farrell/make-codes-reviews-a-little-bit-better-with-automation-35640df08a62)
|
418
|
+
* [Stop shipping untested Ruby code with undercover](https://medium.com/futuredev/stop-shipping-untested-ruby-code-with-undercover-1edc963be4a6)
|
307
419
|
|
308
420
|
Make a Pull Request to add something you wrote or found useful.
|
309
421
|
|
@@ -313,4 +425,4 @@ Make a Pull Request to add something you wrote or found useful.
|
|
313
425
|
|
314
426
|
## Copyright
|
315
427
|
|
316
|
-
Copyright (c) 2013-
|
428
|
+
Copyright (c) 2013-2018 Mindaugas Mozūras. See [LICENSE](LICENSE) for further details.
|