whatsup_github 0.4.0 → 0.4.1
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 +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +1 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/README.md +21 -9
- data/lib/whatsup_github/pulls.rb +13 -1
- data/lib/whatsup_github/row_collector.rb +0 -1
- data/lib/whatsup_github/version.rb +1 -1
- metadata +2 -2
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
data/Gemfile.lock
CHANGED
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.
|
|
@@ -71,7 +71,7 @@ This gem can be installed as a system command-line tool or as a command-line too
|
|
|
71
71
|
|
|
72
72
|
### System installation
|
|
73
73
|
|
|
74
|
-
```
|
|
74
|
+
```bash
|
|
75
75
|
gem install whatsup_github
|
|
76
76
|
```
|
|
77
77
|
|
|
@@ -95,9 +95,11 @@ The configuration file [`.whatsup.yml`](lib/template/.whatsup.yml) will be creat
|
|
|
95
95
|
|
|
96
96
|
## Authentication
|
|
97
97
|
|
|
98
|
+
### With the .netrc file
|
|
99
|
+
|
|
98
100
|
Use [`~/.netrc`](https://github.com/octokit/octokit.rb#using-a-netrc-file) file for authentication.
|
|
99
101
|
|
|
100
|
-
```
|
|
102
|
+
```config
|
|
101
103
|
machine api.github.com
|
|
102
104
|
login <GitHub login>
|
|
103
105
|
password <GitHub token>
|
|
@@ -105,12 +107,22 @@ machine api.github.com
|
|
|
105
107
|
|
|
106
108
|
Example:
|
|
107
109
|
|
|
108
|
-
```
|
|
110
|
+
```config
|
|
109
111
|
machine api.github.com
|
|
110
112
|
login dshevtsov
|
|
111
113
|
password y9o6YvEoa7IukRWUFdnkpuxNjJ3uwiDQp4zkAdU0
|
|
112
114
|
```
|
|
113
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
|
+
|
|
114
126
|
## Usage
|
|
115
127
|
|
|
116
128
|
```bash
|
|
@@ -129,13 +141,13 @@ You can use different date formats like `'April 2'`, `'2 April'`, `'apr 2'`, `'2
|
|
|
129
141
|
|
|
130
142
|
To install dependencies:
|
|
131
143
|
|
|
132
|
-
```
|
|
144
|
+
```bash
|
|
133
145
|
bin/setup
|
|
134
146
|
```
|
|
135
147
|
|
|
136
148
|
To install the package:
|
|
137
149
|
|
|
138
|
-
```
|
|
150
|
+
```bash
|
|
139
151
|
rake install
|
|
140
152
|
```
|
|
141
153
|
|
|
@@ -149,7 +161,7 @@ The project contains [rspec](https://rspec.info/) tests in `spec` and [cucumber]
|
|
|
149
161
|
|
|
150
162
|
To run rspec tests:
|
|
151
163
|
|
|
152
|
-
```
|
|
164
|
+
```bash
|
|
153
165
|
rake spec
|
|
154
166
|
```
|
|
155
167
|
|
|
@@ -157,14 +169,14 @@ rake spec
|
|
|
157
169
|
|
|
158
170
|
To run Cucumber tests:
|
|
159
171
|
|
|
160
|
-
```
|
|
172
|
+
```bash
|
|
161
173
|
rake features
|
|
162
174
|
```
|
|
163
175
|
|
|
164
176
|
To pass the `output_file.feature` tests, you need to generate a non-empty `whats-new.yml`.
|
|
165
177
|
To test just file:
|
|
166
178
|
|
|
167
|
-
```
|
|
179
|
+
```bash
|
|
168
180
|
bundle exec cucumber features/since.feature
|
|
169
181
|
```
|
|
170
182
|
|
data/lib/whatsup_github/pulls.rb
CHANGED
|
@@ -47,8 +47,20 @@ module WhatsupGithub
|
|
|
47
47
|
configuration.base_branch
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
+
# Authorize with a GitHub token from $WHATSUP_GITHUB_ACCESS_TOKEN if available
|
|
51
|
+
# Otherwise, use credentials from ~/.netrc
|
|
52
|
+
# Otherwise, continue as a Guest
|
|
50
53
|
def client
|
|
51
|
-
|
|
54
|
+
return @client if @client
|
|
55
|
+
|
|
56
|
+
@client =
|
|
57
|
+
if ENV['WHATSUP_GITHUB_ACCESS_TOKEN']
|
|
58
|
+
Octokit::Client.new(access_token: ENV['WHATSUP_GITHUB_ACCESS_TOKEN'])
|
|
59
|
+
elsif File.exist? "#{ENV['HOME']}/.netrc"
|
|
60
|
+
Octokit::Client.new(netrc: true)
|
|
61
|
+
else
|
|
62
|
+
Octokit::Client.new
|
|
63
|
+
end
|
|
52
64
|
end
|
|
53
65
|
|
|
54
66
|
def search_issues(label)
|
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.
|
|
4
|
+
version: 0.4.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: 2021-
|
|
11
|
+
date: 2021-04-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: netrc
|