whatsup_github 0.2.0 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c5a5193535cbcad7a2e79333943ca9761e7b6bc06a867fffacaf3abac90ce47
4
- data.tar.gz: e0f92a5c0619da8911035a61b3cb0e17dab44344b99db02986da0fbb67cf4c76
3
+ metadata.gz: 47baad7941df565f9c94827246aac88071c87bda1a975500e7365f0e225ec558
4
+ data.tar.gz: de4dc002c57c8a5cf7adb7a440ece5cbd135ba0941b450c3406308838a492ddc
5
5
  SHA512:
6
- metadata.gz: 43c4beaa0b90f93aeb01ab7a2f2643702ac8d078bd3b21801a250a7918dba077ecee5f9138d731e3817ad78719769bc4167f32ce7bdfad480c374e790a498251
7
- data.tar.gz: 9247198a00d96c500236f093dc7b458e256220b8763ab6831207c014f1da6acd5d24aa95f3fc47b45cf5850e727543e8d53515a0684432b07f0d58d96fb9dff5
6
+ metadata.gz: 83358141ba037b13e106d49e9d1bf23c22b2f41ddada945e87c8e3a5319c9f26e664f67e3db68a27799786f866d93b634cf6f9949ef3e0266a91dd2bfa65d3d6
7
+ data.tar.gz: 55babd4c4a276620f8c4ba198c1e6cd0e40eabc9385b674d6567d6f4607be2bb8b2ba19fa25164fae49c5f327f5b52dae55022f7defc09c6f93f3d1a3f8ec1b1
@@ -0,0 +1,11 @@
1
+ ---
2
+ #######################
3
+ # Rubocop Config file #
4
+ #######################
5
+
6
+ inherit_gem:
7
+ rubocop-github:
8
+ - config/default.yml
9
+
10
+ Style/StringLiterals:
11
+ EnforcedStyle: single_quotes
@@ -0,0 +1,48 @@
1
+ ---
2
+ ###########################
3
+ ###########################
4
+ ## Linter GitHub Actions ##
5
+ ###########################
6
+ ###########################
7
+ name: Lint Code Base
8
+
9
+ #
10
+ # Documentation:
11
+ # https://help.github.com/en/articles/workflow-syntax-for-github-actions
12
+ #
13
+
14
+ ###################################
15
+ # Start the job on a pull request #
16
+ ###################################
17
+ on:
18
+ pull_request
19
+
20
+ ###############
21
+ # Set the Job #
22
+ ###############
23
+ jobs:
24
+ super-lint:
25
+ # Set the agent to run on
26
+ runs-on: ubuntu-latest
27
+
28
+ ##################
29
+ # Load all steps #
30
+ ##################
31
+ steps:
32
+ ##########################
33
+ # Checkout the code base #
34
+ ##########################
35
+ - name: Checkout Code
36
+ uses: actions/checkout@v2
37
+ with:
38
+ # Full git history is needed to get a proper list of changed files within `super-linter`
39
+ fetch-depth: 0
40
+
41
+ ################################
42
+ # Run Linter against code base #
43
+ ################################
44
+ - name: Lint Code Base
45
+ uses: github/super-linter@v3
46
+ env:
47
+ VALIDATE_ALL_CODEBASE: false
48
+ DEFAULT_BRANCH: main
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.7.1
1
+ ruby-2.5.8
data/.travis.yml CHANGED
@@ -2,4 +2,5 @@
2
2
  sudo: false
3
3
  language: ruby
4
4
  cache: bundler
5
- before_install: gem install bundler -v 1.17.3
5
+ before_install: gem install bundler -v 2.2.15
6
+ script: bundle exec rake spec features
data/CHANGELOG.md CHANGED
@@ -1,3 +1,50 @@
1
+ # Changelog
2
+
3
+ ## 0.4.2
4
+
5
+ Fixes:
6
+
7
+ - Fixed a bug with non-working membership
8
+
9
+ Maintenance:
10
+
11
+ - Added code linting
12
+
13
+ ## 0.4.1
14
+
15
+ - Added authentication via an environment variable `WHATSUP_GITHUB_ACCESS_TOKEN`
16
+
17
+ ## 0.4.0
18
+
19
+ ### General
20
+
21
+ - Loading more data about pull requests via API
22
+ - Loading data about configured organization members via API
23
+ - Upgraded gem specs
24
+ - Removed non-working tests. TODO: Add tests for the output file.
25
+
26
+ ### New configuration option
27
+
28
+ Added `membership` to configuration. Value: name of an organization to check membership of a contributor.
29
+
30
+ ### New output data
31
+
32
+ Added `merge_commit`, `labels`, and `membership` to YAML output.
33
+ Values for `membership`:
34
+ - `true` if contributor is a member of the configured organization
35
+ - `false` if not a member
36
+ - empty if not configured
37
+
38
+ ## 0.3.1
39
+
40
+ - Added `contributor` and `profile` output data.
41
+
42
+ ## 0.3.0
43
+
44
+ - Added "magic word" to configuration file
45
+ - Added the requested GitHub query to terminal output (#13)
46
+ - Fixed the issue with empty description (#21)
47
+
1
48
  ## 0.2.0
2
49
 
3
50
  - Implemented two types of labels in configuration: 'optional' and 'required'.
data/Gemfile CHANGED
@@ -1,6 +1,8 @@
1
- source "https://rubygems.org"
1
+ # frozen_string_literal: true
2
2
 
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
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,92 +1,129 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- whatsup_github (0.2.0)
5
- netrc (~> 0.10)
6
- octokit (~> 4.14)
7
- thor (~> 0.20)
4
+ whatsup_github (0.4.2)
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.14.14)
15
- childprocess (>= 0.6.3, < 4.0.0)
16
- contracts (~> 0.9)
17
- cucumber (>= 1.3.19)
18
- ffi (~> 1.9)
19
- rspec-expectations (>= 2.99)
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 (3.0.0)
24
- coderay (1.1.2)
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.1.2)
27
- builder (>= 2.1.2)
28
- cucumber-core (~> 3.2.0)
29
- cucumber-expressions (~> 6.0.1)
30
- cucumber-wire (~> 0.0.1)
31
- diff-lcs (~> 1.3)
32
- gherkin (~> 5.1.0)
33
- multi_json (>= 1.7.5, < 2.0)
34
- multi_test (>= 0.1.2)
35
- cucumber-core (3.2.1)
36
- backports (>= 3.8.0)
37
- cucumber-tag_expressions (~> 1.1.0)
38
- gherkin (~> 5.0)
39
- cucumber-expressions (6.0.1)
40
- cucumber-tag_expressions (1.1.1)
41
- cucumber-wire (0.0.1)
42
- diff-lcs (1.3)
43
- faraday (1.0.1)
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
- ffi (1.12.2)
46
- gherkin (5.1.0)
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
- multi_json (1.14.1)
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.18.0)
77
+ octokit (4.20.0)
53
78
  faraday (>= 0.9)
54
79
  sawyer (~> 0.8.0, >= 0.5.3)
55
- pry (0.13.0)
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.5)
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)
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.9.0)
69
- rspec-mocks (3.9.1)
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.9.0)
72
- rspec-support (3.9.2)
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
- thor (0.20.3)
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
80
117
  x86_64-darwin-19
81
118
 
82
119
  DEPENDENCIES
83
- aruba (~> 0.14)
84
- bundler (~> 1.17)
85
- cucumber (~> 3.1)
86
- pry (~> 0.12)
120
+ aruba (~> 1.0)
121
+ bundler (~> 2.2)
122
+ cucumber (~> 5.3)
123
+ pry (~> 0.14)
87
124
  rake (~> 13.0)
88
- rspec (~> 3.0)
125
+ rspec (~> 3.10)
89
126
  whatsup_github!
90
127
 
91
128
  BUNDLED WITH
92
- 1.17.3
129
+ 2.2.15
data/README.md CHANGED
@@ -20,7 +20,7 @@ The text must follow the `whatsnew` keyword and be located at the end.
20
20
 
21
21
  Example:
22
22
 
23
- ```
23
+ ```console
24
24
  This pull request adds ...
25
25
 
26
26
  Some other details about this pull request.
@@ -32,6 +32,7 @@ Added documentation about [New Magento feature](https://devdocs.magento.com/new-
32
32
  ### `type`
33
33
 
34
34
  Set as a list of `labels` in `.whatsup.yml`. There are two types of labels in configuration:
35
+
35
36
  - `required` are labels that must include `whatsnew`. Otherwise, resulting output will warn about missing `whatsnew`.
36
37
  - `optional` are labels that may include `whatsnew`. If `whatsnew` is missing, you won't get any notification about this.
37
38
 
@@ -48,13 +49,29 @@ Date when the pull request was merged.
48
49
 
49
50
  URL of the pull request.
50
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.
67
+
51
68
  ## Installation
52
69
 
53
70
  This gem can be installed as a system command-line tool or as a command-line tool available in a project.
54
71
 
55
72
  ### System installation
56
73
 
57
- ```
74
+ ```bash
58
75
  gem install whatsup_github
59
76
  ```
60
77
 
@@ -78,9 +95,11 @@ The configuration file [`.whatsup.yml`](lib/template/.whatsup.yml) will be creat
78
95
 
79
96
  ## Authentication
80
97
 
98
+ ### With the .netrc file
99
+
81
100
  Use [`~/.netrc`](https://github.com/octokit/octokit.rb#using-a-netrc-file) file for authentication.
82
101
 
83
- ```
102
+ ```config
84
103
  machine api.github.com
85
104
  login <GitHub login>
86
105
  password <GitHub token>
@@ -88,12 +107,22 @@ machine api.github.com
88
107
 
89
108
  Example:
90
109
 
91
- ```
110
+ ```config
92
111
  machine api.github.com
93
112
  login dshevtsov
94
113
  password y9o6YvEoa7IukRWUFdnkpuxNjJ3uwiDQp4zkAdU0
95
114
  ```
96
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
+
97
126
  ## Usage
98
127
 
99
128
  ```bash
@@ -112,13 +141,13 @@ You can use different date formats like `'April 2'`, `'2 April'`, `'apr 2'`, `'2
112
141
 
113
142
  To install dependencies:
114
143
 
115
- ```
144
+ ```bash
116
145
  bin/setup
117
146
  ```
118
147
 
119
148
  To install the package:
120
149
 
121
- ```
150
+ ```bash
122
151
  rake install
123
152
  ```
124
153
 
@@ -132,7 +161,7 @@ The project contains [rspec](https://rspec.info/) tests in `spec` and [cucumber]
132
161
 
133
162
  To run rspec tests:
134
163
 
135
- ```
164
+ ```bash
136
165
  rake spec
137
166
  ```
138
167
 
@@ -140,14 +169,14 @@ rake spec
140
169
 
141
170
  To run Cucumber tests:
142
171
 
143
- ```
172
+ ```bash
144
173
  rake features
145
174
  ```
146
175
 
147
176
  To pass the `output_file.feature` tests, you need to generate a non-empty `whats-new.yml`.
148
177
  To test just file:
149
178
 
150
- ```
179
+ ```bash
151
180
  bundle exec cucumber features/since.feature
152
181
  ```
153
182
 
@@ -166,7 +195,7 @@ end
166
195
  To run such test, run the corresponding file:
167
196
 
168
197
  ```bash
169
- ruby lib/whatsup_github/config-reader.rb
198
+ ruby lib/whatsup_github/config_reader.rb
170
199
  ```
171
200
 
172
201
  The tests use the root `.whatsup.yml` file to read configuration.