drone-builds 0.6.0 → 0.6.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: efd545d35d71cb442a18193a7692232e412955d0
4
- data.tar.gz: 8e2796e5cf647f811732b63225123aec8292d998
3
+ metadata.gz: a9bb029084c1280e627a9df2bed06883e3239d94
4
+ data.tar.gz: 99b0caf59b673b2b181cc63c9cf356e073c26b67
5
5
  SHA512:
6
- metadata.gz: 5feb54622bd51340dcd65f2c37555765c20ddc3d3ad581c8903a13abc48814e6639882fad4bd0011b64af5dcc0b4e9afe0bcc0294861518be0c1b508f7b9af73
7
- data.tar.gz: '09eb6a90c5beeebd7c0650669f3941e116a5e6993f34a521939a5bc81ebbfe042059490a82d095c14537ddfcc9cb626bae0fea18cc3cbe1318ed18d91df94a60'
6
+ metadata.gz: 5fb6200e2f06aaa53732eb7bc7e6b2fabb5f2e4305a158509e33c03feec5cd6dc2b1647735c316e9e9f0f947a89d6c3402fa0666e34d29681b22eabab282803f
7
+ data.tar.gz: d668212c58243294a317a82f4b17b92598ff1b8cdca84b6ca1ca4ff410cdd85060692fa57f6b159701a67b46d5005dab3b27f74be26ac69b9968d42054fe48c6
@@ -28,7 +28,7 @@ class Drone::Builds::Cli < Thor
28
28
  status: options[:status]
29
29
  ))
30
30
 
31
- puts self.class.parser.table(builds, %i(id status ref message))
31
+ puts self.class.parser.table(builds, %i(id status author ref message))
32
32
  end
33
33
 
34
34
  desc 'show', 'show a build'
@@ -26,6 +26,7 @@ class Drone::Builds::Parser
26
26
  {
27
27
  id: parse_id(build['id']),
28
28
  status: parse_status(build['status']),
29
+ author: parse_author(build['author']),
29
30
  ref: parse_ref(build['ref']),
30
31
  message: parse_message(build['message'])
31
32
  }
@@ -39,6 +40,15 @@ class Drone::Builds::Parser
39
40
  status.colorize(STATUS_COLORS[status.to_sym])
40
41
  end
41
42
 
43
+ def parse_author(author)
44
+ current_github_user = HOME_ENV[:GITHUB_USER]
45
+ if author == current_github_user
46
+ author.colorize(:light_white)
47
+ else
48
+ author
49
+ end
50
+ end
51
+
42
52
  def parse_ref(ref)
43
53
  ref.gsub('refs/heads/', '').gsub('/head', '').gsub('refs/pull/', '#')
44
54
  end
@@ -1,5 +1,5 @@
1
1
  module Drone
2
2
  class Builds
3
- VERSION = '0.6.0'.freeze
3
+ VERSION = '0.6.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: drone-builds
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dorian Marié
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-09 00:00:00.000000000 Z
11
+ date: 2017-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize