pronto 0.9.2 → 0.11.0
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 +5 -5
- data/.github/CODEOWNERS +3 -0
- data/CHANGELOG.md +133 -57
- data/CONTRIBUTING.md +1 -1
- data/LICENSE +1 -1
- data/README.md +133 -27
- 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 +6 -2
- 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 +13 -2
- data/lib/pronto/github.rb +35 -14
- 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,10 +1,86 @@
|
|
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
|
+
|
3
79
|
## 0.9.2
|
4
80
|
|
5
81
|
### Bugs fixed
|
6
82
|
|
7
|
-
* [#231](https://github.com/
|
83
|
+
* [#231](https://github.com/prontolabs/pronto/pull/231): GitHub pull request review formatter was not working in some cases without Accept header.
|
8
84
|
|
9
85
|
## 0.9.1
|
10
86
|
|
@@ -16,28 +92,28 @@
|
|
16
92
|
|
17
93
|
### New features
|
18
94
|
|
19
|
-
* [#206](https://github.com/
|
20
|
-
* [#204](https://github.com/
|
21
|
-
* [#111](https://github.com/
|
22
|
-
* [#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.
|
23
99
|
|
24
100
|
### Changes
|
25
101
|
|
26
|
-
* [#193](https://github.com/
|
27
|
-
* [#49](https://github.com/
|
28
|
-
* [#217](https://github.com/
|
29
|
-
* [#224](https://github.com/
|
30
|
-
* [#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_`.
|
31
107
|
|
32
108
|
### Bugs fixed
|
33
109
|
|
34
|
-
* [#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.
|
35
111
|
|
36
112
|
## 0.8.2
|
37
113
|
|
38
114
|
### Bugs fixed
|
39
115
|
|
40
|
-
* [#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.
|
41
117
|
|
42
118
|
## 0.8.1
|
43
119
|
|
@@ -47,28 +123,28 @@
|
|
47
123
|
|
48
124
|
### Bugs fixed
|
49
125
|
|
50
|
-
* [#125](https://github.com/
|
126
|
+
* [#125](https://github.com/prontolabs/pronto/issues/125): check whether message has a line before posting to GitLab.
|
51
127
|
* Post on commit comments on correct commit: use message.commit_sha to set comment.sha instead of head.
|
52
|
-
* [#201](https://github.com/
|
128
|
+
* [#201](https://github.com/prontolabs/pronto/issues/201): allow messages without line positions or paths.
|
53
129
|
|
54
130
|
## 0.8.0
|
55
131
|
|
56
132
|
### New features
|
57
133
|
|
58
|
-
* [#199](https://github.com/
|
134
|
+
* [#199](https://github.com/prontolabs/pronto/pull/199): add support for Ruby 2.4.0.
|
59
135
|
|
60
136
|
### Changes
|
61
137
|
|
62
|
-
* [#181](https://github.com/
|
63
|
-
* [#184](https://github.com/
|
64
|
-
* [#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.
|
65
141
|
|
66
142
|
### Bugs fixed
|
67
143
|
|
68
|
-
* [#179](https://github.com/
|
69
|
-
* [#187](https://github.com/
|
70
|
-
* [#189](https://github.com/
|
71
|
-
* [#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.
|
72
148
|
|
73
149
|
## 0.7.1
|
74
150
|
|
@@ -78,47 +154,47 @@
|
|
78
154
|
|
79
155
|
### Bugs fixed
|
80
156
|
|
81
|
-
* [#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.
|
82
158
|
|
83
159
|
## 0.7.0
|
84
160
|
|
85
161
|
### New features
|
86
162
|
|
87
|
-
* [#135](https://github.com/
|
88
|
-
* [#135](https://github.com/
|
89
|
-
* [#134](https://github.com/
|
90
|
-
* [#144](https://github.com/
|
91
|
-
* [#157](https://github.com/
|
92
|
-
* [#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.
|
93
169
|
|
94
170
|
### Changes
|
95
171
|
|
96
|
-
* [#162](https://github.com/
|
172
|
+
* [#162](https://github.com/prontolabs/pronto/pull/162): don't count info messages for error exit code.
|
97
173
|
|
98
174
|
### Bugs fixed
|
99
175
|
|
100
|
-
* [#153](https://github.com/
|
176
|
+
* [#153](https://github.com/prontolabs/pronto/pull/153): correctly get repo_path.
|
101
177
|
|
102
178
|
## 0.6.0
|
103
179
|
|
104
180
|
### New features
|
105
181
|
|
106
182
|
* Add `-V/--verbose-version` option that displays Ruby version.
|
107
|
-
* [#127](https://github.com/
|
108
|
-
* [#18](https://github.com/
|
109
|
-
* [#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`.
|
110
186
|
|
111
187
|
### Changes
|
112
188
|
|
113
189
|
* `--version` only displays the version itself without any additional text.
|
114
190
|
* Replace `Pronto.gem_names` with `Pronto::GemNames.new.to_a`.
|
115
|
-
* [#116](https://github.com/
|
116
|
-
* [#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.
|
117
193
|
* Runner expects to receive patches/commit via `initialize(patches, commit)`, instead of `run(patches, commit)`.
|
118
194
|
|
119
195
|
### Bugs fixed
|
120
196
|
|
121
|
-
* [#122](https://github.com/
|
197
|
+
* [#122](https://github.com/prontolabs/pronto/pull/122): ignore symlink directories.
|
122
198
|
|
123
199
|
## 0.5.3
|
124
200
|
|
@@ -142,25 +218,25 @@
|
|
142
218
|
|
143
219
|
### New features
|
144
220
|
|
145
|
-
* [#104](https://github.com/
|
146
|
-
* [#86](https://github.com/
|
147
|
-
* [#77](https://github.com/
|
148
|
-
* [#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.
|
149
225
|
|
150
226
|
### Changes
|
151
227
|
|
152
|
-
* [#82](https://github.com/
|
153
|
-
* [#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.
|
154
230
|
|
155
231
|
### Bugs fixed
|
156
232
|
|
157
|
-
* [#87](https://github.com/
|
158
|
-
* [#91](https://github.com/
|
159
|
-
* [#92](https://github.com/
|
160
|
-
* [#93](https://github.com/
|
161
|
-
* [#94](https://github.com/
|
162
|
-
* [poper#4](https://github.com/
|
163
|
-
* [#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.
|
164
240
|
|
165
241
|
## 0.4.3
|
166
242
|
|
@@ -178,16 +254,16 @@
|
|
178
254
|
|
179
255
|
### Bugs fixed
|
180
256
|
|
181
|
-
* [#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).
|
182
258
|
|
183
259
|
## 0.4.0
|
184
260
|
|
185
261
|
### New features
|
186
262
|
|
187
263
|
* Try to detect pull request id automatically, if `PULL_REQUEST_ID` is not specified. Inspired by @willnet/prid.
|
188
|
-
* [#40](https://github.com/
|
189
|
-
* [#50](https://github.com/
|
190
|
-
* [#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'.
|
191
267
|
|
192
268
|
### Changes
|
193
269
|
|
@@ -215,11 +291,11 @@
|
|
215
291
|
|
216
292
|
### New features
|
217
293
|
|
218
|
-
* [#27](https://github.com/
|
219
|
-
* [#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.
|
220
296
|
|
221
297
|
### Changes
|
222
298
|
|
223
|
-
* [#29](https://github.com/
|
299
|
+
* [#29](https://github.com/prontolabs/pronto/issues/29): be compatible and depend on rugged '0.21.0'.
|
224
300
|
* Performance improvement: use Rugged::Blame instead of one provided by Grit.
|
225
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
|
-
[](http://travis-ci.org/prontolabs/pronto)
|
4
|
+
[](https://codeclimate.com/github/prontolabs/pronto)
|
5
|
+
[](https://codeclimate.com/github/prontolabs/pronto)
|
6
6
|
[](http://badge.fury.io/rb/pronto)
|
7
|
-
[](http://inch-ci.org/github/mmozuras/pronto)
|
7
|
+
[](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
|

|
16
15
|
|
17
|
-
_This README might be ahead of the latest release. Find the README for v0.9.2 [here](https://github.com/
|
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)
|
@@ -111,18 +110,40 @@ If you want comments to appear on pull request diff, instead of commit:
|
|
111
110
|
$ PRONTO_GITHUB_ACCESS_TOKEN=token pronto run -f github_pr -c origin/master
|
112
111
|
```
|
113
112
|
|
114
|
-
If you want review to appear on pull request diff, instead of comments:
|
113
|
+
If you want review to appear on pull request diff, instead of separate comments:
|
115
114
|
|
116
115
|
```sh
|
117
116
|
$ PRONTO_GITHUB_ACCESS_TOKEN=token pronto run -f github_pr_review -c origin/master
|
118
117
|
```
|
119
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
|
+
|
120
135
|
Use `GithubStatusFormatter` to submit [commit status](https://github.com/blog/1227-commit-status-api):
|
121
136
|
|
122
137
|
```sh
|
123
138
|
$ PRONTO_GITHUB_ACCESS_TOKEN=token pronto run -f github_status -c origin/master
|
124
139
|
```
|
125
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
|
+
|
126
147
|
It's possible to combine multiple formatters.
|
127
148
|
To get both pull request comments and commit status summary use:
|
128
149
|
|
@@ -141,6 +162,39 @@ formatters = [formatter, status_formatter]
|
|
141
162
|
Pronto.run('origin/master', '.', formatters)
|
142
163
|
```
|
143
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
|
+
|
144
198
|
### GitLab Integration
|
145
199
|
|
146
200
|
You can run Pronto as a step of your CI builds and get the results as comments
|
@@ -151,7 +205,7 @@ on GitLab commits using `GitlabFormatter`.
|
|
151
205
|
Set the `PRONTO_GITLAB_API_ENDPOINT` environment variable or value in `.pronto.yml` to
|
152
206
|
your API endpoint URL. If you are using Gitlab.com's hosted service your
|
153
207
|
endpoint will be set by default.
|
154
|
-
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`
|
155
209
|
to your Gitlab private token which you can find in your account settings.
|
156
210
|
|
157
211
|
Then just run it:
|
@@ -160,6 +214,29 @@ Then just run it:
|
|
160
214
|
$ PRONTO_GITLAB_API_PRIVATE_TOKEN=token pronto run -f gitlab -c origin/master
|
161
215
|
```
|
162
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
|
+
|
163
240
|
### Bitbucket Integration
|
164
241
|
|
165
242
|
You can run Pronto as a step of your CI builds and get the results as comments
|
@@ -168,7 +245,6 @@ on Bitbucket commits using `BitbucketFormatter` or `BitbucketPullRequestFormatte
|
|
168
245
|
Add Pronto runners you want to use to your Gemfile:
|
169
246
|
|
170
247
|
Set the PRONTO_BITBUCKET_USERNAME and PRONTO_BITBUCKET_PASSWORD environment variables or values in `.pronto.yml`.
|
171
|
-
.
|
172
248
|
|
173
249
|
Then just run it:
|
174
250
|
|
@@ -198,7 +274,7 @@ eslint:
|
|
198
274
|
exclude:
|
199
275
|
- 'app/assets/**/*'
|
200
276
|
github:
|
201
|
-
slug:
|
277
|
+
slug: prontolabs/pronto
|
202
278
|
access_token: B26354
|
203
279
|
api_endpoint: https://api.github.com/
|
204
280
|
web_endpoint: https://github.com/
|
@@ -207,11 +283,12 @@ gitlab:
|
|
207
283
|
api_private_token: 46751
|
208
284
|
api_endpoint: https://api.vinted.com/gitlab
|
209
285
|
bitbucket:
|
210
|
-
slug:
|
286
|
+
slug: prontolabs/pronto
|
211
287
|
username: user
|
212
288
|
password: pass
|
213
289
|
web_endpoint: https://bitbucket.org/
|
214
290
|
max_warnings: 150
|
291
|
+
warnings_per_review: 30
|
215
292
|
verbose: false
|
216
293
|
```
|
217
294
|
|
@@ -262,54 +339,83 @@ The following values are available only to the text formatter:
|
|
262
339
|
Pronto can run various tools and libraries, as long as there's a runner for it.
|
263
340
|
Currently available:
|
264
341
|
|
265
|
-
* [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)
|
266
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)
|
267
350
|
* [pronto-clippy](https://github.com/hauleth/pronto-clippy)
|
268
351
|
* [pronto-credo](https://github.com/carakan/pronto-credo)
|
352
|
+
* [pronto-dialyxir](https://github.com/Apelsinka223/pronto-dialyxir)
|
269
353
|
* [pronto-dialyzer](https://github.com/iurifq/pronto-dialyzer)
|
354
|
+
* [pronto-dirty_words](https://github.com/kevinjalbert/pronto-dirty_words)
|
270
355
|
* [pronto-dogma](https://github.com/iurifq/pronto-dogma)
|
271
|
-
* [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))
|
272
358
|
* [pronto-eslint_npm](https://github.com/doits/pronto-eslint_npm) (uses eslint installed from npm)
|
273
|
-
* [pronto-fasterer](https://github.com/
|
274
|
-
* [pronto-
|
275
|
-
* [pronto-
|
276
|
-
* [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)
|
277
370
|
* [pronto-jscs](https://github.com/spajus/pronto-jscs)
|
278
|
-
* [pronto-jshint](https://github.com/
|
371
|
+
* [pronto-jshint](https://github.com/prontolabs/pronto-jshint)
|
279
372
|
* [pronto-json](https://github.com/deees/pronto-json)
|
280
373
|
* [pronto-luacheck](https://github.com/seikichi/pronto-luacheck)
|
281
374
|
* [pronto-perl_lint](https://github.com/bells17/pronto-perl_lint)
|
282
375
|
* [pronto-phpcs](https://github.com/EllisV/pronto-phpcs)
|
283
376
|
* [pronto-phpmd](https://github.com/EllisV/pronto-phpmd)
|
284
|
-
* [pronto-
|
285
|
-
* [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)
|
286
382
|
* [pronto-rails_schema](https://github.com/raimondasv/pronto-rails_schema)
|
287
|
-
* [pronto-reek](https://github.com/
|
288
|
-
* [pronto-rubocop](https://github.com/
|
289
|
-
* [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)
|
290
386
|
* [pronto-shellcheck](https://github.com/pclalv/pronto-shellcheck)
|
291
387
|
* [pronto-slim](https://github.com/nysthee/pronto-slim)
|
292
388
|
* [pronto-slim_lint](https://github.com/ibrahima/pronto-slim_lint)
|
293
|
-
* [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)
|
294
392
|
* [pronto-stylelint](https://github.com/kevinjalbert/pronto-stylelint)
|
295
393
|
* [pronto-swiftlint](https://github.com/ajanauskas/pronto-swiftlint)
|
296
394
|
* [pronto-tailor](https://github.com/ajanauskas/pronto-tailor)
|
297
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)
|
298
400
|
|
299
401
|
## Articles
|
300
402
|
|
301
403
|
Articles to help you to get started:
|
302
404
|
|
405
|
+
* [Effortless Code Conventions Review for Pull Request Changes](https://jtway.co/effortless-code-review-for-pull-request-changes-241206b1cb04)
|
303
406
|
* [Automating code review with Pronto (and friends)](http://everydayrails.com/2015/02/17/pronto-ruby-code-review.html)
|
304
407
|
* [Setup Pronto with CircleCI](https://medium.com/@MaximAbramchuk/circleci-github-pr-commenting-ruby-scss-coffeescript-javascript-git-and-etc-fbcbe2a378a5#.gk5f14p3j)
|
305
408
|
* [Continuous Static Analysis using Pronto](http://codingfearlessly.com/2014/11/06/continuous-static-analysis/)
|
306
409
|
* [Pronto and git hooks](http://elliotthilaire.net/gem-pronto-and-git-hooks/)
|
307
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)
|
308
|
-
* [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/)
|
309
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)
|
310
413
|
* [Running Rubocop before git commit](https://christoph.luppri.ch/articles/2016/11/21/running-rubocop-before-git-commit/)
|
311
414
|
* [Pronto, Codeship and GitHub for automatic code review](http://abinoam.tl1n.com/pronto-codeship-and-github-for-automatic-code-review/)
|
312
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)
|
313
419
|
|
314
420
|
Make a Pull Request to add something you wrote or found useful.
|
315
421
|
|
@@ -319,4 +425,4 @@ Make a Pull Request to add something you wrote or found useful.
|
|
319
425
|
|
320
426
|
## Copyright
|
321
427
|
|
322
|
-
Copyright (c) 2013-
|
428
|
+
Copyright (c) 2013-2018 Mindaugas Mozūras. See [LICENSE](LICENSE) for further details.
|