gh_coab 0.1.1 → 0.1.3
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/Gemfile.lock +1 -1
- data/lib/gh_coab/gh_coab.rb +2 -0
- data/lib/gh_coab/gh_service.rb +1 -1
- data/lib/gh_coab/version.rb +1 -1
- data/lib/gh_coab.rb +3 -4
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a25fa8b28a96b85a5f97858c7b8a5e08f01ec457416d0e538357d60e1541a54b
|
4
|
+
data.tar.gz: beac387ea06182f391494580e0f53aa1af883fd177a33fdaaf81051f783d80f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 704fa839d3c918cd3ae215978fe8cbdbebb40fcb51efc86ef1d3a042a332c843458d93adf612e78d5ce152aa965329394f6eade9d4c6e0a6eebedf9b44aa0b73
|
7
|
+
data.tar.gz: b7ba49355b63dd218f6bc3a1cb48b030dcf4843eae7405e93a39cf283f354daf58c830f56a8c6864ff62f24f4b711f96c721db7c0c907a45eea3ff3b0a44a8a4
|
data/Gemfile.lock
CHANGED
data/lib/gh_coab/gh_coab.rb
CHANGED
@@ -5,6 +5,8 @@ module GhCoab
|
|
5
5
|
def self.write_coab(username)
|
6
6
|
name = service.get_name(username)
|
7
7
|
emails = service.get_emails(username)
|
8
|
+
emails.select! { |email| email[:name].downcase == name.downcase && !email[:email].nil? }
|
9
|
+
emails = emails.map { |email| email[:email] }
|
8
10
|
coabs = emails.map do |email|
|
9
11
|
"#{COAB}#{name} <#{email}>"
|
10
12
|
end
|
data/lib/gh_coab/gh_service.rb
CHANGED
@@ -14,7 +14,7 @@ class GhService
|
|
14
14
|
response.map do |event|
|
15
15
|
next if event.dig(:payload, :commits).nil?
|
16
16
|
event[:payload][:commits].map do |commit|
|
17
|
-
commit[:author][:email]
|
17
|
+
{name: commit[:author][:name], email: commit[:author][:email]}
|
18
18
|
end
|
19
19
|
end.flatten.uniq.compact
|
20
20
|
end
|
data/lib/gh_coab/version.rb
CHANGED
data/lib/gh_coab.rb
CHANGED
@@ -9,16 +9,15 @@ module GhCoab
|
|
9
9
|
|
10
10
|
class CLI < Thor
|
11
11
|
desc "show <GH_USERNAME>", "Displays the co-author name and emails"
|
12
|
-
|
12
|
+
|
13
13
|
option :username, aliases: "-u", required: true, type: :string
|
14
|
-
|
15
|
-
|
14
|
+
|
16
15
|
def show
|
17
16
|
GhCoab.write_coab(options[:username])
|
18
17
|
end
|
19
18
|
desc "s <GH_USERNAME>", "Displays the co-author name and emails"
|
20
19
|
option :username, aliases: "-u", required: true, type: :string
|
21
20
|
|
22
|
-
alias_method :s, :show
|
21
|
+
alias_method :s, :show
|
23
22
|
end
|
24
23
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gh_coab
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- george kosmopoulos
|
@@ -10,7 +10,9 @@ bindir: exe
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2023-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description: Get co-authors from github
|
13
|
+
description: "Get co-authors from github \n in your terminal type gh_coab s -u <github_username>
|
14
|
+
\n or gh_coab show -u <github_username> \n and you will get the message you need
|
15
|
+
to add to your commit message to add co-authors"
|
14
16
|
email:
|
15
17
|
- gkosmo1@hotmail.com
|
16
18
|
executables:
|
@@ -34,13 +36,13 @@ files:
|
|
34
36
|
- lib/gh_coab/gh_service.rb
|
35
37
|
- lib/gh_coab/version.rb
|
36
38
|
- sig/gh_coab.rbs
|
37
|
-
homepage: https://www.github.com/gkosmo/
|
39
|
+
homepage: https://www.github.com/gkosmo/gh_coab
|
38
40
|
licenses:
|
39
41
|
- MIT
|
40
42
|
metadata:
|
41
|
-
homepage_uri: https://www.github.com/gkosmo/
|
42
|
-
source_code_uri: https://www.github.com/gkosmo/
|
43
|
-
changelog_uri: https://www.github.com/gkosmo/
|
43
|
+
homepage_uri: https://www.github.com/gkosmo/gh_coab
|
44
|
+
source_code_uri: https://www.github.com/gkosmo/gh_coab
|
45
|
+
changelog_uri: https://www.github.com/gkosmo/gh_coab
|
44
46
|
post_install_message:
|
45
47
|
rdoc_options: []
|
46
48
|
require_paths:
|