gitea-client 1.4.5 → 1.5.0
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/Gemfile.lock +1 -1
- data/README.md +3 -4
- data/lib/gitea/api/exception.rb +1 -0
- data/lib/gitea/api.rb +0 -7
- data/lib/gitea/version.rb +1 -1
- metadata +3 -10
- data/lib/gitea/api/hat/admin.rb +0 -13
- data/lib/gitea/api/hat/client.rb +0 -48
- data/lib/gitea/api/hat/config.rb +0 -36
- data/lib/gitea/api/hat/http.rb +0 -132
- data/lib/gitea/api/hat/organization.rb +0 -25
- data/lib/gitea/api/hat/repository.rb +0 -164
- data/lib/gitea/api/hat/users.rb +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3834af0c17b279bc9664771bab2a2da7e96a86ee0cf28d95217cc639c3e516ff
|
4
|
+
data.tar.gz: e6e1a73e61ea258ad1b16a1d762668b50b5c55c53cde900116f6ac79f78fabdc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86d7db185d6028ef1874310f0e4a7f575afcbf463870e77ab044a8b8bddea61d6a58410f24705a78ae3a7d252120c7c33739418ca62c9eb40b1d543e4616a740
|
7
|
+
data.tar.gz: 9d7fc586d9f5af93bca7e994005fcedc56d6f0942296d4aad9e6d8ae1c0da4d013392ff4c7cc1eb2b09bdc4fe466d9bc888e573300de0c520d27da8a20e7e0a1
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -2,14 +2,12 @@
|
|
2
2
|
|
3
3
|
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/gitea`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
4
|
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
6
|
-
|
7
5
|
## Installation
|
8
6
|
|
9
7
|
Add this line to your application's Gemfile:
|
10
8
|
|
11
9
|
```ruby
|
12
|
-
gem 'gitea-client'
|
10
|
+
gem 'gitea-client', '~> 1.4.0'
|
13
11
|
```
|
14
12
|
|
15
13
|
And then execute:
|
@@ -20,7 +18,7 @@ Or install it yourself as:
|
|
20
18
|
|
21
19
|
$ gem install gitea-client
|
22
20
|
|
23
|
-
## Usage
|
21
|
+
## Usage Example
|
24
22
|
|
25
23
|
```ruby
|
26
24
|
require 'gitea-client'
|
@@ -31,6 +29,7 @@ client.get_users_search({query: {q: 'viletyy'}})
|
|
31
29
|
|
32
30
|
```
|
33
31
|
|
32
|
+
|
34
33
|
## Development
|
35
34
|
|
36
35
|
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/lib/gitea/api/exception.rb
CHANGED
data/lib/gitea/api.rb
CHANGED
@@ -11,10 +11,3 @@ require_relative 'api/client'
|
|
11
11
|
require_relative 'api/config'
|
12
12
|
require_relative 'api/exception'
|
13
13
|
require_relative 'api/http'
|
14
|
-
require_relative 'api/hat/repository'
|
15
|
-
require_relative 'api/hat/organization'
|
16
|
-
require_relative 'api/hat/users'
|
17
|
-
require_relative 'api/hat/admin'
|
18
|
-
require_relative 'api/hat/client'
|
19
|
-
require_relative 'api/hat/config'
|
20
|
-
require_relative 'api/hat/http'
|
data/lib/gitea/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitea-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- viletyy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -49,13 +49,6 @@ files:
|
|
49
49
|
- lib/gitea/api/client.rb
|
50
50
|
- lib/gitea/api/config.rb
|
51
51
|
- lib/gitea/api/exception.rb
|
52
|
-
- lib/gitea/api/hat/admin.rb
|
53
|
-
- lib/gitea/api/hat/client.rb
|
54
|
-
- lib/gitea/api/hat/config.rb
|
55
|
-
- lib/gitea/api/hat/http.rb
|
56
|
-
- lib/gitea/api/hat/organization.rb
|
57
|
-
- lib/gitea/api/hat/repository.rb
|
58
|
-
- lib/gitea/api/hat/users.rb
|
59
52
|
- lib/gitea/api/http.rb
|
60
53
|
- lib/gitea/api/issue.rb
|
61
54
|
- lib/gitea/api/miscellaneous.rb
|
@@ -92,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
85
|
- !ruby/object:Gem::Version
|
93
86
|
version: '0'
|
94
87
|
requirements: []
|
95
|
-
rubygems_version: 3.
|
88
|
+
rubygems_version: 3.4.10
|
96
89
|
signing_key:
|
97
90
|
specification_version: 4
|
98
91
|
summary: Gitea API 库
|
data/lib/gitea/api/hat/admin.rb
DELETED
data/lib/gitea/api/hat/client.rb
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
module Gitea
|
2
|
-
module Api
|
3
|
-
module Hat
|
4
|
-
class Client
|
5
|
-
|
6
|
-
# 构造Api client,用于操作Api数据
|
7
|
-
# @param opts [Hash] 构造client时的参数选项
|
8
|
-
# @option opts [string] domain [必填] gitea服务地址
|
9
|
-
# @option opts [string] hat_base_url [必填] api相对路径
|
10
|
-
# @option opts [string] admin_username [必填] 管理员账号
|
11
|
-
# @option opts [string] admin_password [必填] 管理员密码
|
12
|
-
# @option opts [string] username [选填] 用户账号
|
13
|
-
# @option opts [string] password [选填] 用户密码
|
14
|
-
# @option opts [string] gitea_token [选填] 用户token
|
15
|
-
def initialize(opts)
|
16
|
-
@config = Config.new(opts)
|
17
|
-
Gitea::Common::Logging.set_log_file(@config.log_filepath)
|
18
|
-
@http = Http.new(@config)
|
19
|
-
end
|
20
|
-
|
21
|
-
def config
|
22
|
-
@config
|
23
|
-
end
|
24
|
-
|
25
|
-
def config=(config)
|
26
|
-
unless config.is_a?(Gitea::Api::Hat::Config)
|
27
|
-
fail Exception, "load config failure!"
|
28
|
-
end
|
29
|
-
@config = config
|
30
|
-
@http = Http.new(config)
|
31
|
-
end
|
32
|
-
|
33
|
-
def token
|
34
|
-
@config.token
|
35
|
-
end
|
36
|
-
|
37
|
-
def token=(token)
|
38
|
-
@config.token = token
|
39
|
-
end
|
40
|
-
|
41
|
-
include Gitea::Api::Hat::Repository
|
42
|
-
include Gitea::Api::Hat::Users
|
43
|
-
include Gitea::Api::Hat::Organization
|
44
|
-
include Gitea::Api::Hat::Admin
|
45
|
-
end
|
46
|
-
end # Hat
|
47
|
-
end # Api
|
48
|
-
end # Gitea
|
data/lib/gitea/api/hat/config.rb
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
module Gitea
|
2
|
-
module Api
|
3
|
-
|
4
|
-
module Hat
|
5
|
-
class Config < Common::Struct::Base
|
6
|
-
attrs :domain, :hat_base_url, :username, :password, :token, :open_timeout, :read_timeout, :log_filepath
|
7
|
-
|
8
|
-
def initialize(opts = {})
|
9
|
-
super(opts)
|
10
|
-
|
11
|
-
valid!
|
12
|
-
normalize_domain
|
13
|
-
end
|
14
|
-
|
15
|
-
private
|
16
|
-
def valid!
|
17
|
-
if @domain.nil? || @hat_base_url.nil?
|
18
|
-
fail Exception, "@domain, @hat_base_url not permit blank."
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
def normalize_domain
|
23
|
-
uri = URI.parse(domain)
|
24
|
-
uri = URI.parse(domain)
|
25
|
-
uri = URI.parse("http://#{domain}") unless uri.scheme
|
26
|
-
|
27
|
-
if uri.scheme != 'http' and uri.scheme != 'https'
|
28
|
-
fail ClientError, "Only HTTP and HTTPS domain are accepted."
|
29
|
-
end
|
30
|
-
|
31
|
-
@domain = uri
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end # Hat
|
35
|
-
end # Api
|
36
|
-
end # Gitea
|
data/lib/gitea/api/hat/http.rb
DELETED
@@ -1,132 +0,0 @@
|
|
1
|
-
require 'base64'
|
2
|
-
require 'json'
|
3
|
-
|
4
|
-
module Gitea
|
5
|
-
module Api
|
6
|
-
module Hat
|
7
|
-
class Http
|
8
|
-
DEFAULT_CONTENT_TYPE = 'application/json'
|
9
|
-
TOKEN_HEADER = 'Authorization'
|
10
|
-
OPEN_TIMEOUT = 10
|
11
|
-
READ_TIMEOUT = 120
|
12
|
-
|
13
|
-
|
14
|
-
def initialize(config)
|
15
|
-
@config = config
|
16
|
-
end
|
17
|
-
|
18
|
-
include Gitea::Common::Logging
|
19
|
-
|
20
|
-
def get_request_url(api_url)
|
21
|
-
url = @config.domain.dup
|
22
|
-
url.query = nil
|
23
|
-
url.fragment = nil
|
24
|
-
[url.to_s, @config.hat_base_url, api_url].join('')
|
25
|
-
end
|
26
|
-
|
27
|
-
def get(api_url = '', http_options = {}, &block)
|
28
|
-
do_request('GET', api_url, http_options, &block)
|
29
|
-
end
|
30
|
-
|
31
|
-
def put(api_url = '', http_options = {}, &block)
|
32
|
-
do_request('PUT', api_url, http_options, &block)
|
33
|
-
end
|
34
|
-
|
35
|
-
def patch(api_url = '', http_options = {}, &block)
|
36
|
-
do_request('PATCH', api_url, http_options, &block)
|
37
|
-
end
|
38
|
-
|
39
|
-
def post(api_url = '', http_options = {}, &block)
|
40
|
-
do_request('POST', api_url, http_options, &block)
|
41
|
-
end
|
42
|
-
|
43
|
-
def delete(api_url = '', http_options = {}, &block)
|
44
|
-
do_request('DELETE', api_url, http_options, &block)
|
45
|
-
end
|
46
|
-
|
47
|
-
def head(api_url = '', http_options = {}, &block)
|
48
|
-
do_request('HEAD', api_url, http_options, &block)
|
49
|
-
end
|
50
|
-
|
51
|
-
def options(api_url = '', http_options = {}, &block)
|
52
|
-
do_request('OPTIONS', api_url, http_options, &block)
|
53
|
-
end
|
54
|
-
|
55
|
-
private
|
56
|
-
# Do Http request
|
57
|
-
def do_request(verb, api_url, http_options = {}, &block)
|
58
|
-
|
59
|
-
headers = http_options[:headers] || {}
|
60
|
-
headers['user-agent'] = get_user_agent
|
61
|
-
headers['date'] = Time.now.httpdate
|
62
|
-
headers['content-type'] ||= DEFAULT_CONTENT_TYPE
|
63
|
-
|
64
|
-
if @config.username and @config.password
|
65
|
-
headers[TOKEN_HEADER] = 'Basic ' + Base64::encode64(@config.username + ":" + @config.password)
|
66
|
-
end
|
67
|
-
|
68
|
-
headers[:params] = http_options[:query] || {}
|
69
|
-
headers[:params].merge!({access_token: @config.token}) if @config.token
|
70
|
-
logger.info("Gitea Hat Client Begin a Request!...")
|
71
|
-
logger.info("Send HTTP request, verb: #{verb}, http_options: #{http_options}")
|
72
|
-
logger.info("Relative Url: #{api_url}")
|
73
|
-
logger.info("Headers: #{headers}")
|
74
|
-
request = RestClient::Request.new(
|
75
|
-
:method => verb,
|
76
|
-
:url => get_request_url(api_url),
|
77
|
-
:headers => headers,
|
78
|
-
:payload => http_options[:body],
|
79
|
-
:open_timeout => @config.open_timeout || OPEN_TIMEOUT,
|
80
|
-
:read_timeout => @config.read_timeout || READ_TIMEOUT
|
81
|
-
)
|
82
|
-
|
83
|
-
|
84
|
-
response = request.execute do |resp, &blk|
|
85
|
-
if resp.code >= 300
|
86
|
-
e = Gitea::Api::ServerError.new(resp)
|
87
|
-
logger.error(e.to_s)
|
88
|
-
raise e
|
89
|
-
else
|
90
|
-
resp.return!(&blk)
|
91
|
-
end
|
92
|
-
end
|
93
|
-
|
94
|
-
# If streaming read_body is used, we need to create the
|
95
|
-
# RestClient::Response ourselves
|
96
|
-
unless response.is_a?(RestClient::Response)
|
97
|
-
if response.code.to_i >= 300
|
98
|
-
body = response.body
|
99
|
-
if RestClient::version < '2.1.0'
|
100
|
-
body = RestClient::Request.decode(response['content-encoding'], response.body)
|
101
|
-
end
|
102
|
-
response = RestClient::Response.create(body, response, request)
|
103
|
-
e = Gitea::Api::ServerError.new(response)
|
104
|
-
logger.error(e.to_s)
|
105
|
-
raise e
|
106
|
-
end
|
107
|
-
response = RestClient::Response.create(nil, response, request)
|
108
|
-
response.return!
|
109
|
-
end
|
110
|
-
|
111
|
-
begin
|
112
|
-
if response.headers.has_key?(:x_total) || response.headers.has_key?(:x_total_count)
|
113
|
-
return {data: JSON.parse(response), total_data: response.headers[:x_total_count]}
|
114
|
-
else
|
115
|
-
return JSON.parse(response)
|
116
|
-
end
|
117
|
-
rescue => e
|
118
|
-
logger.error(e.to_s)
|
119
|
-
return {}
|
120
|
-
end
|
121
|
-
|
122
|
-
logger.info("Gitea Hat Client Success End a Request!...")
|
123
|
-
end
|
124
|
-
|
125
|
-
def get_user_agent
|
126
|
-
"gitea-client/#{VERSION}"
|
127
|
-
end
|
128
|
-
|
129
|
-
end
|
130
|
-
end # Hat
|
131
|
-
end # Common
|
132
|
-
end # Gitea
|
@@ -1,25 +0,0 @@
|
|
1
|
-
module Gitea
|
2
|
-
module Api
|
3
|
-
module Hat
|
4
|
-
module Organization
|
5
|
-
|
6
|
-
def patch_orgs_by_org(org, opt = {})
|
7
|
-
@http.patch("/orgs/#{org}", opt)
|
8
|
-
end
|
9
|
-
|
10
|
-
def post_orgs(opt = {})
|
11
|
-
@http.post("/orgs", opt)
|
12
|
-
end
|
13
|
-
|
14
|
-
def put_teams_repos_by_id_org(id, org, opt = {})
|
15
|
-
@http.put("/teams/#{id}/repos/#{org}", opt)
|
16
|
-
end
|
17
|
-
|
18
|
-
def delete_teams_repos_by_id_org(id, org, opt = {})
|
19
|
-
@http.delete("/teams/#{id}/repos/#{org}", opt)
|
20
|
-
end
|
21
|
-
|
22
|
-
end # Organization
|
23
|
-
end # Hat
|
24
|
-
end # Api
|
25
|
-
end # Gitea
|
@@ -1,164 +0,0 @@
|
|
1
|
-
module Gitea
|
2
|
-
module Api
|
3
|
-
module Hat
|
4
|
-
module Repository
|
5
|
-
def get_repos_contents_by_owner_repo(owner, repo, opt = {})
|
6
|
-
@http.get("/repos/#{owner}/#{repo}/contents", opt)
|
7
|
-
end
|
8
|
-
|
9
|
-
def get_repos_contents_by_owner_repo_filepath(owner, repo, filepath, opt = {})
|
10
|
-
@http.get("/repos/#{owner}/#{repo}/contents/#{filepath}", opt)
|
11
|
-
end
|
12
|
-
|
13
|
-
def get_repos_find_by_owner_repo(owner, repo, opt = {})
|
14
|
-
@http.get("/repos/#{owner}/#{repo}/find", opt)
|
15
|
-
end
|
16
|
-
|
17
|
-
def get_repos_git_commits_by_owner_repo_sha(owner, repo, sha, opt = {})
|
18
|
-
@http.get("/repos/#{owner}/#{repo}/git/commits/#{sha}", opt)
|
19
|
-
end
|
20
|
-
|
21
|
-
def get_repos_commits_diff_by_owner_repo_sha(owner, repo, sha, opt = {})
|
22
|
-
@http.get("/repos/#{owner}/#{repo}/commits/#{sha}/diff", opt)
|
23
|
-
end
|
24
|
-
|
25
|
-
def post_repos_hooks_by_owner_repo(owner, repo, opt = {})
|
26
|
-
@http.post("/repos/#{owner}/#{repo}/hooks", opt)
|
27
|
-
end
|
28
|
-
|
29
|
-
def patch_repos_hooks_by_owner_repo_id(owner, repo, id, opt = {})
|
30
|
-
@http.patch("/repos/#{owner}/#{repo}/hooks/#{id}", opt)
|
31
|
-
end
|
32
|
-
|
33
|
-
def get_repos_hooks_hooktasks_by_owner_repo_id(owner, repo, id, opt = {})
|
34
|
-
@http.get("/repos/#{owner}/#{repo}/hooks/#{id}/hooktasks", opt)
|
35
|
-
end
|
36
|
-
|
37
|
-
def get_repos_releases_latest_by_owner_repo(owner, repo, opt = {})
|
38
|
-
@http.get("/repos/#{owner}/#{repo}/releases/latest", opt)
|
39
|
-
end
|
40
|
-
|
41
|
-
def get_repos_releases_by_owner_repo(owner, repo, opt = {})
|
42
|
-
@http.get("/repos/#{owner}/#{repo}/releases", opt)
|
43
|
-
end
|
44
|
-
|
45
|
-
def get_repos_releases_by_owner_repo_id(owner, repo, opt = {})
|
46
|
-
@http.get("/repos/#{owner}/#{repo}/releases/#{id}", opt)
|
47
|
-
end
|
48
|
-
|
49
|
-
def post_repos_releases_by_owner_repo(owner, repo, opt = {})
|
50
|
-
@http.post("/repos/#{owner}/#{repo}/releases", opt)
|
51
|
-
end
|
52
|
-
|
53
|
-
def patch_repos_releases_by_owner_repo_id(owner, repo, id, opt = {})
|
54
|
-
@http.patch("/repos/#{owner}/#{repo}/releases/#{id}", opt)
|
55
|
-
end
|
56
|
-
|
57
|
-
def get_repos_branch_name_set_by_owner_repo(owner, repo, opt = {})
|
58
|
-
@http.get("/repos/#{owner}/#{repo}/branch_name_set", opt)
|
59
|
-
end
|
60
|
-
|
61
|
-
def get_repos_branches_by_owner_repo(owner, repo, opt={})
|
62
|
-
@http.get("/repos/#{owner}/#{repo}/branches", opt)
|
63
|
-
end
|
64
|
-
|
65
|
-
def get_repos_branches_branches_slice_by_owner_repo(owner, repo, opt = {})
|
66
|
-
@http.get("/repos/#{owner}/#{repo}/branches/branches_slice", opt)
|
67
|
-
end
|
68
|
-
|
69
|
-
def post_repos_branches_restore_by_owner_repo(owner, repo, opt = {})
|
70
|
-
@http.post("/repos/#{owner}/#{repo}/branches/restore", opt)
|
71
|
-
end
|
72
|
-
|
73
|
-
def get_repos_tag_name_set_by_owner_repo(owner, repo, opt = {})
|
74
|
-
@http.get("/repos/#{owner}/#{repo}/tag_name_set", opt)
|
75
|
-
end
|
76
|
-
|
77
|
-
def get_repos_tags_by_owner_repo(owner, repo, opt = {})
|
78
|
-
@http.get("/repos/#{owner}/#{repo}/tags", opt)
|
79
|
-
end
|
80
|
-
|
81
|
-
def get_repos_tags_by_owner_repo_tag(owner, repo, tag, opt = {})
|
82
|
-
@http.get("/repos/#{owner}/#{repo}/tags/#{tag}", opt)
|
83
|
-
end
|
84
|
-
|
85
|
-
def get_repos_branch_tag_count_by_owner_repo(owner, repo, opt = {})
|
86
|
-
@http.get("/repos/#{owner}/#{repo}/branch_tag_count", opt)
|
87
|
-
end
|
88
|
-
|
89
|
-
def get_repos_readme_by_owner_repo(owner, repo, opt = {})
|
90
|
-
@http.get("/repos/#{owner}/#{repo}/readme", opt)
|
91
|
-
end
|
92
|
-
|
93
|
-
def get_repos_readme_by_owner_repo_filepath(owner, repo, filepath, opt = {})
|
94
|
-
@http.get("/repos/#{owner}/#{repo}/readme/#{filepath}", opt)
|
95
|
-
end
|
96
|
-
|
97
|
-
def get_repos_commits_slice_by_owner_repo(owner, repo, opt = {})
|
98
|
-
@http.get("/repos/#{owner}/#{repo}/commits_slice", opt)
|
99
|
-
end
|
100
|
-
|
101
|
-
def get_repos_recent_commits_by_owner_repo(owner, repo, opt = {})
|
102
|
-
@http.get("/repos/#{owner}/#{repo}/recent_commits", opt)
|
103
|
-
end
|
104
|
-
|
105
|
-
def get_repos_contributors_by_owner_repo(owner, repo, opt = {})
|
106
|
-
@http.get("/repos/#{owner}/#{repo}/contributors", opt)
|
107
|
-
end
|
108
|
-
|
109
|
-
def get_repos_contributors_stat_by_owner_repo(owner, repo, opt = {})
|
110
|
-
@http.get("/repos/#{owner}/#{repo}/contributors/stat", opt)
|
111
|
-
end
|
112
|
-
|
113
|
-
def get_repos_code_stats_by_owner_repo(owner, repo, opt = {})
|
114
|
-
@http.get("/repos/#{owner}/#{repo}/code_stats", opt)
|
115
|
-
end
|
116
|
-
|
117
|
-
def get_repos_count_by_owner_repo(owner, repo, opt = {})
|
118
|
-
@http.get("/repos/#{owner}/#{repo}/count", opt)
|
119
|
-
end
|
120
|
-
|
121
|
-
def get_repos_file_commits_by_owner_repo_filepath(owner, repo, filepath, opt = {})
|
122
|
-
@http.get("/repos/#{owner}/#{repo}/file_commits/#{filepath}", opt)
|
123
|
-
end
|
124
|
-
|
125
|
-
def get_repos_blame_by_owner_repo(owner, repo, opt = {})
|
126
|
-
@http.get("/repos/#{owner}/#{repo}/blame", opt)
|
127
|
-
end
|
128
|
-
|
129
|
-
def get_repos_compare_by_owner_repo_baseref_headref(owner, repo, baseRef, headRef, opt = {})
|
130
|
-
@http.get("/repos/#{owner}/#{repo}/compare/#{baseRef}...#{headRef}", opt)
|
131
|
-
end
|
132
|
-
|
133
|
-
def post_repos_transfer_by_owner_repo(owner, repo, opt = {})
|
134
|
-
@http.post("/repos/#{owner}/#{repo}/transfer", opt)
|
135
|
-
end
|
136
|
-
|
137
|
-
def get_repos_pulls_by_owner_repo_index(owner, repo, index, opt = {})
|
138
|
-
@http.get("/repos/#{owner}/#{repo}/pulls/#{index}", opt)
|
139
|
-
end
|
140
|
-
|
141
|
-
def get_repos_pulls_commits_by_owner_repo_index(owner, repo, index, opt = {})
|
142
|
-
@http.get("/repos/#{owner}/#{repo}/pulls/#{index}/commits", opt)
|
143
|
-
end
|
144
|
-
|
145
|
-
def get_repos_pulls_files_by_owner_repo_index(owner, repo, index, opt = {})
|
146
|
-
@http.get("/repos/#{owner}/#{repo}/pulls/#{index}/files", opt)
|
147
|
-
end
|
148
|
-
|
149
|
-
def post_repos_contents_batch_by_owner_repo(owner, repo, opt = {})
|
150
|
-
@http.post("/repos/#{owner}/#{repo}/contents/batch", opt)
|
151
|
-
end
|
152
|
-
|
153
|
-
def get_repos_pulls_versions_by_owner_repo_index(owner, repo, index, opt = {})
|
154
|
-
@http.get("/repos/#{owner}/#{repo}/pulls/#{index}/versions", opt)
|
155
|
-
end
|
156
|
-
|
157
|
-
def get_repos_pulls_versions_diff_by_owner_repo_index_id(owner, repo, index, versionID, opt = {})
|
158
|
-
@http.get("/repos/#{owner}/#{repo}/pulls/#{index}/versions/#{versionID}/diff", opt)
|
159
|
-
end
|
160
|
-
|
161
|
-
end # Repository
|
162
|
-
end # Hat
|
163
|
-
end # Api
|
164
|
-
end # Gitea
|
data/lib/gitea/api/hat/users.rb
DELETED