octokitted 1.0.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/octokitted/git_plugin.rb +8 -1
- data/lib/octokitted.rb +6 -2
- data/lib/version.rb +1 -1
- data/octokitted.gemspec +2 -1
- metadata +24 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b64ea62cc0c77e74950c8919bca43c4a267324662672cdbdc9bbab41830748e
|
4
|
+
data.tar.gz: 5e6441a7d8920353bb4e355c7acedcf3991f67044f9900f0d414e9d8ab529239
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cde7b483042184c494e72d75ff979931a54f8494e1fc2200de8989a330002bdf216ac57eb5d853946212e56ae46e670d5f28f97e4d162b69f35eeb822a6b58c9
|
7
|
+
data.tar.gz: 3cbb193639559007507bc3ddc0408b93d4ffc5e665e01f3e17241dcf4761a0bf90d86bd0a2b6455c7909c4ca907a5f0a99aea4d832913117168761674bfd0060
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require "git"
|
4
4
|
require "contracts"
|
5
|
+
require "logger"
|
5
6
|
|
6
7
|
class GitPlugin
|
7
8
|
attr_reader :login
|
@@ -47,7 +48,13 @@ class GitPlugin
|
|
47
48
|
Contract KeywordArgs[org: String, repo: String, path: Maybe[String], options: Maybe[Hash]] => Hash
|
48
49
|
def clone(org:, repo:, path: ".", options: {})
|
49
50
|
@log.debug("cloning #{org}/#{repo}")
|
50
|
-
git_object = Git.clone(
|
51
|
+
git_object = Git.clone(
|
52
|
+
"https://#{@token}@github.com/#{org}/#{repo}.git",
|
53
|
+
repo,
|
54
|
+
path:,
|
55
|
+
log: @log,
|
56
|
+
**options
|
57
|
+
)
|
51
58
|
|
52
59
|
# configure the git environment
|
53
60
|
git_object.config("user.name", @login)
|
data/lib/octokitted.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "octokit"
|
4
|
-
require "
|
4
|
+
require "redacting_logger"
|
5
5
|
require "contracts"
|
6
6
|
|
7
7
|
require_relative "octokitted/git_plugin"
|
@@ -141,7 +141,11 @@ class Octokitted
|
|
141
141
|
# construct a logger for the class
|
142
142
|
def setup_logger
|
143
143
|
$stdout.sync = true # don't buffer - flush immediately
|
144
|
-
|
144
|
+
RedactingLogger.new(
|
145
|
+
$stdout,
|
146
|
+
level: ENV.fetch("LOG_LEVEL", "INFO").upcase,
|
147
|
+
redact_patterns: [] # just using the defaults for now
|
148
|
+
)
|
145
149
|
end
|
146
150
|
|
147
151
|
# Fetch the org and repo from the environment
|
data/lib/version.rb
CHANGED
data/octokitted.gemspec
CHANGED
@@ -24,7 +24,8 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_dependency "contracts", "~> 0.17"
|
25
25
|
spec.add_dependency "faraday-retry", "~> 2.2"
|
26
26
|
spec.add_dependency "git", "~> 1.18"
|
27
|
-
spec.add_dependency "octokit", "
|
27
|
+
spec.add_dependency "octokit", ">= 7.1", "< 9.0"
|
28
|
+
spec.add_dependency "redacting-logger", "~> 1.0"
|
28
29
|
|
29
30
|
spec.required_ruby_version = Gem::Requirement.new(">= 3.0.0")
|
30
31
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octokitted
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Grant Birkinbine
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: contracts
|
@@ -56,16 +56,36 @@ dependencies:
|
|
56
56
|
name: octokit
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '7.1'
|
62
|
+
- - "<"
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: '9.0'
|
62
65
|
type: :runtime
|
63
66
|
prerelease: false
|
64
67
|
version_requirements: !ruby/object:Gem::Requirement
|
65
68
|
requirements:
|
66
|
-
- - "
|
69
|
+
- - ">="
|
67
70
|
- !ruby/object:Gem::Version
|
68
71
|
version: '7.1'
|
72
|
+
- - "<"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '9.0'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: redacting-logger
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '1.0'
|
82
|
+
type: :runtime
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '1.0'
|
69
89
|
description: 'A self-hydrating version of Octokit for usage in CI systems - like GitHub
|
70
90
|
Actions!
|
71
91
|
|