usps-support 0.2.32 → 0.2.34
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/usps/support/models/git_hub.rb +13 -0
- data/lib/usps/support/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 02f8fb6837863f1db65a53e28ea9d5024a1950f77da7b996d069bf5b590b2000
|
|
4
|
+
data.tar.gz: 5c8d8c959ab8d05117f1b062d0805d99a29c462c112848d71fcd4cd74677303a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b26fc468f75a235640d8787872cd6dc0f404a34590ce577e6a294ce946541c9ec553d6ddcb79af75084e3ae5846d2901c25e504f00d03613f9228504500905a6
|
|
7
|
+
data.tar.gz: b35ed5d1aa5692066b740f2d0f11cefcbd4d604106304b0676ebfb6aa61fbad57a014e421347d8dcb181d8a9eb7dbf0cebad08db10f895d24f685366ddce3811
|
|
@@ -5,12 +5,17 @@ module Usps::Support::Models
|
|
|
5
5
|
#
|
|
6
6
|
module GitHub
|
|
7
7
|
ORG = 'unitedstatespowersquadrons'
|
|
8
|
+
CLIENT_MUTEX = Mutex.new
|
|
8
9
|
|
|
9
10
|
class << self
|
|
10
11
|
def check_suites(repo, branch)
|
|
11
12
|
client.check_suites_for_ref("#{ORG}/#{repo}", branch).check_suites
|
|
12
13
|
end
|
|
13
14
|
|
|
15
|
+
def graphql(query, variables = {})
|
|
16
|
+
client.post('/graphql', { query:, variables: }.to_json)
|
|
17
|
+
end
|
|
18
|
+
|
|
14
19
|
def check_runs(repo, check_suite_id)
|
|
15
20
|
client.check_runs_for_check_suite("#{ORG}/#{repo}", check_suite_id).check_runs
|
|
16
21
|
end
|
|
@@ -20,6 +25,10 @@ module Usps::Support::Models
|
|
|
20
25
|
client.commit("#{ORG}/#{repo}", sha).commit
|
|
21
26
|
end
|
|
22
27
|
|
|
28
|
+
def repository_workflow_runs(repo, head_sha:)
|
|
29
|
+
client.repository_workflow_runs("#{ORG}/#{repo}", head_sha:).workflow_runs
|
|
30
|
+
end
|
|
31
|
+
|
|
23
32
|
def latest_tag(repo, include_prereleases: false)
|
|
24
33
|
client
|
|
25
34
|
.tags("#{ORG}/#{repo}")
|
|
@@ -41,6 +50,10 @@ module Usps::Support::Models
|
|
|
41
50
|
def client
|
|
42
51
|
return @client if @client && !expired?
|
|
43
52
|
|
|
53
|
+
CLIENT_MUTEX.synchronize { @client && !expired? ? @client : client! }
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def client!
|
|
44
57
|
payload = {
|
|
45
58
|
iat: Time.now.to_i - 60,
|
|
46
59
|
exp: Time.now.to_i + (10 * 60),
|
data/lib/usps/support/version.rb
CHANGED