Merge branch 'dev_trustie' of http://gitea.trustie.net/jasder/forgeplus into dev_trustie

This commit is contained in:
Jasder 2020-06-05 10:58:01 +08:00
commit f683f10e51
6 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,5 @@
class JournalsController < ApplicationController class JournalsController < ApplicationController
before_action :require_login, except: :index before_action :require_login, except: [:index, :get_children_journals]
before_action :set_issue before_action :set_issue
before_action :check_issue_permission before_action :check_issue_permission
before_action :set_journal, only: [:destroy, :edit, :update] before_action :set_journal, only: [:destroy, :edit, :update]

View File

@ -207,8 +207,8 @@ class RepositoriesController < ApplicationController
status_id: 1, status_id: 1,
priority_id: 1 priority_id: 1
} }
pull_issue = Issue.new(issue_params) @pull_issue = Issue.new(issue_params)
if pull_issue.save! if @pull_issue.save!
local_requests = PullRequest.new(local_params.merge(user_id: current_user.try(:id), project_id: @project.id, issue_id: pull_issue.id)) local_requests = PullRequest.new(local_params.merge(user_id: current_user.try(:id), project_id: @project.id, issue_id: pull_issue.id))
if local_requests.save if local_requests.save
gitea_request = Gitea::PullRequest::CreateService.new(current_user.try(:gitea_token), @project.owner, @project.try(:identifier), requests_params).call gitea_request = Gitea::PullRequest::CreateService.new(current_user.try(:gitea_token), @project.owner, @project.try(:identifier), requests_params).call

View File

@ -53,7 +53,7 @@ module Gitea
def file_params def file_params
file_params = {} file_params = {}
file_params = file_params.merge(branch: @params[:branch]) unless (@params[:branch].blank? || @params[:new_branch].present?) file_params = file_params.merge(branch: @params[:branch]) unless @params[:branch].blank?
file_params = file_params.merge(new_branch: @params[:new_branch]) unless @params[:new_branch].blank? file_params = file_params.merge(new_branch: @params[:new_branch]) unless @params[:new_branch].blank?
file_params = file_params.merge(content: Base64.encode64(@params[:content])) file_params = file_params.merge(content: Base64.encode64(@params[:content]))
file_params = file_params.merge(message: @params[:message]) unless @params[:message].blank? file_params = file_params.merge(message: @params[:message]) unless @params[:message].blank?

View File

@ -3,6 +3,7 @@ json.sha @file['content']['sha']
json.size @file['content']['size'] json.size @file['content']['size']
json.content @file['content']['content'] json.content @file['content']['content']
json.encoding @file['content']['encoding'] json.encoding @file['content']['encoding']
json.pr_id @pull_issue.try(:id)
json.commit do json.commit do
json.message @file['commit']['message'] json.message @file['commit']['message']
json.author @file['commit']['author'] json.author @file['commit']['author']

View File

@ -3,6 +3,7 @@ json.sha @file['content']['sha']
json.size @file['content']['size'] json.size @file['content']['size']
json.content @file['content']['content'] json.content @file['content']['content']
json.encoding @file['content']['encoding'] json.encoding @file['content']['encoding']
json.pr_id @pull_issue.try(:id)
json.commit do json.commit do
json.message @file['commit']['message'] json.message @file['commit']['message']
json.author @file['commit']['author'] json.author @file['commit']['author']

BIN
dump.rdb

Binary file not shown.