octokitted 0.0.7 → 0.0.8
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/octokitted.rb +6 -3
- data/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c7fe4c051e60f41068c020cd9c0fbfe3bae4d1cb673e22de5dc17c3b76e46ea9
|
|
4
|
+
data.tar.gz: b6c569962b05022e655a077f9f692c5d17a2bab406e29722188887dc7be248cc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b3a9add54171018622c44d309e6ac50435d3c225fe4795eb917c9812a3a567881210fa8f538b6b575eb00cb7bc7d2831da3899cfa9f29115ef30ce42fffa384f
|
|
7
|
+
data.tar.gz: 2cb81e5b5a4e078cfc7dec09202092c01c609a888ffc2c6e176390f45de1ebcdd3f4c9873378a90ccd33fddc4d4425493846af1288886ee2f1489a7e38432dbe
|
data/lib/octokitted.rb
CHANGED
|
@@ -40,7 +40,7 @@ class Octokitted
|
|
|
40
40
|
@cloned_repos = []
|
|
41
41
|
@event_path = event_path || ENV.fetch("GITHUB_EVENT_PATH", nil)
|
|
42
42
|
@sha = ENV.fetch("GITHUB_SHA", nil)
|
|
43
|
-
org_and_repo_hash = fetch_org_and_repo
|
|
43
|
+
org_and_repo_hash = fetch_org_and_repo(org, repo)
|
|
44
44
|
@login = login
|
|
45
45
|
@org = org || org_and_repo_hash[:org]
|
|
46
46
|
@repo = repo || org_and_repo_hash[:repo]
|
|
@@ -137,8 +137,11 @@ class Octokitted
|
|
|
137
137
|
|
|
138
138
|
# Fetch the org and repo from the environment
|
|
139
139
|
# :return: A hash containing the org and repo, and the org and repo separately
|
|
140
|
-
Contract
|
|
141
|
-
def fetch_org_and_repo
|
|
140
|
+
Contract Maybe[String], Maybe[String] => Hash
|
|
141
|
+
def fetch_org_and_repo(org, repo)
|
|
142
|
+
# if org and repo are provided, and not nil, use them
|
|
143
|
+
return { org_and_repo: "#{org}/#{repo}", org:, repo: } if org && repo
|
|
144
|
+
|
|
142
145
|
org_and_repo = ENV.fetch("GITHUB_REPOSITORY", nil)
|
|
143
146
|
org = nil
|
|
144
147
|
repo = nil
|
data/lib/version.rb
CHANGED
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: 0.0.
|
|
4
|
+
version: 0.0.8
|
|
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-
|
|
11
|
+
date: 2023-09-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: contracts
|