bl 0.2.4 → 0.2.5
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/README.md +62 -4
- data/lib/bl.rb +1 -0
- data/lib/bl/cli.rb +3 -0
- data/lib/bl/gitrepo.rb +42 -0
- data/lib/bl/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cfe9f5b37e14eeb20f957ba1ad622c50e48de77
|
4
|
+
data.tar.gz: 99c6dd58f03c6479330dd24f70fae8a512d669cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef354cd8a4a3fa6af921b00a45c10468c8730f7e4af962f29c68ea2a29f18f1a42fdef482dd073e8b06a4be9a7f715585e0681ca094d9b6fa94ccd2da25257cd
|
7
|
+
data.tar.gz: 700e5b54e2b64547c2db75cc20d44931730a7913df61d5cb2bd208fa22fef0e1db20d7eefc4a2e7ef1bc70f955c3a2e6cbd2b72c50f8bdffb84efd49fc41ffed
|
data/README.md
CHANGED
@@ -1,8 +1,20 @@
|
|
1
|
+
# bl
|
2
|
+
|
3
|
+
bl is a command line tool for Nulab's [Backlog](http://www.backlog.jp/).
|
4
|
+
|
1
5
|
[](https://badge.fury.io/rb/bl)
|
6
|
+

|
2
7
|
|
3
|
-
|
8
|
+
## Table of Contents
|
9
|
+
- [Installation](https://github.com/sakihet/bl#installation)
|
10
|
+
- [Configuration](https://github.com/sakihet/bl#configuration)
|
11
|
+
- [Usage](https://github.com/sakihet/bl#usage)
|
12
|
+
- [Contributing](https://github.com/sakihet/bl#contributing)
|
13
|
+
- [License](https://github.com/sakihet/bl#license)
|
4
14
|
|
5
|
-
|
15
|
+
## Requirements
|
16
|
+
|
17
|
+
- ruby 2.3+
|
6
18
|
|
7
19
|
## Installation
|
8
20
|
|
@@ -37,6 +49,8 @@ bl uses `~/.bl.yml` for configuration.
|
|
37
49
|
bl config # show config
|
38
50
|
bl count # count issues
|
39
51
|
bl doctor # check issues
|
52
|
+
bl edit KEY # edit issues' description by $EDITOR
|
53
|
+
bl file SUBCOMMAND ...ARGS # manage files
|
40
54
|
bl help [COMMAND] # Describe available commands or one specific command
|
41
55
|
bl init # initialize a default config file
|
42
56
|
bl list # list issues by typical ways
|
@@ -56,8 +70,6 @@ bl uses `~/.bl.yml` for configuration.
|
|
56
70
|
bl version # show version
|
57
71
|
bl wiki SUBCOMMAND ...ARGS # manage wikis
|
58
72
|
|
59
|
-
### Examples
|
60
|
-
|
61
73
|
View global or command specific help:
|
62
74
|
|
63
75
|
bl help
|
@@ -65,6 +77,12 @@ View global or command specific help:
|
|
65
77
|
bl help search
|
66
78
|
bl help add
|
67
79
|
|
80
|
+
### Issue
|
81
|
+
|
82
|
+
List unclosed issues:
|
83
|
+
|
84
|
+
bl list
|
85
|
+
|
68
86
|
List overdue issues:
|
69
87
|
|
70
88
|
bl list --overdue
|
@@ -77,14 +95,54 @@ Add multi issues:
|
|
77
95
|
|
78
96
|
cat list.txt | xargs -I {} bl add {}
|
79
97
|
|
98
|
+
Edit issue by your favorite $EDITOR:
|
99
|
+
|
100
|
+
bl edit ISSUE-12
|
101
|
+
|
80
102
|
Update unassigned issues:
|
81
103
|
|
82
104
|
bl list --unassigned | awk '{print $2}' | xargs bl update --assigneeId 12345
|
83
105
|
|
106
|
+
### Project
|
107
|
+
|
108
|
+
List projects:
|
109
|
+
|
110
|
+
bl project list
|
111
|
+
|
112
|
+
Show project progress:
|
113
|
+
|
114
|
+
bl project progress 12345
|
115
|
+
|
116
|
+
### Wiki
|
117
|
+
|
118
|
+
List wiki pages:
|
119
|
+
|
120
|
+
bl wiki list
|
121
|
+
|
84
122
|
Edit wiki page by $EDITOR:
|
85
123
|
|
86
124
|
bl wiki edit 12345
|
87
125
|
|
126
|
+
### File
|
127
|
+
|
128
|
+
List files:
|
129
|
+
|
130
|
+
bl file list
|
131
|
+
|
132
|
+
Download file:
|
133
|
+
|
134
|
+
bl file get 12345
|
135
|
+
|
136
|
+
### Git repository
|
137
|
+
|
138
|
+
List repositories:
|
139
|
+
|
140
|
+
bl gitrepo list
|
141
|
+
|
142
|
+
Show repository:
|
143
|
+
|
144
|
+
bl gitrepo show 12345
|
145
|
+
|
88
146
|
## Backlog API
|
89
147
|
|
90
148
|
http://developer.nulab-inc.com/docs/backlog
|
data/lib/bl.rb
CHANGED
data/lib/bl/cli.rb
CHANGED
data/lib/bl/gitrepo.rb
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
module Bl
|
2
|
+
class GitRepo < Thor
|
3
|
+
include Bl::Requestable
|
4
|
+
|
5
|
+
def initialize(*)
|
6
|
+
@config = Bl::Config.instance
|
7
|
+
@url = "projects/#{@config[:project_key]}/git/repositories"
|
8
|
+
super
|
9
|
+
end
|
10
|
+
|
11
|
+
desc 'list', 'list git repositories'
|
12
|
+
def list
|
13
|
+
client.get(@url).body.each do |repo|
|
14
|
+
puts [
|
15
|
+
repo.id,
|
16
|
+
repo.projectId,
|
17
|
+
repo.name,
|
18
|
+
repo.description,
|
19
|
+
repo.sshUrl
|
20
|
+
].join("\t")
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
desc 'show ID', 'show a git repository'
|
25
|
+
def show(id)
|
26
|
+
body = client.get("#{@url}/#{id}").body
|
27
|
+
puts "id: #{body.id}"
|
28
|
+
puts "projectId: #{body.projectId}"
|
29
|
+
puts "name: #{body.name}"
|
30
|
+
puts "description: #{body.description}"
|
31
|
+
puts "hookUrl: #{body.hookUrl}"
|
32
|
+
puts "httpUrl: #{body.httpUrl}"
|
33
|
+
puts "sshUrl: #{body.sshUrl}"
|
34
|
+
puts "displayOrder: #{body.displayOrder}"
|
35
|
+
puts "pushedAt: #{body.pushedAt}"
|
36
|
+
puts "createdUser: #{body.createdUser.name}"
|
37
|
+
puts "created: #{body.created}"
|
38
|
+
puts "updatedUser: #{body.updatedUser.name}"
|
39
|
+
puts "updated: #{body.updated}"
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
data/lib/bl/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- saki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -146,6 +146,7 @@ files:
|
|
146
146
|
- lib/bl/config.rb
|
147
147
|
- lib/bl/file.rb
|
148
148
|
- lib/bl/formatting.rb
|
149
|
+
- lib/bl/gitrepo.rb
|
149
150
|
- lib/bl/milestone.rb
|
150
151
|
- lib/bl/project.rb
|
151
152
|
- lib/bl/recent.rb
|