chronicle-github 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -0
- data/README.md +4 -0
- data/chronicle-github.gemspec +25 -17
- data/lib/chronicle/github/activity_extractor.rb +5 -7
- data/lib/chronicle/github/version.rb +1 -1
- metadata +94 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd7803ca5b352a64eb72a11f91e8e8cf3ec3ef97937f2121d1c4125fc8e63fab
|
4
|
+
data.tar.gz: 522bf8ca8434cf452f1f5e257f0810f634a81911755b2413fa57e97c9668b337
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 883b14384930d4d77fa5bae14e9df3b2b83a84511b35bb37e5cb4e0345b22725c27c22967c4c1b62eafec405bfb5f99b3ffcac0054a6778a1d036aa2d90a21fd
|
7
|
+
data.tar.gz: f0056d86f268d915c24308e78db60ceb15ec591baf3596b4eccb11c1d4d658914518e54a0dac6614b7636642e0bad63142a0e7721bf799372d1ad965f40840dc
|
data/.rubocop.yml
ADDED
data/README.md
CHANGED
@@ -22,4 +22,8 @@ $ chronicle-etl secrets:set github access_token FOO123
|
|
22
22
|
|
23
23
|
# Extract github events from the last 10 days
|
24
24
|
$ chronicle-etl --extractor github:activity --since 10d
|
25
|
+
|
26
|
+
# Get all repos starred in the last month
|
27
|
+
$ chronicle-etl --extractor github:activity --loader json --since 1mo \
|
28
|
+
| jq -r 'select(.type == "WatchEvent") | .repo.name'
|
25
29
|
```
|
data/chronicle-github.gemspec
CHANGED
@@ -1,24 +1,24 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative
|
3
|
+
require_relative 'lib/chronicle/github/version'
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
|
-
spec.name =
|
6
|
+
spec.name = 'chronicle-github'
|
7
7
|
spec.version = Chronicle::Github::VERSION
|
8
|
-
spec.authors = [
|
9
|
-
spec.email = [
|
8
|
+
spec.authors = ['Andrew Louis']
|
9
|
+
spec.email = ['andrew@hyfen.net']
|
10
10
|
|
11
|
-
spec.summary =
|
12
|
-
spec.description =
|
13
|
-
spec.homepage =
|
14
|
-
spec.required_ruby_version =
|
15
|
-
spec.license =
|
11
|
+
spec.summary = 'Github connectors for Chronicle-ETL'
|
12
|
+
spec.description = 'Extract github user event stream, repository events, and more'
|
13
|
+
spec.homepage = 'https://github.com/chronicle-app/chronicle-github'
|
14
|
+
spec.required_ruby_version = '>= 3.1'
|
15
|
+
spec.license = 'MIT'
|
16
16
|
|
17
|
-
spec.metadata['allowed_push_host'] =
|
17
|
+
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
18
18
|
|
19
|
-
spec.metadata[
|
20
|
-
spec.metadata[
|
21
|
-
spec.metadata[
|
19
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
20
|
+
spec.metadata['source_code_uri'] = 'https://github.com/chronicle-app/chronicle-github'
|
21
|
+
spec.metadata['changelog_uri'] = 'https://github.com/chronicle-app/chronicle-github/releases'
|
22
22
|
|
23
23
|
# Specify which files should be added to the gem when it is released.
|
24
24
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
@@ -27,10 +27,18 @@ Gem::Specification.new do |spec|
|
|
27
27
|
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
28
28
|
end
|
29
29
|
end
|
30
|
-
spec.bindir =
|
30
|
+
spec.bindir = 'exe'
|
31
31
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
32
|
-
spec.require_paths = [
|
32
|
+
spec.require_paths = ['lib']
|
33
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
33
34
|
|
34
|
-
spec.add_dependency
|
35
|
-
spec.add_dependency
|
35
|
+
spec.add_dependency 'chronicle-core', '~> 0.3'
|
36
|
+
spec.add_dependency 'chronicle-etl', '~> 0.6'
|
37
|
+
spec.add_dependency 'faraday-retry', '~> 2'
|
38
|
+
spec.add_dependency 'octokit', '~> 8.1'
|
39
|
+
|
40
|
+
spec.add_development_dependency 'bundler', '~> 2.3'
|
41
|
+
spec.add_development_dependency 'pry-byebug', '~> 3.10'
|
42
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
43
|
+
spec.add_development_dependency 'rubocop', '~> 1.63'
|
36
44
|
end
|
@@ -5,9 +5,10 @@ module Chronicle
|
|
5
5
|
module Github
|
6
6
|
class ActivityExtractor < Chronicle::ETL::Extractor
|
7
7
|
register_connector do |r|
|
8
|
-
r.
|
9
|
-
r.
|
10
|
-
r.
|
8
|
+
r.source = :github
|
9
|
+
r.type = :activity
|
10
|
+
r.strategy = :api
|
11
|
+
r.description = 'github activity'
|
11
12
|
end
|
12
13
|
|
13
14
|
setting :access_token, required: true
|
@@ -18,9 +19,6 @@ module Chronicle
|
|
18
19
|
@access_token_owner = @client.user
|
19
20
|
end
|
20
21
|
|
21
|
-
def results_count
|
22
|
-
end
|
23
|
-
|
24
22
|
def extract
|
25
23
|
events = @client.user_events(username)
|
26
24
|
has_more = events.any?
|
@@ -34,7 +32,7 @@ module Chronicle
|
|
34
32
|
|
35
33
|
events.each do |event|
|
36
34
|
count += 1
|
37
|
-
yield
|
35
|
+
yield build_extraction(data: event, meta: { user: @user })
|
38
36
|
end
|
39
37
|
|
40
38
|
break unless @client.last_response.rels[:next]
|
metadata
CHANGED
@@ -1,43 +1,127 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chronicle-github
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Louis
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: chronicle-core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.3'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.3'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: chronicle-etl
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
31
|
- - "~>"
|
18
32
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
33
|
+
version: '0.6'
|
20
34
|
type: :runtime
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
38
|
- - "~>"
|
25
39
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
40
|
+
version: '0.6'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: faraday-retry
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2'
|
27
55
|
- !ruby/object:Gem::Dependency
|
28
56
|
name: octokit
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|
30
58
|
requirements:
|
31
59
|
- - "~>"
|
32
60
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
61
|
+
version: '8.1'
|
34
62
|
type: :runtime
|
35
63
|
prerelease: false
|
36
64
|
version_requirements: !ruby/object:Gem::Requirement
|
37
65
|
requirements:
|
38
66
|
- - "~>"
|
39
67
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
68
|
+
version: '8.1'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: bundler
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '2.3'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '2.3'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: pry-byebug
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '3.10'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '3.10'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rake
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '13.0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '13.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rubocop
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '1.63'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '1.63'
|
41
125
|
description: Extract github user event stream, repository events, and more
|
42
126
|
email:
|
43
127
|
- andrew@hyfen.net
|
@@ -45,6 +129,7 @@ executables: []
|
|
45
129
|
extensions: []
|
46
130
|
extra_rdoc_files: []
|
47
131
|
files:
|
132
|
+
- ".rubocop.yml"
|
48
133
|
- CODE_OF_CONDUCT.md
|
49
134
|
- Gemfile
|
50
135
|
- README.md
|
@@ -61,6 +146,7 @@ metadata:
|
|
61
146
|
homepage_uri: https://github.com/chronicle-app/chronicle-github
|
62
147
|
source_code_uri: https://github.com/chronicle-app/chronicle-github
|
63
148
|
changelog_uri: https://github.com/chronicle-app/chronicle-github/releases
|
149
|
+
rubygems_mfa_required: 'true'
|
64
150
|
post_install_message:
|
65
151
|
rdoc_options: []
|
66
152
|
require_paths:
|
@@ -69,14 +155,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
69
155
|
requirements:
|
70
156
|
- - ">="
|
71
157
|
- !ruby/object:Gem::Version
|
72
|
-
version:
|
158
|
+
version: '3.1'
|
73
159
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
160
|
requirements:
|
75
161
|
- - ">="
|
76
162
|
- !ruby/object:Gem::Version
|
77
163
|
version: '0'
|
78
164
|
requirements: []
|
79
|
-
rubygems_version: 3.
|
165
|
+
rubygems_version: 3.4.10
|
80
166
|
signing_key:
|
81
167
|
specification_version: 4
|
82
168
|
summary: Github connectors for Chronicle-ETL
|