githuh 0.2.0 → 0.2.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/.envrc +2 -0
- data/.github/workflows/ruby.yml +2 -1
- data/.gitignore +1 -0
- data/.relaxed-rubocop-2.4.yml +176 -0
- data/.rubocop.yml +44 -0
- data/.rubocop_todo.yml +115 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +50 -15
- data/README.adoc +165 -0
- data/docs/img/coverage.svg +2 -2
- data/docs/img/githuh-issue-export.png +0 -0
- data/exe/githuh +1 -0
- data/githuh.gemspec +4 -1
- data/issues.json +3168 -0
- data/lib/githuh.rb +2 -1
- data/lib/githuh/cli/commands/base.rb +27 -6
- data/lib/githuh/cli/commands/issue/export.rb +192 -0
- data/lib/githuh/cli/commands/issue/export_paginated.rb +42 -0
- data/lib/githuh/cli/commands/repo/list.rb +18 -25
- data/lib/githuh/cli/launcher.rb +23 -9
- data/lib/githuh/version.rb +1 -1
- metadata +56 -7
- data/README.md +0 -103
data/lib/githuh/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: githuh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konstantin Gredeskoul
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: colored2
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,16 +70,16 @@ dependencies:
|
|
56
70
|
name: tty-box
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
|
-
- - "
|
73
|
+
- - ">="
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0
|
75
|
+
version: '0'
|
62
76
|
type: :runtime
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
|
-
- - "
|
80
|
+
- - ">="
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0
|
82
|
+
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: tty-progressbar
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,6 +94,20 @@ dependencies:
|
|
80
94
|
- - ">="
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: tty-screen
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
83
111
|
- !ruby/object:Gem::Dependency
|
84
112
|
name: aruba
|
85
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -164,6 +192,20 @@ dependencies:
|
|
164
192
|
- - "~>"
|
165
193
|
- !ruby/object:Gem::Version
|
166
194
|
version: '1'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: rubocop
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
167
209
|
- !ruby/object:Gem::Dependency
|
168
210
|
name: simplecov
|
169
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -203,19 +245,26 @@ files:
|
|
203
245
|
- ".envrc"
|
204
246
|
- ".github/workflows/ruby.yml"
|
205
247
|
- ".gitignore"
|
248
|
+
- ".relaxed-rubocop-2.4.yml"
|
206
249
|
- ".rspec"
|
250
|
+
- ".rubocop.yml"
|
251
|
+
- ".rubocop_todo.yml"
|
207
252
|
- Gemfile
|
208
253
|
- Gemfile.lock
|
209
254
|
- LICENSE
|
210
|
-
- README.
|
255
|
+
- README.adoc
|
211
256
|
- Rakefile
|
212
257
|
- WARRANTY.md
|
213
258
|
- codecov.yml
|
214
259
|
- docs/img/coverage.svg
|
260
|
+
- docs/img/githuh-issue-export.png
|
215
261
|
- exe/githuh
|
216
262
|
- githuh.gemspec
|
263
|
+
- issues.json
|
217
264
|
- lib/githuh.rb
|
218
265
|
- lib/githuh/cli/commands/base.rb
|
266
|
+
- lib/githuh/cli/commands/issue/export.rb
|
267
|
+
- lib/githuh/cli/commands/issue/export_paginated.rb
|
219
268
|
- lib/githuh/cli/commands/repo/list.rb
|
220
269
|
- lib/githuh/cli/commands/user/info.rb
|
221
270
|
- lib/githuh/cli/commands/version.rb
|
data/README.md
DELETED
@@ -1,103 +0,0 @@
|
|
1
|
-

|
2
|
-

|
3
|
-
|
4
|
-
# Githuh — GitHub API client
|
5
|
-
|
6
|
-
As in... **git? huh?**.
|
7
|
-
|
8
|
-
Github API client wrapper on top of Octokit, that provides extensible command pattern for wrapping Github functionality.
|
9
|
-
|
10
|
-
At the moment two features are implemented:
|
11
|
-
|
12
|
-
* Generating a list of org's (or personal) repositories and rending in either markdown or JSON
|
13
|
-
* Printing info of the logged in user.
|
14
|
-
|
15
|
-
## Using `githuh`
|
16
|
-
|
17
|
-
Add your Github Token to the global config:
|
18
|
-
|
19
|
-
```bash
|
20
|
-
git config --global --set user.token <token>
|
21
|
-
```
|
22
|
-
|
23
|
-
After that:
|
24
|
-
|
25
|
-
```bash
|
26
|
-
❯ githuh
|
27
|
-
Commands:
|
28
|
-
githuh repo [SUBCOMMAND]
|
29
|
-
githuh user [SUBCOMMAND]
|
30
|
-
githuh version # Print version
|
31
|
-
```
|
32
|
-
|
33
|
-
Githuh works by implement subcomands:
|
34
|
-
|
35
|
-
### `repo list`
|
36
|
-
|
37
|
-
#### Motivation
|
38
|
-
|
39
|
-
This functionality was born out of the need to generate a brief but comprehensive, well-formatted list of prior inventions for a typical employment contract.
|
40
|
-
|
41
|
-
> NOTE: nothing in this library constitutes a legal advice. Use it at your own risk. For more information, please see [WARRANTY](WARANTY.md).
|
42
|
-
|
43
|
-
Please watch the following Ascii Screen cast to see this command in action:
|
44
|
-
|
45
|
-
[](https://asciinema.org/a/CW8NbYfu9RsifQJVU6tKRtRkU)
|
46
|
-
|
47
|
-
#### Usage
|
48
|
-
|
49
|
-
```bash
|
50
|
-
❯ githuh repo list --help
|
51
|
-
|
52
|
-
Githuh CLI 0.1.2 — API client for Github.com.
|
53
|
-
© 2020 Konstantin Gredeskoul, All rights reserved. MIT License.
|
54
|
-
|
55
|
-
Usage:
|
56
|
-
githuh repo list
|
57
|
-
|
58
|
-
Description:
|
59
|
-
List owned repositories and render the output in markdown or JSON
|
60
|
-
Default output file is <username>.repositories.<format>
|
61
|
-
|
62
|
-
Options:
|
63
|
-
--api-token=VALUE # Github API token; if not given, user.token is read from ~/.gitconfig
|
64
|
-
--per-page=VALUE # Pagination page size for Github API, default: 20
|
65
|
-
--[no-]info # Print UI elements, like a the progress bar, default: true
|
66
|
-
--[no-]verbose # Print additional debugging info, default: false
|
67
|
-
--file=VALUE # Output file, overrides <username>.repositories.<format>
|
68
|
-
--format=VALUE # Output format: (markdown/json), default: "markdown"
|
69
|
-
--forks=VALUE # Include or exclude forks: (exclude/include/only), default: "exclude"
|
70
|
-
--[no-]private # If specified, returns only private repos for true, public for false
|
71
|
-
--help, -h # Print this help
|
72
|
-
```
|
73
|
-
|
74
|
-
#### Example
|
75
|
-
|
76
|
-
For instance, to generate a markdown list of all of your **public** repos that are also **not forks**, run the following:
|
77
|
-
|
78
|
-
```bash
|
79
|
-
$ githuh repo list --format=markdown --no-private --forks=exclude --file=repos.md
|
80
|
-
```
|
81
|
-
|
82
|
-
### `user info`
|
83
|
-
|
84
|
-
This command prints the info about currently authenticated user.
|
85
|
-
|
86
|
-
```bash
|
87
|
-
❯ githuh user info
|
88
|
-
{
|
89
|
-
:login => "kigster",
|
90
|
-
:url => "https://api.github.com/users/kigster",
|
91
|
-
:html_url => "https://github.com/kigster",
|
92
|
-
..............
|
93
|
-
|
94
|
-
```
|
95
|
-
|
96
|
-
## Contributing
|
97
|
-
|
98
|
-
Please submit a pull request at https://github.com/kigster/githuh/pulls
|
99
|
-
|
100
|
-
## License
|
101
|
-
|
102
|
-
© 2020 Konstantin Gredeskoul, [MIT License](LICENSE)
|
103
|
-
|