gitearb 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/gitea/client.rb +4 -0
- data/lib/gitea/objects/commit_status.rb +4 -0
- data/lib/gitea/resources/commit_statuses.rb +14 -0
- data/lib/gitea/version.rb +1 -1
- data/lib/gitea.rb +2 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9d322ad7cea3712f32a04f5d2d4402d61e8b43f6aad0ca470566f6c4f34d851
|
4
|
+
data.tar.gz: 273c36d0ccc26ae602a1a9cc6ea80d57171185633cf72d1d72a489ea0c982937
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc9afeaf15ba7cfdd058b801ffe8666c2805ef516f058723c032df695e21c7b858e02552d65a59872667d8eeea1c776ce3f683afbaf894e889891117c5183e06
|
7
|
+
data.tar.gz: 21f78ef489bddeaff89a2d280e8abc27ef8f120fd73e7d822c912953e878334f497af724828ff0887f7366bea862f906ff64996da0eb504468c11c2298aa9ef5
|
data/Gemfile.lock
CHANGED
data/lib/gitea/client.rb
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
module Gitea
|
2
|
+
class CommitStatusesResource < Resource
|
3
|
+
|
4
|
+
def list(owner:, repo:, sha:, **params)
|
5
|
+
response = get_request("repos/#{owner}/#{repo}/statuses/#{sha}", params: params)
|
6
|
+
Collection.from_response(response, type: CommitStatus)
|
7
|
+
end
|
8
|
+
|
9
|
+
def create(owner:, repo:, sha:, **args)
|
10
|
+
CommitStatus.new post_request("repos/#{owner}/#{repo}/statuses/#{sha}", body: args).body
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
data/lib/gitea/version.rb
CHANGED
data/lib/gitea.rb
CHANGED
@@ -17,11 +17,13 @@ module Gitea
|
|
17
17
|
autoload :UserReposResource, "gitea/resources/user_repos"
|
18
18
|
autoload :ReposResource, "gitea/resources/repos"
|
19
19
|
autoload :RepoHooksResource, "gitea/resources/repo_hooks"
|
20
|
+
autoload :CommitStatusesResource, "gitea/resources/commit_statuses"
|
20
21
|
|
21
22
|
autoload :User, "gitea/objects/user"
|
22
23
|
autoload :Email, "gitea/objects/email"
|
23
24
|
autoload :Org, "gitea/objects/org"
|
24
25
|
autoload :Hook, "gitea/objects/hook"
|
25
26
|
autoload :Repo, "gitea/objects/repo"
|
27
|
+
autoload :CommitStatus, "gitea/objects/commit_status"
|
26
28
|
|
27
29
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitearb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dean Perry
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02-
|
11
|
+
date: 2023-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -48,12 +48,14 @@ files:
|
|
48
48
|
- lib/gitea/collection.rb
|
49
49
|
- lib/gitea/error.rb
|
50
50
|
- lib/gitea/object.rb
|
51
|
+
- lib/gitea/objects/commit_status.rb
|
51
52
|
- lib/gitea/objects/email.rb
|
52
53
|
- lib/gitea/objects/hook.rb
|
53
54
|
- lib/gitea/objects/org.rb
|
54
55
|
- lib/gitea/objects/repo.rb
|
55
56
|
- lib/gitea/objects/user.rb
|
56
57
|
- lib/gitea/resource.rb
|
58
|
+
- lib/gitea/resources/commit_statuses.rb
|
57
59
|
- lib/gitea/resources/org_hooks.rb
|
58
60
|
- lib/gitea/resources/orgs.rb
|
59
61
|
- lib/gitea/resources/repo_hooks.rb
|