whatsup_github 0.1.1 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +2 -1
- data/CHANGELOG.md +41 -0
- data/Gemfile +4 -2
- data/Gemfile.lock +95 -57
- data/README.md +98 -27
- data/Rakefile +7 -5
- data/bin/console +4 -3
- data/exe/whatsup_github +1 -0
- data/lib/template/.whatsup.yml +15 -3
- data/lib/whatsup_github.rb +2 -2
- data/lib/whatsup_github/cli.rb +5 -4
- data/lib/whatsup_github/config_reader.rb +79 -0
- data/lib/whatsup_github/generator.rb +3 -1
- data/lib/whatsup_github/members.rb +18 -0
- data/lib/whatsup_github/pulls.rb +66 -13
- data/lib/whatsup_github/row.rb +37 -6
- data/lib/whatsup_github/row_collector.rb +35 -8
- data/lib/whatsup_github/runner.rb +7 -5
- data/lib/whatsup_github/table.rb +2 -1
- data/lib/whatsup_github/version.rb +3 -1
- data/lib/whatsup_github/{yaml-formatter.rb → yaml_formatter.rb} +8 -2
- data/whatsup_github.gemspec +30 -27
- metadata +38 -37
- data/lib/whatsup_github/config-reader.rb +0 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d76d974b6feb2663b6234906cde7aee2011f6fe1c87c2e90f7e4791e4f2b04a7
|
4
|
+
data.tar.gz: fb62023682520d065cfdf326300f576b38e85fea9fcf7e203b8105cae4278b94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d50707d1f9eb818a36aec8bdc46d19d3543b037b94f9452b3734888184cf77c319364bdd5dc1a5675a4cd90718c808ad7b12052ffcba80d0ac43bd4652eb3d70
|
7
|
+
data.tar.gz: 2032e86160a162ba96521fcb3f7f4ae042c9494e12786e22e28ac4a75d0fcb0ae5c3154f03fe69c1616e0f1cd81eacc2c4166393287708d9535dd1e79eaf46cd
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-2.
|
1
|
+
ruby-2.5.8
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,44 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## 0.4.1
|
4
|
+
|
5
|
+
- Added authentication via an environment variable `WHATSUP_GITHUB_ACCESS_TOKEN`
|
6
|
+
|
7
|
+
## 0.4.0
|
8
|
+
|
9
|
+
### General
|
10
|
+
|
11
|
+
- Loading more data about pull requests via API
|
12
|
+
- Loading data about configured organization members via API
|
13
|
+
- Upgraded gem specs
|
14
|
+
- Removed non-working tests. TODO: Add tests for the output file.
|
15
|
+
|
16
|
+
### New configuration option
|
17
|
+
|
18
|
+
Added `membership` to configuration. Value: name of an organization to check membership of a contributor.
|
19
|
+
|
20
|
+
### New output data
|
21
|
+
|
22
|
+
Added `merge_commit`, `labels`, and `membership` to YAML output.
|
23
|
+
Values for `membership`:
|
24
|
+
- `true` if contributor is a member of the configured organization
|
25
|
+
- `false` if not a member
|
26
|
+
- empty if not configured
|
27
|
+
|
28
|
+
## 0.3.1
|
29
|
+
|
30
|
+
- Added `contributor` and `profile` output data.
|
31
|
+
|
32
|
+
## 0.3.0
|
33
|
+
|
34
|
+
- Added "magic word" to configuration file
|
35
|
+
- Added the requested GitHub query to terminal output (#13)
|
36
|
+
- Fixed the issue with empty description (#21)
|
37
|
+
|
38
|
+
## 0.2.0
|
39
|
+
|
40
|
+
- Implemented two types of labels in configuration: 'optional' and 'required'.
|
41
|
+
|
1
42
|
## 0.0.1
|
2
43
|
|
3
44
|
The tool is released as a gem.
|
data/Gemfile
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
4
6
|
|
5
7
|
# Specify your gem's dependencies in whatsup_github.gemspec
|
6
8
|
gemspec
|
data/Gemfile.lock
CHANGED
@@ -1,91 +1,129 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
whatsup_github (0.
|
5
|
-
netrc (~> 0.
|
6
|
-
octokit (~> 4.
|
7
|
-
thor (~>
|
4
|
+
whatsup_github (0.4.1)
|
5
|
+
netrc (~> 0.11)
|
6
|
+
octokit (~> 4.20)
|
7
|
+
thor (~> 1.1)
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
+
activesupport (6.1.3.1)
|
13
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
|
+
i18n (>= 1.6, < 2)
|
15
|
+
minitest (>= 5.1)
|
16
|
+
tzinfo (~> 2.0)
|
17
|
+
zeitwerk (~> 2.3)
|
12
18
|
addressable (2.7.0)
|
13
19
|
public_suffix (>= 2.0.2, < 5.0)
|
14
|
-
aruba (0.
|
15
|
-
childprocess (>= 0
|
16
|
-
contracts (~> 0.
|
17
|
-
cucumber (>=
|
18
|
-
|
19
|
-
|
20
|
-
thor (>= 0.19, < 2.0)
|
21
|
-
backports (3.17.0)
|
20
|
+
aruba (1.0.4)
|
21
|
+
childprocess (>= 2.0, < 5.0)
|
22
|
+
contracts (~> 0.16.0)
|
23
|
+
cucumber (>= 2.4, < 6.0)
|
24
|
+
rspec-expectations (~> 3.4)
|
25
|
+
thor (~> 1.0)
|
22
26
|
builder (3.2.4)
|
23
|
-
childprocess (
|
24
|
-
coderay (1.1.
|
27
|
+
childprocess (4.0.0)
|
28
|
+
coderay (1.1.3)
|
29
|
+
concurrent-ruby (1.1.8)
|
25
30
|
contracts (0.16.0)
|
26
|
-
cucumber (3.
|
27
|
-
builder (>= 2.
|
28
|
-
cucumber-core (~>
|
29
|
-
cucumber-
|
30
|
-
cucumber-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
31
|
+
cucumber (5.3.0)
|
32
|
+
builder (~> 3.2, >= 3.2.4)
|
33
|
+
cucumber-core (~> 8.0, >= 8.0.1)
|
34
|
+
cucumber-create-meta (~> 2.0, >= 2.0.2)
|
35
|
+
cucumber-cucumber-expressions (~> 10.3, >= 10.3.0)
|
36
|
+
cucumber-gherkin (~> 15.0, >= 15.0.2)
|
37
|
+
cucumber-html-formatter (~> 9.0, >= 9.0.0)
|
38
|
+
cucumber-messages (~> 13.1, >= 13.1.0)
|
39
|
+
cucumber-wire (~> 4.0, >= 4.0.1)
|
40
|
+
diff-lcs (~> 1.4, >= 1.4.4)
|
41
|
+
multi_test (~> 0.1, >= 0.1.2)
|
42
|
+
sys-uname (~> 1.2, >= 1.2.1)
|
43
|
+
cucumber-core (8.0.1)
|
44
|
+
cucumber-gherkin (~> 15.0, >= 15.0.2)
|
45
|
+
cucumber-messages (~> 13.0, >= 13.0.1)
|
46
|
+
cucumber-tag-expressions (~> 2.0, >= 2.0.4)
|
47
|
+
cucumber-create-meta (2.0.4)
|
48
|
+
cucumber-messages (~> 13.1, >= 13.1.0)
|
49
|
+
sys-uname (~> 1.2, >= 1.2.1)
|
50
|
+
cucumber-cucumber-expressions (10.3.0)
|
51
|
+
cucumber-gherkin (15.0.2)
|
52
|
+
cucumber-messages (~> 13.0, >= 13.0.1)
|
53
|
+
cucumber-html-formatter (9.0.0)
|
54
|
+
cucumber-messages (~> 13.0, >= 13.0.1)
|
55
|
+
cucumber-messages (13.2.1)
|
56
|
+
protobuf-cucumber (~> 3.10, >= 3.10.8)
|
57
|
+
cucumber-tag-expressions (2.0.4)
|
58
|
+
cucumber-wire (4.0.1)
|
59
|
+
cucumber-core (~> 8.0, >= 8.0.1)
|
60
|
+
cucumber-cucumber-expressions (~> 10.3, >= 10.3.0)
|
61
|
+
cucumber-messages (~> 13.0, >= 13.0.1)
|
62
|
+
diff-lcs (1.4.4)
|
63
|
+
faraday (1.3.0)
|
64
|
+
faraday-net_http (~> 1.0)
|
44
65
|
multipart-post (>= 1.2, < 3)
|
45
|
-
|
46
|
-
|
66
|
+
ruby2_keywords
|
67
|
+
faraday-net_http (1.0.1)
|
68
|
+
ffi (1.15.0)
|
69
|
+
i18n (1.8.9)
|
70
|
+
concurrent-ruby (~> 1.0)
|
47
71
|
method_source (1.0.0)
|
48
|
-
|
72
|
+
middleware (0.1.0)
|
73
|
+
minitest (5.14.4)
|
49
74
|
multi_test (0.1.2)
|
50
75
|
multipart-post (2.1.1)
|
51
76
|
netrc (0.11.0)
|
52
|
-
octokit (4.
|
77
|
+
octokit (4.20.0)
|
53
78
|
faraday (>= 0.9)
|
54
79
|
sawyer (~> 0.8.0, >= 0.5.3)
|
55
|
-
|
80
|
+
protobuf-cucumber (3.10.8)
|
81
|
+
activesupport (>= 3.2)
|
82
|
+
middleware
|
83
|
+
thor
|
84
|
+
thread_safe
|
85
|
+
pry (0.14.0)
|
56
86
|
coderay (~> 1.1)
|
57
87
|
method_source (~> 1.0)
|
58
|
-
public_suffix (4.0.
|
59
|
-
rake (13.0.
|
60
|
-
rspec (3.
|
61
|
-
rspec-core (~> 3.
|
62
|
-
rspec-expectations (~> 3.
|
63
|
-
rspec-mocks (~> 3.
|
64
|
-
rspec-core (3.
|
65
|
-
rspec-support (~> 3.
|
66
|
-
rspec-expectations (3.
|
88
|
+
public_suffix (4.0.6)
|
89
|
+
rake (13.0.3)
|
90
|
+
rspec (3.10.0)
|
91
|
+
rspec-core (~> 3.10.0)
|
92
|
+
rspec-expectations (~> 3.10.0)
|
93
|
+
rspec-mocks (~> 3.10.0)
|
94
|
+
rspec-core (3.10.1)
|
95
|
+
rspec-support (~> 3.10.0)
|
96
|
+
rspec-expectations (3.10.1)
|
67
97
|
diff-lcs (>= 1.2.0, < 2.0)
|
68
|
-
rspec-support (~> 3.
|
69
|
-
rspec-mocks (3.
|
98
|
+
rspec-support (~> 3.10.0)
|
99
|
+
rspec-mocks (3.10.2)
|
70
100
|
diff-lcs (>= 1.2.0, < 2.0)
|
71
|
-
rspec-support (~> 3.
|
72
|
-
rspec-support (3.
|
101
|
+
rspec-support (~> 3.10.0)
|
102
|
+
rspec-support (3.10.2)
|
103
|
+
ruby2_keywords (0.0.4)
|
73
104
|
sawyer (0.8.2)
|
74
105
|
addressable (>= 2.3.5)
|
75
106
|
faraday (> 0.8, < 2.0)
|
76
|
-
|
107
|
+
sys-uname (1.2.2)
|
108
|
+
ffi (~> 1.1)
|
109
|
+
thor (1.1.0)
|
110
|
+
thread_safe (0.3.6)
|
111
|
+
tzinfo (2.0.4)
|
112
|
+
concurrent-ruby (~> 1.0)
|
113
|
+
zeitwerk (2.4.2)
|
77
114
|
|
78
115
|
PLATFORMS
|
79
116
|
ruby
|
117
|
+
x86_64-darwin-19
|
80
118
|
|
81
119
|
DEPENDENCIES
|
82
|
-
aruba (~> 0
|
83
|
-
bundler (~>
|
84
|
-
cucumber (~> 3
|
85
|
-
pry (~> 0.
|
120
|
+
aruba (~> 1.0)
|
121
|
+
bundler (~> 2.2)
|
122
|
+
cucumber (~> 5.3)
|
123
|
+
pry (~> 0.14)
|
86
124
|
rake (~> 13.0)
|
87
|
-
rspec (~> 3.
|
125
|
+
rspec (~> 3.10)
|
88
126
|
whatsup_github!
|
89
127
|
|
90
128
|
BUNDLED WITH
|
91
|
-
|
129
|
+
2.2.15
|
data/README.md
CHANGED
@@ -1,27 +1,29 @@
|
|
1
|
-
#
|
1
|
+
# whatsup_github
|
2
2
|
|
3
3
|
[![Build status](https://travis-ci.com/dshevtsov/whatsup_github.svg?branch=master)](https://travis-ci.com/dshevtsov/whatsup_github)
|
4
4
|
[![Gem version](https://img.shields.io/gem/v/whatsup_github.svg?style=flat)](https://rubygems.org/gems/whatsup_github)
|
5
5
|
|
6
|
-
This tool helps
|
6
|
+
This tool helps updating data for [Whats New on DevDocs](http://devdocs.magento.com/whats-new.html).
|
7
7
|
It filters GitHub pull requests and generates a data file.
|
8
|
-
One pull request
|
8
|
+
One pull request sources one data entity.
|
9
9
|
All filtering parameters are set in a configuration file, except dates.
|
10
10
|
_Since_ date is set as a CLI argument and the _till_ date is always the moment when the command is run.
|
11
11
|
|
12
|
-
##
|
12
|
+
## What's generated
|
13
13
|
|
14
|
-
|
14
|
+
A resulting YAML file `tmp/whats-new.yml` is generated from GitHub data.
|
15
15
|
|
16
16
|
### `description`
|
17
17
|
|
18
|
-
|
19
|
-
The text must follow the `whatsnew` keyword and be located at the
|
18
|
+
Text for `description` is taken from individual pull request's description (same as body).
|
19
|
+
The text must follow the `whatsnew` keyword and be located at the end.
|
20
20
|
|
21
|
-
|
21
|
+
Example:
|
22
|
+
|
23
|
+
```console
|
22
24
|
This pull request adds ...
|
23
25
|
|
24
|
-
|
26
|
+
Some other details about this pull request.
|
25
27
|
|
26
28
|
whatsnew
|
27
29
|
Added documentation about [New Magento feature](https://devdocs.magento.com/new-magento-feature.html).
|
@@ -29,22 +31,51 @@ Added documentation about [New Magento feature](https://devdocs.magento.com/new-
|
|
29
31
|
|
30
32
|
### `type`
|
31
33
|
|
32
|
-
Set as a list of `labels` in `.whatsup.yml`.
|
34
|
+
Set as a list of `labels` in `.whatsup.yml`. There are two types of labels in configuration:
|
35
|
+
|
36
|
+
- `required` are labels that must include `whatsnew`. Otherwise, resulting output will warn about missing `whatsnew`.
|
37
|
+
- `optional` are labels that may include `whatsnew`. If `whatsnew` is missing, you won't get any notification about this.
|
33
38
|
|
34
39
|
### `versions`
|
35
40
|
|
36
|
-
Any GitHub label that starts from a digit followed by a
|
41
|
+
Any GitHub label that starts from a digit followed by a period like in regex `\d\.`.
|
37
42
|
Examples: `2.3.x`, `1.0.3-msi`, `2.x`
|
38
43
|
|
39
44
|
### `date`
|
40
45
|
|
41
|
-
|
46
|
+
Date when the pull request was merged.
|
47
|
+
|
48
|
+
### `link`
|
49
|
+
|
50
|
+
URL of the pull request.
|
51
|
+
|
52
|
+
### `contributor`
|
53
|
+
|
54
|
+
An author of a pull request.
|
55
|
+
|
56
|
+
### `merge_commit`
|
57
|
+
|
58
|
+
Merge commit SHA of the pull request.
|
59
|
+
|
60
|
+
### `membership`
|
61
|
+
|
62
|
+
Memebership of the contributor in a configured organization.
|
63
|
+
|
64
|
+
### `labels`
|
65
|
+
|
66
|
+
All labels added to the pull request.
|
42
67
|
|
43
68
|
## Installation
|
44
69
|
|
45
|
-
|
70
|
+
This gem can be installed as a system command-line tool or as a command-line tool available in a project.
|
46
71
|
|
47
|
-
###
|
72
|
+
### System installation
|
73
|
+
|
74
|
+
```bash
|
75
|
+
gem install whatsup_github
|
76
|
+
```
|
77
|
+
|
78
|
+
### Project installation
|
48
79
|
|
49
80
|
Add to your Gemfile:
|
50
81
|
|
@@ -52,26 +83,46 @@ Add to your Gemfile:
|
|
52
83
|
gem 'whatsup_github'
|
53
84
|
```
|
54
85
|
|
55
|
-
And
|
86
|
+
And install:
|
56
87
|
|
57
88
|
```bash
|
58
89
|
bundle
|
59
90
|
```
|
60
91
|
|
61
|
-
### Separately
|
62
|
-
|
63
|
-
```
|
64
|
-
gem install whatsup_github
|
65
|
-
```
|
66
|
-
|
67
92
|
## Configuration
|
68
93
|
|
69
94
|
The configuration file [`.whatsup.yml`](lib/template/.whatsup.yml) will be created automatically after first run unless it's already there.
|
70
95
|
|
71
96
|
## Authentication
|
72
97
|
|
98
|
+
### With the .netrc file
|
99
|
+
|
73
100
|
Use [`~/.netrc`](https://github.com/octokit/octokit.rb#using-a-netrc-file) file for authentication.
|
74
101
|
|
102
|
+
```config
|
103
|
+
machine api.github.com
|
104
|
+
login <GitHub login>
|
105
|
+
password <GitHub token>
|
106
|
+
```
|
107
|
+
|
108
|
+
Example:
|
109
|
+
|
110
|
+
```config
|
111
|
+
machine api.github.com
|
112
|
+
login dshevtsov
|
113
|
+
password y9o6YvEoa7IukRWUFdnkpuxNjJ3uwiDQp4zkAdU0
|
114
|
+
```
|
115
|
+
|
116
|
+
### With an environment variable
|
117
|
+
|
118
|
+
Assign the `WHATSUP_GITHUB_ACCESS_TOKEN` to the GitHub token you want to use, prior the `whatsup_github` command.
|
119
|
+
|
120
|
+
Example:
|
121
|
+
|
122
|
+
```bash
|
123
|
+
WHATSUP_GITHUB_ACCESS_TOKEN=askk494nmfodic68mk whatsup_github since 'apr 2'
|
124
|
+
```
|
125
|
+
|
75
126
|
## Usage
|
76
127
|
|
77
128
|
```bash
|
@@ -90,13 +141,13 @@ You can use different date formats like `'April 2'`, `'2 April'`, `'apr 2'`, `'2
|
|
90
141
|
|
91
142
|
To install dependencies:
|
92
143
|
|
93
|
-
```
|
144
|
+
```bash
|
94
145
|
bin/setup
|
95
146
|
```
|
96
147
|
|
97
148
|
To install the package:
|
98
149
|
|
99
|
-
```
|
150
|
+
```bash
|
100
151
|
rake install
|
101
152
|
```
|
102
153
|
|
@@ -110,25 +161,45 @@ The project contains [rspec](https://rspec.info/) tests in `spec` and [cucumber]
|
|
110
161
|
|
111
162
|
To run rspec tests:
|
112
163
|
|
113
|
-
```
|
164
|
+
```bash
|
114
165
|
rake spec
|
115
166
|
```
|
116
167
|
|
117
168
|
#### features
|
118
169
|
|
119
|
-
To run
|
170
|
+
To run Cucumber tests:
|
120
171
|
|
121
|
-
```
|
172
|
+
```bash
|
122
173
|
rake features
|
123
174
|
```
|
124
175
|
|
125
176
|
To pass the `output_file.feature` tests, you need to generate a non-empty `whats-new.yml`.
|
126
177
|
To test just file:
|
127
178
|
|
179
|
+
```bash
|
180
|
+
bundle exec cucumber features/since.feature
|
128
181
|
```
|
129
|
-
|
182
|
+
|
183
|
+
NOTE: Cucumber tests will use the configuration file from code `lib/template/.whatsup.yml`.
|
184
|
+
|
185
|
+
#### Individual files
|
186
|
+
|
187
|
+
Individual files can have tests at the end of a file in a format like:
|
188
|
+
|
189
|
+
```ruby
|
190
|
+
if $PROGRAM_NAME == __FILE__
|
191
|
+
# test code here
|
192
|
+
end
|
193
|
+
```
|
194
|
+
|
195
|
+
To run such test, run the corresponding file:
|
196
|
+
|
197
|
+
```bash
|
198
|
+
ruby lib/whatsup_github/config_reader.rb
|
130
199
|
```
|
131
200
|
|
201
|
+
The tests use the root `.whatsup.yml` file to read configuration.
|
202
|
+
|
132
203
|
## Contributing
|
133
204
|
|
134
205
|
Bug reports and pull requests are welcome on GitHub at https://github.com/dshevtsov/whatsup_github. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|