whatsup_github 0.0.1 → 0.1.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 -0
- data/.travis.yml +1 -3
- data/Gemfile.lock +33 -33
- data/README.md +91 -22
- data/Rakefile +8 -0
- data/lib/template/.whatsup.yml +6 -8
- data/lib/whatsup_github/config-reader.rb +1 -1
- data/lib/whatsup_github/row.rb +5 -16
- data/lib/whatsup_github/version.rb +1 -1
- data/whatsup_github.gemspec +1 -1
- metadata +6 -6
- data/.whatsnew.yml +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da5ac25ee48ecbeb1219dae8e22c966ea1d3954b04c6cec344b1698095020671
|
4
|
+
data.tar.gz: f11b3a4b544675cc37cde564950b30b9162f3933335d44ae6e831408b8ed53db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f159bfdf36cd305cdbf2bfb7c16ce0aeae27e8405a87c0cc999fb0866f7a395d7de68e20e622a8b2dd69483a54bf2d7f7ab415b2523fa3b6af9241d179fe005a
|
7
|
+
data.tar.gz: 19275e16e836a8ef676cf03a8e0a98fd41b60699772c7d3890efd15f01cf67a08bdc54ebc808ef45af46d5875c2a47b912db4dc317b9d726565152b2a64db36d
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-2.6.5
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
whatsup_github (0.
|
4
|
+
whatsup_github (0.1.1)
|
5
5
|
netrc (~> 0.10)
|
6
6
|
octokit (~> 4.14)
|
7
7
|
thor (~> 0.20)
|
@@ -9,19 +9,18 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
addressable (2.
|
13
|
-
public_suffix (>= 2.0.2, <
|
14
|
-
aruba (0.14.
|
15
|
-
childprocess (>= 0.6.3, <
|
12
|
+
addressable (2.7.0)
|
13
|
+
public_suffix (>= 2.0.2, < 5.0)
|
14
|
+
aruba (0.14.14)
|
15
|
+
childprocess (>= 0.6.3, < 4.0.0)
|
16
16
|
contracts (~> 0.9)
|
17
17
|
cucumber (>= 1.3.19)
|
18
18
|
ffi (~> 1.9)
|
19
19
|
rspec-expectations (>= 2.99)
|
20
|
-
thor (
|
21
|
-
backports (3.
|
22
|
-
builder (3.2.
|
23
|
-
childprocess (
|
24
|
-
rake (< 13.0)
|
20
|
+
thor (>= 0.19, < 2.0)
|
21
|
+
backports (3.17.0)
|
22
|
+
builder (3.2.4)
|
23
|
+
childprocess (3.0.0)
|
25
24
|
coderay (1.1.2)
|
26
25
|
contracts (0.16.0)
|
27
26
|
cucumber (3.1.2)
|
@@ -41,35 +40,36 @@ GEM
|
|
41
40
|
cucumber-tag_expressions (1.1.1)
|
42
41
|
cucumber-wire (0.0.1)
|
43
42
|
diff-lcs (1.3)
|
44
|
-
faraday (0.
|
43
|
+
faraday (1.0.0)
|
45
44
|
multipart-post (>= 1.2, < 3)
|
46
|
-
ffi (1.
|
45
|
+
ffi (1.12.2)
|
47
46
|
gherkin (5.1.0)
|
48
|
-
method_source (0.
|
49
|
-
multi_json (1.
|
47
|
+
method_source (1.0.0)
|
48
|
+
multi_json (1.14.1)
|
50
49
|
multi_test (0.1.2)
|
51
50
|
multipart-post (2.1.1)
|
52
51
|
netrc (0.11.0)
|
53
|
-
octokit (4.
|
52
|
+
octokit (4.18.0)
|
53
|
+
faraday (>= 0.9)
|
54
54
|
sawyer (~> 0.8.0, >= 0.5.3)
|
55
|
-
pry (0.
|
56
|
-
coderay (~> 1.1
|
57
|
-
method_source (~>
|
58
|
-
public_suffix (
|
59
|
-
rake (
|
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.
|
55
|
+
pry (0.13.0)
|
56
|
+
coderay (~> 1.1)
|
57
|
+
method_source (~> 1.0)
|
58
|
+
public_suffix (4.0.3)
|
59
|
+
rake (13.0.1)
|
60
|
+
rspec (3.9.0)
|
61
|
+
rspec-core (~> 3.9.0)
|
62
|
+
rspec-expectations (~> 3.9.0)
|
63
|
+
rspec-mocks (~> 3.9.0)
|
64
|
+
rspec-core (3.9.1)
|
65
|
+
rspec-support (~> 3.9.1)
|
66
|
+
rspec-expectations (3.9.1)
|
67
67
|
diff-lcs (>= 1.2.0, < 2.0)
|
68
|
-
rspec-support (~> 3.
|
69
|
-
rspec-mocks (3.
|
68
|
+
rspec-support (~> 3.9.0)
|
69
|
+
rspec-mocks (3.9.1)
|
70
70
|
diff-lcs (>= 1.2.0, < 2.0)
|
71
|
-
rspec-support (~> 3.
|
72
|
-
rspec-support (3.
|
71
|
+
rspec-support (~> 3.9.0)
|
72
|
+
rspec-support (3.9.2)
|
73
73
|
sawyer (0.8.2)
|
74
74
|
addressable (>= 2.3.5)
|
75
75
|
faraday (> 0.8, < 2.0)
|
@@ -83,9 +83,9 @@ DEPENDENCIES
|
|
83
83
|
bundler (~> 1.17)
|
84
84
|
cucumber (~> 3.1)
|
85
85
|
pry (~> 0.12)
|
86
|
-
rake (~>
|
86
|
+
rake (~> 13.0)
|
87
87
|
rspec (~> 3.0)
|
88
88
|
whatsup_github!
|
89
89
|
|
90
90
|
BUNDLED WITH
|
91
|
-
1.17.
|
91
|
+
1.17.3
|
data/README.md
CHANGED
@@ -1,13 +1,52 @@
|
|
1
1
|
# WhatsupGithub
|
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 to update 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 - 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
|
+
## Prerequisite
|
13
|
+
|
14
|
+
The resulting data file is generated from data pulled from GitHub.
|
15
|
+
|
16
|
+
### `description`
|
17
|
+
|
18
|
+
Pull requests that will appear in search must have text that will fill out the _Description_ cell.
|
19
|
+
The text must follow the `whatsnew` keyword and be located at the very bottom of a pull request description field.
|
20
|
+
|
21
|
+
```
|
22
|
+
This pull request adds ...
|
23
|
+
|
24
|
+
...
|
25
|
+
|
26
|
+
whatsnew
|
27
|
+
Added documentation about [New Magento feature](https://devdocs.magento.com/new-magento-feature.html).
|
28
|
+
```
|
29
|
+
|
30
|
+
### `type`
|
31
|
+
|
32
|
+
Set as a list of `labels` in `.whatsup.yml`.
|
33
|
+
|
34
|
+
### `versions`
|
35
|
+
|
36
|
+
Any GitHub label that starts from a digit followed by a dot (see regex `\d\.`).
|
37
|
+
Examples: `2.3.x`, `1.0.3-msi`, `2.x`
|
38
|
+
|
39
|
+
### `date`
|
40
|
+
|
41
|
+
The date when pull request was merged.
|
7
42
|
|
8
43
|
## Installation
|
9
44
|
|
10
|
-
|
45
|
+
Same as any other gem.
|
46
|
+
|
47
|
+
### Using Bundler as a part of your project
|
48
|
+
|
49
|
+
Add to your Gemfile:
|
11
50
|
|
12
51
|
```ruby
|
13
52
|
gem 'whatsup_github'
|
@@ -19,21 +58,27 @@ And then execute:
|
|
19
58
|
bundle
|
20
59
|
```
|
21
60
|
|
22
|
-
|
61
|
+
### Separately
|
23
62
|
|
24
|
-
```
|
63
|
+
```
|
25
64
|
gem install whatsup_github
|
26
65
|
```
|
27
66
|
|
28
|
-
##
|
67
|
+
## Configuration
|
68
|
+
|
69
|
+
The configuration file [`.whatsup.yml`](lib/template/.whatsup.yml) will be created automatically after first run unless it's already there.
|
70
|
+
|
71
|
+
## Authentication
|
72
|
+
|
73
|
+
Use [`~/.netrc`](https://github.com/octokit/octokit.rb#using-a-netrc-file) file for authentication.
|
29
74
|
|
30
|
-
|
75
|
+
## Usage
|
31
76
|
|
32
77
|
```bash
|
33
78
|
whatsup_github since 'apr 2'
|
34
79
|
```
|
35
80
|
|
36
|
-
|
81
|
+
If run with no arguments, it generates data for the past week:
|
37
82
|
|
38
83
|
```bash
|
39
84
|
whatsup_github
|
@@ -41,20 +86,48 @@ whatsup_github
|
|
41
86
|
|
42
87
|
You can use different date formats like `'April 2'`, `'2 April'`, `'apr 2'`, `'2 Apr'`, `2018-04-02`.
|
43
88
|
|
44
|
-
|
89
|
+
## Development
|
45
90
|
|
46
|
-
|
91
|
+
To install dependencies:
|
47
92
|
|
48
|
-
|
93
|
+
```
|
94
|
+
bin/setup
|
95
|
+
```
|
49
96
|
|
50
|
-
|
97
|
+
To install the package:
|
51
98
|
|
52
|
-
|
53
|
-
|
99
|
+
```
|
100
|
+
rake install
|
101
|
+
```
|
54
102
|
|
55
|
-
|
103
|
+
You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
104
|
+
|
105
|
+
### Testing
|
106
|
+
|
107
|
+
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`.
|
108
|
+
|
109
|
+
#### specs
|
110
|
+
|
111
|
+
To run rspec tests:
|
56
112
|
|
57
|
-
|
113
|
+
```
|
114
|
+
rake spec
|
115
|
+
```
|
116
|
+
|
117
|
+
#### features
|
118
|
+
|
119
|
+
To run cucumber tests:
|
120
|
+
|
121
|
+
```
|
122
|
+
rake features
|
123
|
+
```
|
124
|
+
|
125
|
+
To pass the `output_file.feature` tests, you need to generate a non-empty `whats-new.yml`.
|
126
|
+
To test just file:
|
127
|
+
|
128
|
+
```
|
129
|
+
bundle exec cucumber features/output_file.feature
|
130
|
+
```
|
58
131
|
|
59
132
|
## Contributing
|
60
133
|
|
@@ -63,7 +136,3 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/dshevt
|
|
63
136
|
## License
|
64
137
|
|
65
138
|
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).
|
data/Rakefile
CHANGED
@@ -1,6 +1,14 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
2
|
require "rspec/core/rake_task"
|
3
|
+
require 'cucumber'
|
4
|
+
require 'cucumber/rake/task'
|
3
5
|
|
4
6
|
RSpec::Core::RakeTask.new(:spec)
|
5
7
|
|
6
8
|
task :default => :spec
|
9
|
+
|
10
|
+
Cucumber::Rake::Task.new(:features) do |t|
|
11
|
+
t.cucumber_opts = "--format pretty" # Any valid command line option can go here.
|
12
|
+
end
|
13
|
+
|
14
|
+
task :test => [:spec, :features]
|
data/lib/template/.whatsup.yml
CHANGED
@@ -1,18 +1,16 @@
|
|
1
|
-
#
|
1
|
+
# Parameters for a GitHub search query
|
2
2
|
base_branch: master
|
3
3
|
|
4
|
-
# Repositories for scanning. If you want to search private repositories, use credentials to specify
|
5
4
|
repos:
|
6
5
|
- magento/devdocs
|
7
6
|
|
8
|
-
# Labels
|
7
|
+
# Labels also will be used as a 'type' value in the output file
|
9
8
|
labels:
|
10
|
-
- New
|
11
|
-
- Major
|
9
|
+
- New Topic
|
10
|
+
- Major Update
|
12
11
|
- Technical
|
13
12
|
|
14
|
-
#
|
13
|
+
# Format of output file
|
15
14
|
output_format:
|
16
|
-
# - markdown
|
17
15
|
- yaml
|
18
|
-
|
16
|
+
# - markdown
|
data/lib/whatsup_github/row.rb
CHANGED
@@ -11,14 +11,12 @@ module WhatsupGithub
|
|
11
11
|
@assignee = args[:assignee]
|
12
12
|
@pr_number = args[:pr_number]
|
13
13
|
@link = args[:pr_url]
|
14
|
+
@config = Config.instance
|
14
15
|
end
|
15
16
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
NEW_PHRASE = 'New topic'.freeze
|
20
|
-
TECHNICAL_MASK = 'Technical'.freeze
|
21
|
-
TECHNICAL_PHRASE = 'Technical changes'.freeze
|
17
|
+
def labels_from_config
|
18
|
+
@config.read('labels')
|
19
|
+
end
|
22
20
|
|
23
21
|
def versions
|
24
22
|
label_versions = labels.select { |label| label.start_with?(/\d\./) }
|
@@ -30,16 +28,7 @@ module WhatsupGithub
|
|
30
28
|
end
|
31
29
|
|
32
30
|
def type
|
33
|
-
|
34
|
-
label_type = /#{ UPDATED_MASK }|#{ NEW_MASK }|#{ TECHNICAL_MASK }/.match(labels_string)
|
35
|
-
case label_type.to_s
|
36
|
-
when /#{ UPDATED_MASK }/
|
37
|
-
UPDATED_PHRASE
|
38
|
-
when /#{ NEW_MASK }/
|
39
|
-
NEW_PHRASE
|
40
|
-
when /#{ TECHNICAL_MASK }/
|
41
|
-
TECHNICAL_PHRASE
|
42
|
-
end
|
31
|
+
(labels & labels_from_config).join(', ')
|
43
32
|
end
|
44
33
|
|
45
34
|
def parse_body
|
data/whatsup_github.gemspec
CHANGED
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
|
|
38
38
|
spec.add_dependency "netrc", "~> 0.10"
|
39
39
|
|
40
40
|
spec.add_development_dependency "bundler", "~> 1.17"
|
41
|
-
spec.add_development_dependency "rake", "~>
|
41
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
42
42
|
spec.add_development_dependency "rspec", "~> 3.0"
|
43
43
|
spec.add_development_dependency "cucumber", "~> 3.1"
|
44
44
|
spec.add_development_dependency "aruba", "~> 0.14"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: whatsup_github
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dima Shevtsov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '13.0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '13.0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rspec
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -146,8 +146,8 @@ extra_rdoc_files: []
|
|
146
146
|
files:
|
147
147
|
- ".gitignore"
|
148
148
|
- ".rspec"
|
149
|
+
- ".ruby-version"
|
149
150
|
- ".travis.yml"
|
150
|
-
- ".whatsnew.yml"
|
151
151
|
- CHANGELOG.md
|
152
152
|
- Gemfile
|
153
153
|
- Gemfile.lock
|
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
192
|
- !ruby/object:Gem::Version
|
193
193
|
version: '0'
|
194
194
|
requirements: []
|
195
|
-
rubygems_version: 3.
|
195
|
+
rubygems_version: 3.1.2
|
196
196
|
signing_key:
|
197
197
|
specification_version: 4
|
198
198
|
summary: Collect info from GitHub pull requests.
|
data/.whatsnew.yml
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# Name of the base branch in GitHub PRs
|
2
|
-
base_branch: master
|
3
|
-
|
4
|
-
# Repos for scanning
|
5
|
-
repos:
|
6
|
-
- magento/devdocs
|
7
|
-
|
8
|
-
# Labels for filtering
|
9
|
-
labels:
|
10
|
-
- New doc
|
11
|
-
- Major update
|
12
|
-
- Technical
|
13
|
-
|
14
|
-
# Output format
|
15
|
-
output_format:
|
16
|
-
# - markdown
|
17
|
-
- yaml
|