forked from Trustie/forgeplus
Merge remote-tracking branch 'origin/trustie_server' into trustie_server
This commit is contained in:
commit
cc2b38a760
|
|
@ -51,7 +51,7 @@ class Api::V1::Projects::Actions::RunsController < Api::V1::Projects::Actions::B
|
|||
domain = GiteaService.gitea_config[:domain]
|
||||
api_url = GiteaService.gitea_config[:hat_base_url]
|
||||
|
||||
url = "/repos/#{@owner.login}/#{@repository.identifier}/actions/runs/#{CGI.escape(params[:run_id])}/jobs/#{CGI.escape(params[:job])}/logs"
|
||||
url = "/repos/#{@owner.login}/#{@repository.identifier}/actions/runs/#{URI.escape(params[:run_id])}/jobs/#{URI.escape(params[:job])}/logs"
|
||||
file_path = [domain, api_url, url].join
|
||||
file_path = [file_path, "access_token=#{@owner&.gitea_token}"].join("?")
|
||||
|
||||
|
|
|
|||
|
|
@ -32,15 +32,35 @@ class Api::V1::Projects::BranchesController < Api::V1::BaseController
|
|||
@result_object = Api::V1::Projects::Branches::AllListService.call(@project, current_user&.gitea_token)
|
||||
end
|
||||
|
||||
before_action :require_operate_above, only: [:create, :destroy, :restore]
|
||||
before_action :require_operate_above, only: [:create, :delete, :destroy, :restore]
|
||||
|
||||
def create
|
||||
@result_object = Api::V1::Projects::Branches::CreateService.call(@project, branch_params, current_user&.gitea_token)
|
||||
@project.update_column(:updated_on, Time.now)
|
||||
end
|
||||
|
||||
def delete
|
||||
@result_object = Api::V1::Projects::Branches::DeleteService.call(@project, params[:branch_name], current_user&.gitea_token)
|
||||
if @result_object
|
||||
@project.update_column(:updated_on, Time.now)
|
||||
# 有开启的pr需要一同关闭
|
||||
# 1、删除本仓库中存在未关闭的pr,即本仓库分支1->分支2
|
||||
# 2、如果是fork仓库,考虑删除主仓库中存在未关闭的pr,即本仓库:分支1->主:分支2,同时分两种删除:1删除本仓库分支1,2删除主仓库分支2
|
||||
close_pull_requests_by(@project, params[:branch_name])
|
||||
if @project.forked_from_project_id.present?
|
||||
# fork项目中删除分支
|
||||
close_pull_requests_by(@project.fork_project, params[:branch_name])
|
||||
end
|
||||
|
||||
return render_ok
|
||||
else
|
||||
return render_error('删除分支失败!')
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@result_object = Api::V1::Projects::Branches::DeleteService.call(@project, params[:name], current_user&.gitea_token)
|
||||
@name = params[:name].include?('.json') ? params[:name][0..-6] : params[:name]
|
||||
@result_object = Api::V1::Projects::Branches::DeleteService.call(@project, Base64.decode64(@name), current_user&.gitea_token)
|
||||
if @result_object
|
||||
@project.update_column(:updated_on, Time.now)
|
||||
# 有开启的pr需要一同关闭
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ class Api::V1::Projects::CommitsController < Api::V1::BaseController
|
|||
|
||||
def files
|
||||
if params[:filepath].present?
|
||||
@result_object = $gitea_hat_client.get_repos_commits_files_by_owner_repo_sha_filepath(@project&.owner.login, @project&.identifier, params[:sha], CGI.escape(params[:filepath]), {query: {token: current_user&.gitea_token}})
|
||||
@result_object = $gitea_hat_client.get_repos_commits_files_by_owner_repo_sha_filepath(@project&.owner.login, @project&.identifier, params[:sha], URI.escape(params[:filepath]), {query: {token: current_user&.gitea_token}})
|
||||
else
|
||||
@result_object = $gitea_hat_client.get_repos_commits_files_by_owner_repo_sha(@project&.owner.login, @project&.identifier, params[:sha], {query: {token: current_user&.gitea_token, page: page, limit: limit}})
|
||||
end
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class Api::V1::Projects::Pulls::PullsController < Api::V1::BaseController
|
|||
|
||||
def files
|
||||
if params[:filepath].present?
|
||||
@result_object = $gitea_hat_client.get_repos_pulls_files_by_owner_repo_index_filepath(@project&.owner.login, @project&.identifier, @pull_request.gitea_number, CGI.escape(params[:filepath]), {query: {token: current_user&.gitea_token}})
|
||||
@result_object = $gitea_hat_client.get_repos_pulls_files_by_owner_repo_index_filepath(@project&.owner.login, @project&.identifier, @pull_request.gitea_number, URI.escape(params[:filepath]), {query: {token: current_user&.gitea_token}})
|
||||
else
|
||||
@result_object = $gitea_hat_client.get_repos_pulls_files_by_owner_repo_index(@project&.owner.login, @project&.identifier, @pull_request.gitea_number, {query: {isNew: "true",token: current_user&.gitea_token, page: page, limit: limit}})
|
||||
end
|
||||
|
|
|
|||
|
|
@ -7,17 +7,41 @@ class Api::V1::Projects::TagsController < Api::V1::BaseController
|
|||
end
|
||||
|
||||
def show
|
||||
@result_object = Api::V1::Projects::Tags::GetService.call(@project, params[:name], current_user&.gitea_token)
|
||||
@name = params[:name].include?('.json') ? params[:name][0..-6] : params[:name]
|
||||
@result_object = Api::V1::Projects::Tags::GetService.call(@project, Base64.decode64(@name), current_user&.gitea_token)
|
||||
end
|
||||
|
||||
before_action :require_operate_above, only: [:destroy]
|
||||
before_action :require_operate_above, only: [:create, :delete, :destroy]
|
||||
|
||||
def destroy
|
||||
@result_object = Api::V1::Projects::Tags::DeleteService.call(@project, params[:name], current_user&.gitea_token)
|
||||
def create
|
||||
@result_object = Api::V1::Projects::Tags::CreateService.call(@project, tag_params, current_user&.gitea_token)
|
||||
Rails.logger.info "create tag result: #{@result_object}"
|
||||
@project.update_column(:updated_on, Time.now)
|
||||
end
|
||||
|
||||
def delete
|
||||
@result_object = Api::V1::Projects::Tags::DeleteService.call(@project, params[:tag_name], current_user&.gitea_token)
|
||||
if @result_object
|
||||
return render_ok
|
||||
else
|
||||
return render_error('删除标签失败!')
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@name = params[:name].include?('.json') ? params[:name][0..-6] : params[:name]
|
||||
@result_object = Api::V1::Projects::Tags::DeleteService.call(@project, Base64.decode64(@name), current_user&.gitea_token)
|
||||
if @result_object
|
||||
return render_ok
|
||||
else
|
||||
return render_error('删除标签失败!')
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def tag_params
|
||||
params.require(:tag).permit(:tag_name, :target, :message)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
@ -94,6 +94,7 @@ class PullRequestsController < ApplicationController
|
|||
@fork_project_user_name = @pull_request&.fork_project&.owner.try(:show_real_name)
|
||||
@fork_project_user = @pull_request&.fork_project&.owner.try(:login)
|
||||
@fork_project_identifier = @pull_request&.fork_project&.repository.try(:identifier)
|
||||
@gitea_pull = Gitea::PullRequest::GetService.call(@owner.login, @repository.identifier, @pull_request.gitea_number, @owner&.gitea_token)
|
||||
end
|
||||
|
||||
def update
|
||||
|
|
@ -146,14 +147,14 @@ class PullRequestsController < ApplicationController
|
|||
@pull_request.gitea_number, @requests_params, current_user.gitea_token)
|
||||
|
||||
if gitea_pull[:status] === :success
|
||||
if params[:issue_tag_ids].present?
|
||||
#if params[:issue_tag_ids].present?
|
||||
#if params[:issue_tag_ids].is_a?(Array) && params[:issue_tag_ids].size > 1
|
||||
# return normal_status(-1, "最多只能创建一个标记。")
|
||||
#elsif params[:issue_tag_ids].is_a?(Array) && params[:issue_tag_ids].size == 1
|
||||
if params[:issue_tag_ids].is_a?(Array) && params[:issue_tag_ids].present?
|
||||
new_issue_tag_ids = params[:issue_tag_ids]
|
||||
now_issue_tag_ids = @issue.issue_tags.pluck(:id)
|
||||
if !(now_issue_tag_ids & new_issue_tag_ids).empty? || !(now_issue_tag_ids.empty? && new_issue_tag_ids.empty?)
|
||||
if params[:issue_tag_ids].is_a?(Array) #&& params[:issue_tag_ids].present?
|
||||
new_issue_tag_ids = params[:issue_tag_ids].sort!
|
||||
now_issue_tag_ids = @issue.issue_tags.pluck(:id).sort!
|
||||
if (!(now_issue_tag_ids & new_issue_tag_ids).empty? || !(now_issue_tag_ids.empty? && new_issue_tag_ids.empty?)) && new_issue_tag_ids != now_issue_tag_ids
|
||||
journal = @issue.journals.create!({user_id: current_user.id, operate_by: 'Issue'})
|
||||
journal.journal_details.create!({property: "issue_tag", prop_key: "#{new_issue_tag_ids.size}", old_value: now_issue_tag_ids.join(","), value: new_issue_tag_ids.join(",")})
|
||||
end
|
||||
|
|
@ -164,18 +165,22 @@ class PullRequestsController < ApplicationController
|
|||
else
|
||||
return normal_status(-1, "请输入正确的标记。")
|
||||
end
|
||||
end
|
||||
if params[:attached_issue_ids].present?
|
||||
if params[:attached_issue_ids].is_a?(Array) && params[:attached_issue_ids].size > 1
|
||||
return normal_status(-1, "最多只能关联一个疑修。")
|
||||
elsif params[:attached_issue_ids].is_a?(Array) && params[:attached_issue_ids].size == 1
|
||||
@pull_request&.pull_attached_issues&.destroy_all
|
||||
params[:attached_issue_ids].each do |issue|
|
||||
PullAttachedIssue.create!(issue_id: issue, pull_request_id: @pull_request.id)
|
||||
end
|
||||
else
|
||||
return normal_status(-1, "请输入正确的疑修。")
|
||||
#end
|
||||
if params[:attached_issue_ids].is_a?(Array) && params[:attached_issue_ids].size > 1
|
||||
return normal_status(-1, "最多只能关联一个疑修。")
|
||||
elsif params[:attached_issue_ids].is_a?(Array) #&& params[:attached_issue_ids].size == 1
|
||||
new_attached_issue_ids = params[:attached_issue_ids].sort!
|
||||
now_attached_issue_ids = @pull_request.attached_issues.pluck(:id).sort!
|
||||
if (!(now_attached_issue_ids & new_attached_issue_ids).empty? || !(now_attached_issue_ids.empty? && new_attached_issue_ids.empty?)) && new_attached_issue_ids != now_attached_issue_ids
|
||||
journal = @issue.journals.create!({user_id: current_user.id, operate_by: 'Issue'})
|
||||
journal.journal_details.create!({property: "attached_issue", prop_key: "#{new_attached_issue_ids.size}", old_value: now_attached_issue_ids.join(","), value: new_attached_issue_ids.join(",")})
|
||||
end
|
||||
@pull_request&.pull_attached_issues&.destroy_all
|
||||
params[:attached_issue_ids].each do |issue|
|
||||
PullAttachedIssue.create!(issue_id: issue, pull_request_id: @pull_request.id)
|
||||
end
|
||||
else
|
||||
return normal_status(-1, "请输入正确的疑修。")
|
||||
end
|
||||
if params[:status_id].to_i == 5
|
||||
@issue.issue_times.update_all(end_time: Time.now)
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ class RepositoriesController < ApplicationController
|
|||
end
|
||||
|
||||
def sub_entries
|
||||
file_path_uri = URI.parse(URI.encode(params[:filepath].to_s.strip))
|
||||
file_path_uri = URI.parse(URI.encode(params[:filepath].to_s))
|
||||
tip_exception('不可访问') if params[:filepath].to_s.include?("chinese_dictionary.txt")
|
||||
if @project.educoder?
|
||||
if params[:type] === 'file'
|
||||
|
|
@ -294,7 +294,7 @@ class RepositoriesController < ApplicationController
|
|||
def archive
|
||||
domain = GiteaService.gitea_config[:domain]
|
||||
api_url = GiteaService.gitea_config[:base_url]
|
||||
archive_url = "/repos/#{@owner.login}/#{@repository.identifier}/archive/#{Addressable::URI.escape(params[:archive])}"
|
||||
archive_url = "/repos/#{@owner.login}/#{@repository.identifier}/archive/#{URI.encode(params[:archive])}"
|
||||
|
||||
file_path = [domain, api_url, archive_url].join
|
||||
file_path = [file_path, "access_token=#{@owner&.gitea_token}"].join("?")
|
||||
|
|
@ -337,7 +337,7 @@ class RepositoriesController < ApplicationController
|
|||
# TODO 获取最新commit信息
|
||||
def project_commits
|
||||
if params[:filepath].present?
|
||||
file_path_uri = URI.parse(URI.encode(params[:filepath].to_s.strip))
|
||||
file_path_uri = URI.parse(URI.encode(params[:filepath].to_s))
|
||||
Gitea::Repository::Commits::FileListService.new(@project.owner.login, @project.identifier, file_path_uri,
|
||||
sha: get_ref, page: 1, limit: 1, token: @project&.owner&.gitea_token).call
|
||||
else
|
||||
|
|
|
|||
|
|
@ -553,6 +553,16 @@ class Journal < ApplicationRecord
|
|||
content += "将标记由<b>#{old_value}</b>更改为<b>#{new_value}</b>"
|
||||
end
|
||||
return content
|
||||
when 'attached_issue'
|
||||
old_value = Issue.where(id: detail.old_value.split(",")).pluck(:subject).join("、")
|
||||
new_value = Issue.where(id: detail.value.split(",")).pluck(:subject).join("、")
|
||||
if old_value.nil? || old_value.blank?
|
||||
content += "添加了<b>#{new_value}</b>关联疑修"
|
||||
else
|
||||
new_value = "无" if new_value.blank?
|
||||
content += "将关联疑修由<b>#{old_value}</b>更改为<b>#{new_value}</b>"
|
||||
end
|
||||
return content
|
||||
when 'assigner'
|
||||
old_value = User.where(id: detail.old_value.split(",")).map{|u| u.real_name}.join("、")
|
||||
new_value = User.where(id: detail.value.split(",")).map{|u| u.real_name}.join("、")
|
||||
|
|
|
|||
|
|
@ -39,8 +39,15 @@ class Api::V1::Projects::Branches::CreateService < ApplicationService
|
|||
end
|
||||
|
||||
def excute_data_to_gitea
|
||||
@gitea_data = $gitea_client.post_repos_branches_by_owner_repo(owner, repo, {body: request_body.to_json, query: request_params}) rescue nil
|
||||
raise Error, '创建分支失败!' unless @gitea_data.is_a?(Hash)
|
||||
begin
|
||||
@gitea_data = $gitea_client.post_repos_branches_by_owner_repo(owner, repo, {body: request_body.to_json, query: request_params})
|
||||
rescue Gitea::Api::ServerError => e
|
||||
if e.http_code == 409 && e.to_s.include?("The branch with the same tag already exists")
|
||||
raise Error, '创建分支失败,分支名称与标签名称不能相同!'
|
||||
else
|
||||
raise Error, '创建分支失败!'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def check_branch_exist
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class Api::V1::Projects::Branches::DeleteService < ApplicationService
|
|||
|
||||
def excute_data_to_gitea
|
||||
begin
|
||||
@gitea_data = $gitea_client.delete_repos_branches_by_owner_repo_branch(owner, repo, CGI.escape(branch_name), {query: request_params})
|
||||
@gitea_data = $gitea_client.delete_repos_branches_by_owner_repo_branch(owner, repo, URI.encode(branch_name), {query: request_params})
|
||||
rescue => e
|
||||
raise Error, '保护分支无法删除!' if e.to_s.include?("branch protected")
|
||||
raise Error, '删除分支失败!'
|
||||
|
|
|
|||
|
|
@ -0,0 +1,53 @@
|
|||
class Api::V1::Projects::Tags::CreateService < ApplicationService
|
||||
include ActiveModel::Model
|
||||
|
||||
attr_accessor :project, :token, :owner, :repo, :tag_name, :target, :message
|
||||
attr_accessor :gitea_data
|
||||
|
||||
validates :tag_name, :target, :message, presence: true
|
||||
|
||||
def initialize(project, params, token=nil)
|
||||
@project = project
|
||||
@owner = project&.owner.login
|
||||
@repo = project&.identifier
|
||||
@tag_name = params[:tag_name]
|
||||
@target = params[:target]
|
||||
@message = params[:message]
|
||||
@token = token
|
||||
end
|
||||
|
||||
def call
|
||||
raise Error, errors.full_messages.join(",") unless valid?
|
||||
|
||||
check_tag_exist
|
||||
excute_data_to_gitea
|
||||
|
||||
gitea_data
|
||||
end
|
||||
|
||||
private
|
||||
def request_params
|
||||
{
|
||||
access_token: token
|
||||
}
|
||||
end
|
||||
|
||||
def request_body
|
||||
{
|
||||
tag_name: tag_name,
|
||||
target: target,
|
||||
message: message,
|
||||
}
|
||||
end
|
||||
|
||||
def excute_data_to_gitea
|
||||
@gitea_data = $gitea_client.post_repos_tags_by_owner_repo(owner, repo, {body: request_body.to_json, query: request_params}) rescue nil
|
||||
raise Error, '创建标签失败!' unless @gitea_data.is_a?(Hash)
|
||||
end
|
||||
|
||||
def check_tag_exist
|
||||
result = $gitea_hat_client.get_repos_tag_name_set_by_owner_repo(owner, repo, {query: request_params}) rescue nil
|
||||
raise Error, '查询标签名称失败!' unless result.is_a?(Array)
|
||||
raise Error, '新标签已存在!' if result.include?(@tag_name)
|
||||
end
|
||||
end
|
||||
|
|
@ -32,7 +32,7 @@ class Api::V1::Projects::Tags::DeleteService < ApplicationService
|
|||
|
||||
def excute_data_to_gitea
|
||||
begin
|
||||
@gitea_data = $gitea_client.delete_repos_tags_by_owner_repo_tag(owner, repo, CGI.escape(tag_name), {query: request_params})
|
||||
@gitea_data = $gitea_client.delete_repos_tags_by_owner_repo_tag(owner, repo, URI.encode(tag_name), {query: request_params})
|
||||
rescue => e
|
||||
raise Error, '请先删除发行版!' if e.to_s.include?("409")
|
||||
raise Error, '删除标签失败!'
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ class Issues::ListQueryService < ApplicationService
|
|||
issues = issues.where(fixed_version_id: params[:fixed_version_id]) if params[:fixed_version_id].present? && params[:fixed_version_id].to_s != "all"
|
||||
issues = issues.where(done_ratio: params[:done_ratio].to_i) if params[:done_ratio].present? && params[:done_ratio].to_s != "all"
|
||||
issues = issues.where(issue_type: params[:issue_type].to_s) if params[:issue_type].present? && params[:issue_type].to_s != "all"
|
||||
issues = issues.joins(:issue_tags).where(issue_tags: {id: params[:issue_tag_id].to_i}) if params[:issue_tag_id].present? && params[:issue_tag_id].to_s != "all"
|
||||
issues = issues.joins(:issue_tags).where(issue_tags: {id: params[:issue_tag_id].split(",")}) if params[:issue_tag_id].present? && params[:issue_tag_id].to_s != "all"
|
||||
|
||||
issues.reorder("issues.#{order_name} #{order_type}")
|
||||
end
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
if tag.present? && tag.is_a?(Hash)
|
||||
json.name tag["name"]
|
||||
json.message tag["message"]
|
||||
json.id tag["id"]
|
||||
json.zipball_url render_zip_url(@owner, @repository, tag['name'])
|
||||
json.tarball_url render_tar_url(@owner, @repository, tag['name'])
|
||||
json.commit do
|
||||
json.sha tag['commit']['sha']
|
||||
json.time_ago time_from_now(tag['commit']['created'].to_time)
|
||||
json.created_at_unix tag['commit']['created'].to_time.to_i
|
||||
end
|
||||
else
|
||||
json.name tag.name
|
||||
end
|
||||
|
|
@ -0,0 +1 @@
|
|||
json.partial! "api/v1/projects/tags/simple_gitea_detail", tag: @result_object
|
||||
|
|
@ -1 +1 @@
|
|||
json.partial! "api/v1/projects/tags/simple_gitea_index_detail", tag: @result_object
|
||||
json.partial! "api/v1/projects/tags/simple_gitea_detail", tag: @result_object
|
||||
|
|
@ -13,6 +13,9 @@ json.commits_count @pull_request.commits_count
|
|||
json.files_count @pull_request.files_count
|
||||
json.comments_count @pull_request.comments_count
|
||||
json.reviewers @pull_request.reviewers.pluck(:login)
|
||||
json.mergeable @gitea_pull["mergeable"]
|
||||
json.state @gitea_pull["state"]
|
||||
json.pull_request_staus @pull_request.status == 1 ? "merged" : (@pull_request.status == 2 ? "closed" : "open")
|
||||
json.attached_issues @pull_request.attached_issues.each do |issue|
|
||||
json.(issue, :id, :subject, :project_issues_index)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ json.project_identifier @project.identifier
|
|||
json.pr_time time_from_now(@pull_request.updated_at)
|
||||
json.commits_count @gitea_pull["commit_num"]
|
||||
json.files_count @gitea_pull["changed_files"]
|
||||
json.comments_count @issue.journals.parent_journals.size
|
||||
json.comments_total_count @issue.get_journals_size
|
||||
json.comments_count @issue.journals.where.not(notes: nil).size
|
||||
json.comments_total_count @issue.journals.where.not(notes: nil).size
|
||||
json.can_reopen @pull_request.closed?
|
||||
json.assign_user do
|
||||
json.partial! 'users/user_simple', user: @issue_assign_to
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
json.name @file['content']['name']
|
||||
json.sha @file['content']['sha']
|
||||
json.size @file['content']['size']
|
||||
json.content @file['content']['content']
|
||||
json.encoding @file['content']['encoding']
|
||||
json.name @file['content'].present? ? @file['content']['name'] : params[:filepath]
|
||||
json.sha @file['content'].present? ? @file['content']['sha'] : ""
|
||||
json.size @file['content'].present? ? @file['content']['size'] : ""
|
||||
json.content @file['content'].present? ? @file['content']['content'] : params[:content]
|
||||
json.encoding @file['content'].present? ? @file['content']['encoding'] : "base64"
|
||||
json.pr_id @pull_issue.try(:id)
|
||||
json.commit do
|
||||
json.message @file['commit']['message']
|
||||
|
|
|
|||
|
|
@ -229,20 +229,25 @@ defaults format: :json do
|
|||
get :hooktasks
|
||||
end
|
||||
end
|
||||
resources :branches, param: :name, only:[:index, :create, :destroy] do
|
||||
resources :branches, param: :name, only:[:index, :create] do
|
||||
collection do
|
||||
get :gitee
|
||||
get :github
|
||||
get :all
|
||||
post :restore
|
||||
post :delete
|
||||
patch :update_default_branch
|
||||
end
|
||||
end
|
||||
match 'branches/*name', to: "branches#destroy", via: :all
|
||||
match 'branches/*name', to: "branches#destroy", via: :all, constraints: { name: /[^\/]+/ }
|
||||
|
||||
resources :tags, param: :name, only: [:index, :show, :destroy]
|
||||
delete 'tags/*name', to: "tags#destroy", via: :all
|
||||
get 'tags/*name', to: "tags#show", via: :all
|
||||
resources :tags, param: :name, only: [:index, :create] do
|
||||
collection do
|
||||
post :delete
|
||||
end
|
||||
end
|
||||
delete 'tags/*name', to: "tags#destroy", via: :all, constraints: { name: /[^\/]+/ }
|
||||
get 'tags/*name', to: "tags#show", via: :all, constraints: { name: /[^\/]+/ }
|
||||
get '/compare/:base...:head/files' => 'compare#files', :constraints => { base: /.+/, head: /.+/ }
|
||||
|
||||
resources :commits, only: [:index] do
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
class ChangeColumnToVersionReleases < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
change_column :version_releases, :tarball_url, :text
|
||||
change_column :version_releases, :zipball_url, :text
|
||||
change_column :version_releases, :url, :text
|
||||
end
|
||||
end
|
||||
Loading…
Reference in New Issue