whatsup_github 0.0.1 → 0.4.0
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 -0
- data/.travis.yml +1 -3
- data/CHANGELOG.md +37 -0
- data/Gemfile +4 -2
- data/Gemfile.lock +103 -65
- data/README.md +153 -25
- data/Rakefile +13 -3
- data/bin/console +4 -3
- data/exe/whatsup_github +1 -0
- data/lib/template/.whatsup.yml +19 -9
- 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 +54 -13
- data/lib/whatsup_github/row.rb +41 -21
- data/lib/whatsup_github/row_collector.rb +36 -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 +39 -38
- data/.whatsnew.yml +0 -17
- 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: a0633d017c04fd64dfdd657e5c88db7dfed9ec1ff6fd91d4fe6471a50d1e0308
|
4
|
+
data.tar.gz: 819d3cd2c72f38ea8df1fbd496a394b727d522ac52c620221fc9bb4f71b2a31e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f545b95c7dd6e2e6facb23eec0ffa26d4f8e9f7330698c7c2bd471a2affcc98bbbddef433b35ff74ae8ace4a639b223262409fd32caf9014ed5d5b1d47fd9ab
|
7
|
+
data.tar.gz: '0910958934e53e7a8feb8d63121f9193133a725057b7139df5fef6d4c2e16d506e44014afe55320027fda6c3514f1b8214a0f1fa9143583c79220054f16e2790'
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-2.7.2
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,40 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## 0.4.0
|
4
|
+
|
5
|
+
### General
|
6
|
+
|
7
|
+
- Loading more data about pull requests via API
|
8
|
+
- Loading data about configured organization members via API
|
9
|
+
- Upgraded gem specs
|
10
|
+
- Removed non-working tests. TODO: Add tests for the output file.
|
11
|
+
|
12
|
+
### New configuration option
|
13
|
+
|
14
|
+
Added `membership` to configuration. Value: name of an organization to check membership of a contributor.
|
15
|
+
|
16
|
+
### New output data
|
17
|
+
|
18
|
+
Added `merge_commit`, `labels`, and `membership` to YAML output.
|
19
|
+
Values for `membership`:
|
20
|
+
- `true` if contributor is a member of the configured organization
|
21
|
+
- `false` if not a member
|
22
|
+
- empty if not configured
|
23
|
+
|
24
|
+
## 0.3.1
|
25
|
+
|
26
|
+
- Added `contributor` and `profile` output data.
|
27
|
+
|
28
|
+
## 0.3.0
|
29
|
+
|
30
|
+
- Added "magic word" to configuration file
|
31
|
+
- Added the requested GitHub query to terminal output (#13)
|
32
|
+
- Fixed the issue with empty description (#21)
|
33
|
+
|
34
|
+
## 0.2.0
|
35
|
+
|
36
|
+
- Implemented two types of labels in configuration: 'optional' and 'required'.
|
37
|
+
|
1
38
|
## 0.0.1
|
2
39
|
|
3
40
|
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.0
|
5
|
-
netrc (~> 0.
|
6
|
-
octokit (~> 4.
|
7
|
-
thor (~>
|
4
|
+
whatsup_github (0.4.0)
|
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
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
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)
|
18
|
+
addressable (2.7.0)
|
19
|
+
public_suffix (>= 2.0.2, < 5.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)
|
26
|
+
builder (3.2.4)
|
27
|
+
childprocess (4.0.0)
|
28
|
+
coderay (1.1.3)
|
29
|
+
concurrent-ruby (1.1.8)
|
26
30
|
contracts (0.16.0)
|
27
|
-
cucumber (3.
|
28
|
-
builder (>= 2.
|
29
|
-
cucumber-core (~>
|
30
|
-
cucumber-
|
31
|
-
cucumber-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
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)
|
45
65
|
multipart-post (>= 1.2, < 3)
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
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)
|
71
|
+
method_source (1.0.0)
|
72
|
+
middleware (0.1.0)
|
73
|
+
minitest (5.14.4)
|
50
74
|
multi_test (0.1.2)
|
51
75
|
multipart-post (2.1.1)
|
52
76
|
netrc (0.11.0)
|
53
|
-
octokit (4.
|
77
|
+
octokit (4.20.0)
|
78
|
+
faraday (>= 0.9)
|
54
79
|
sawyer (~> 0.8.0, >= 0.5.3)
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
80
|
+
protobuf-cucumber (3.10.8)
|
81
|
+
activesupport (>= 3.2)
|
82
|
+
middleware
|
83
|
+
thor
|
84
|
+
thread_safe
|
85
|
+
pry (0.14.0)
|
86
|
+
coderay (~> 1.1)
|
87
|
+
method_source (~> 1.0)
|
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.
|
86
|
-
rake (~>
|
87
|
-
rspec (~> 3.
|
120
|
+
aruba (~> 1.0)
|
121
|
+
bundler (~> 2.2)
|
122
|
+
cucumber (~> 5.3)
|
123
|
+
pry (~> 0.14)
|
124
|
+
rake (~> 13.0)
|
125
|
+
rspec (~> 3.10)
|
88
126
|
whatsup_github!
|
89
127
|
|
90
128
|
BUNDLED WITH
|
91
|
-
|
129
|
+
2.2.15
|
data/README.md
CHANGED
@@ -1,39 +1,123 @@
|
|
1
|
-
#
|
1
|
+
# whatsup_github
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
[![Build status](https://travis-ci.com/dshevtsov/whatsup_github.svg?branch=master)](https://travis-ci.com/dshevtsov/whatsup_github)
|
4
|
+
[![Gem version](https://img.shields.io/gem/v/whatsup_github.svg?style=flat)](https://rubygems.org/gems/whatsup_github)
|
5
|
+
|
6
|
+
This tool helps updating data for [Whats New on DevDocs](http://devdocs.magento.com/whats-new.html).
|
7
|
+
It filters GitHub pull requests and generates a data file.
|
8
|
+
One pull request sources one data entity.
|
9
|
+
All filtering parameters are set in a configuration file, except dates.
|
10
|
+
_Since_ date is set as a CLI argument and the _till_ date is always the moment when the command is run.
|
11
|
+
|
12
|
+
## What's generated
|
13
|
+
|
14
|
+
A resulting YAML file `tmp/whats-new.yml` is generated from GitHub data.
|
15
|
+
|
16
|
+
### `description`
|
17
|
+
|
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
|
+
|
21
|
+
Example:
|
22
|
+
|
23
|
+
```
|
24
|
+
This pull request adds ...
|
25
|
+
|
26
|
+
Some other details about this pull request.
|
27
|
+
|
28
|
+
whatsnew
|
29
|
+
Added documentation about [New Magento feature](https://devdocs.magento.com/new-magento-feature.html).
|
30
|
+
```
|
31
|
+
|
32
|
+
### `type`
|
33
|
+
|
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.
|
38
|
+
|
39
|
+
### `versions`
|
40
|
+
|
41
|
+
Any GitHub label that starts from a digit followed by a period like in regex `\d\.`.
|
42
|
+
Examples: `2.3.x`, `1.0.3-msi`, `2.x`
|
43
|
+
|
44
|
+
### `date`
|
45
|
+
|
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.
|
7
67
|
|
8
68
|
## Installation
|
9
69
|
|
10
|
-
|
70
|
+
This gem can be installed as a system command-line tool or as a command-line tool available in a project.
|
71
|
+
|
72
|
+
### System installation
|
73
|
+
|
74
|
+
```
|
75
|
+
gem install whatsup_github
|
76
|
+
```
|
77
|
+
|
78
|
+
### Project installation
|
79
|
+
|
80
|
+
Add to your Gemfile:
|
11
81
|
|
12
82
|
```ruby
|
13
83
|
gem 'whatsup_github'
|
14
84
|
```
|
15
85
|
|
16
|
-
And
|
86
|
+
And install:
|
17
87
|
|
18
88
|
```bash
|
19
89
|
bundle
|
20
90
|
```
|
21
91
|
|
22
|
-
|
92
|
+
## Configuration
|
93
|
+
|
94
|
+
The configuration file [`.whatsup.yml`](lib/template/.whatsup.yml) will be created automatically after first run unless it's already there.
|
95
|
+
|
96
|
+
## Authentication
|
97
|
+
|
98
|
+
Use [`~/.netrc`](https://github.com/octokit/octokit.rb#using-a-netrc-file) file for authentication.
|
23
99
|
|
24
|
-
```
|
25
|
-
|
100
|
+
```
|
101
|
+
machine api.github.com
|
102
|
+
login <GitHub login>
|
103
|
+
password <GitHub token>
|
26
104
|
```
|
27
105
|
|
28
|
-
|
106
|
+
Example:
|
107
|
+
|
108
|
+
```
|
109
|
+
machine api.github.com
|
110
|
+
login dshevtsov
|
111
|
+
password y9o6YvEoa7IukRWUFdnkpuxNjJ3uwiDQp4zkAdU0
|
112
|
+
```
|
29
113
|
|
30
|
-
|
114
|
+
## Usage
|
31
115
|
|
32
116
|
```bash
|
33
117
|
whatsup_github since 'apr 2'
|
34
118
|
```
|
35
119
|
|
36
|
-
|
120
|
+
If run with no arguments, it generates data for the past week:
|
37
121
|
|
38
122
|
```bash
|
39
123
|
whatsup_github
|
@@ -41,20 +125,68 @@ whatsup_github
|
|
41
125
|
|
42
126
|
You can use different date formats like `'April 2'`, `'2 April'`, `'apr 2'`, `'2 Apr'`, `2018-04-02`.
|
43
127
|
|
44
|
-
|
128
|
+
## Development
|
45
129
|
|
46
|
-
|
130
|
+
To install dependencies:
|
47
131
|
|
48
|
-
|
132
|
+
```
|
133
|
+
bin/setup
|
134
|
+
```
|
49
135
|
|
50
|
-
|
136
|
+
To install the package:
|
51
137
|
|
52
|
-
|
53
|
-
|
138
|
+
```
|
139
|
+
rake install
|
140
|
+
```
|
54
141
|
|
55
|
-
|
142
|
+
You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
143
|
+
|
144
|
+
### Testing
|
145
|
+
|
146
|
+
The project contains [rspec](https://rspec.info/) tests in `spec` and [cucumber](https://app.cucumber.pro/p/af1681aa-415f-44f0-8260-5454a69c472a/aruba/documents/branch/master/features/03_testing_frameworks/cucumber/steps/filesystem/check_existence_of_file.feature) tests in `features`.
|
147
|
+
|
148
|
+
#### specs
|
149
|
+
|
150
|
+
To run rspec tests:
|
151
|
+
|
152
|
+
```
|
153
|
+
rake spec
|
154
|
+
```
|
56
155
|
|
57
|
-
|
156
|
+
#### features
|
157
|
+
|
158
|
+
To run Cucumber tests:
|
159
|
+
|
160
|
+
```
|
161
|
+
rake features
|
162
|
+
```
|
163
|
+
|
164
|
+
To pass the `output_file.feature` tests, you need to generate a non-empty `whats-new.yml`.
|
165
|
+
To test just file:
|
166
|
+
|
167
|
+
```
|
168
|
+
bundle exec cucumber features/since.feature
|
169
|
+
```
|
170
|
+
|
171
|
+
NOTE: Cucumber tests will use the configuration file from code `lib/template/.whatsup.yml`.
|
172
|
+
|
173
|
+
#### Individual files
|
174
|
+
|
175
|
+
Individual files can have tests at the end of a file in a format like:
|
176
|
+
|
177
|
+
```ruby
|
178
|
+
if $PROGRAM_NAME == __FILE__
|
179
|
+
# test code here
|
180
|
+
end
|
181
|
+
```
|
182
|
+
|
183
|
+
To run such test, run the corresponding file:
|
184
|
+
|
185
|
+
```bash
|
186
|
+
ruby lib/whatsup_github/config_reader.rb
|
187
|
+
```
|
188
|
+
|
189
|
+
The tests use the root `.whatsup.yml` file to read configuration.
|
58
190
|
|
59
191
|
## Contributing
|
60
192
|
|
@@ -63,7 +195,3 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/dshevt
|
|
63
195
|
## License
|
64
196
|
|
65
197
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
66
|
-
|
67
|
-
## Code of Conduct
|
68
|
-
|
69
|
-
Everyone interacting in the WhatsupGithub project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/dshevtsov/whatsup_github/blob/master/CODE_OF_CONDUCT.md).
|