stash_cli 0.1.0 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 25c7e2e61789ac9442d014f20bb5d8ba2fabefb8
4
- data.tar.gz: adae0d8806ce8450f4add8668f4d3d7c3aedd923
3
+ metadata.gz: b390333e969b2a1198a7d61a926460d4d3c72ec7
4
+ data.tar.gz: cb9e9d93e24c393debf3f629a2c96cb7407104ec
5
5
  SHA512:
6
- metadata.gz: 7c0ee8ea13dc1aa9407183a04eafe311696bb8f37158cd0105304184b5a2fd87498eaa6c1754bd1a4dac284ffe847627b28fe09094138a21ed46d6dd68eea94b
7
- data.tar.gz: f46c9a1c03e08c0912de3c67d03ec85b85efccb0d735dc179e6b5426b40ef721531849362859debb4b87eca1a4ccd7072bd178a92ee248eb2352eeaf8931b2a4
6
+ metadata.gz: 2b068f17770a53884f6ab8a6362f2c3029e0c9ebd7433b2b183a6a727afd4d6e64fadb36f0055fb0cef741ac79b5cf6d5521f3f28f3933f5c6271788aa22a730
7
+ data.tar.gz: e442044a93ceacaa4e8777ad8e4ea2c960fb600acfdd59e716ad48ff7fc0bf4a07a0a14e5c1e731ba2b09589876d4308ea715272af6e17df78b9ee4097b92608
data/lib/stash_cli/cli.rb CHANGED
@@ -56,6 +56,16 @@ module StashCLI
56
56
  print_table(users)
57
57
  end
58
58
 
59
+ desc 'branches', 'list branches in source'
60
+ def branches
61
+ configure
62
+ client = Client.new(configatron.server, configatron.auth_token)
63
+ resp = client.branches(configatron.defaults.project, configatron.defaults.source_slug)
64
+ resp['values'].each do |value|
65
+ say value['displayId']
66
+ end
67
+ end
68
+
59
69
  desc 'groups', 'list defined reviewer groups'
60
70
  def groups
61
71
  configure
@@ -32,6 +32,11 @@ module StashCLI
32
32
  JSON.parse(response.body)
33
33
  end
34
34
 
35
+ def branches(project, slug)
36
+ response = resource["projects/#{project}/repos/#{slug}/branches?limit=1000"].get
37
+ JSON.parse(response.body)
38
+ end
39
+
35
40
  def pull_request(options={})
36
41
  params = {
37
42
  title: options[:title],
@@ -1,3 +1,3 @@
1
1
  module StashCli
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stash_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Chun-Lum
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-17 00:00:00.000000000 Z
11
+ date: 2016-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: configatron