octokitted 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 986492cc42b62e6430a462513f232ad56788e51208ca6e6cfaf6560a37b22f81
4
- data.tar.gz: 266493071acbdae5115a6bea0ef739f89c6cafc07883f165df38db6d59c9db1e
3
+ metadata.gz: c54b0659d33d70b47ff7a61ab2773b855fda3a4822db6c83b2fb2779bf3a78e1
4
+ data.tar.gz: 534c02cc7b445bacb2ee8159761e77b115c727791a49508e3f3e21f2c159daca
5
5
  SHA512:
6
- metadata.gz: 1b80f268701244a188b1a5508ff53089d84da3b2db5873003b10426fd91bf4814a7b2a4609861ee4d822df6c7d74834512740ced1c9233eeb98c44c4c3d63b22
7
- data.tar.gz: 5355f24848030b3e248c1cdc45b1769d1a5332da6c18bff43fcdb07e38ee7e7dffe1973034c39ddf1742a22574b00f6ceeab3e166413e22e02103746a0ac9469
6
+ metadata.gz: 53ae33434a78beddd8b6388ca5dd525610f13a02ae0d7c157d3d79b7276f5e04f5074e30f3f7be3f92c111f46776ad742500f0377741dfe72ccb383cac7f07a2
7
+ data.tar.gz: 4b1a8f04e7d01978d50928116e3fdc67f1e1f57141c41c2801e0c7915f80a5afdb316afc71687bb162888550de8d550ec4345cebf41c21785e083cc2ec58fc5a
@@ -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("https://#{@token}@github.com/#{org}/#{repo}.git", repo, path:, log: @log, **options)
51
+ git_object = Git.clone(
52
+ "https://#{@token}@github.com/#{org}/#{repo}.git",
53
+ repo,
54
+ path:,
55
+ log: Logger.new(nil),
56
+ **options
57
+ )
51
58
 
52
59
  # configure the git environment
53
60
  git_object.config("user.name", @login)
data/lib/octokitted.rb CHANGED
@@ -193,6 +193,11 @@ class Octokitted
193
193
 
194
194
  issue_number = (github_event[:issue] || github_event[:pull_request] || github_event)[:number]
195
195
 
196
+ if issue_number.nil?
197
+ @log.debug("issue_number not found in GitHub event data - issue_number not auto-hydrated")
198
+ return nil
199
+ end
200
+
196
201
  @log.info("issue_number auto-hydrated - issue_number: #{issue_number}")
197
202
  return issue_number
198
203
  end
data/lib/version.rb CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Octokitted
4
4
  module Version
5
- VERSION = "1.0.0"
5
+ VERSION = "1.1.0"
6
6
  end
7
7
  end
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.0
4
+ version: 1.1.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-09-27 00:00:00.000000000 Z
11
+ date: 2023-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: contracts