grok_cli 1.1.0 → 1.2.0
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/lib/grok_cli/git/log.rb +8 -3
- data/lib/grok_cli/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 230c499ad661073a5e90c94d08fd5610b5cbddbe
|
|
4
|
+
data.tar.gz: 026383d13a1f7b8ecc1d1be05e1412d004d98222
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c88fc5b5990c21cd2f6ca90105cbc64cf4a6007e456fd0b581f837cdfea417c2a2e0cd79d3ea70173e0eaf01b958595528175522d627b97edac174413c4aabc6
|
|
7
|
+
data.tar.gz: c4205f1ee1e3526f7b25440336623692515dbe162cc1678b9cd58c66dc2fe2fdfaa11b1b915619689830f4210c0571ca9afe86aff9c739f6a7199787ab2f1d1f
|
data/lib/grok_cli/git/log.rb
CHANGED
|
@@ -5,13 +5,13 @@ require 'uri'
|
|
|
5
5
|
module GrokCLI::Git
|
|
6
6
|
class Log
|
|
7
7
|
|
|
8
|
-
def execute(since_hours_ago:, domains:
|
|
8
|
+
def execute(since_hours_ago:, domains:, author:)
|
|
9
9
|
pwd = Dir.pwd
|
|
10
10
|
git = Git.open(pwd)
|
|
11
11
|
|
|
12
12
|
map = {}
|
|
13
13
|
|
|
14
|
-
git.log.since("#{since_hours_ago} hours ago").reverse_each do |commit|
|
|
14
|
+
git.log.author(author).since("#{since_hours_ago} hours ago").reverse_each do |commit|
|
|
15
15
|
uris = URI.extract(commit.message)
|
|
16
16
|
|
|
17
17
|
uris.select! do |uri|
|
|
@@ -94,8 +94,13 @@ module GrokCLI
|
|
|
94
94
|
default_value: /trello\.com|atlassian\.net|asana\.com/,
|
|
95
95
|
desc: 'A regular expression to search against domain names'
|
|
96
96
|
|
|
97
|
+
c.flag [:a, :author],
|
|
98
|
+
type: String,
|
|
99
|
+
default_value: ::Git::Lib.new.global_config_get('user.name'),
|
|
100
|
+
desc: 'The git user\'s name to view history'
|
|
101
|
+
|
|
97
102
|
c.action do |global_options,options,arguments|
|
|
98
|
-
GrokCLI::Git::Log.new.execute(since_hours_ago: options[:since], domains: options[:domains])
|
|
103
|
+
GrokCLI::Git::Log.new.execute(since_hours_ago: options[:since], domains: options[:domains], author: options[:author])
|
|
99
104
|
end
|
|
100
105
|
end
|
|
101
106
|
end
|
data/lib/grok_cli/version.rb
CHANGED