mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
更改:悬赏金额变更需要同步至链上以及关联疑修新增标记是否解决
This commit is contained in:
@@ -227,11 +227,13 @@ class PullRequestsController < ApplicationController
|
||||
|
||||
# 查看是否fix了相关issue,如果fix就转账
|
||||
@pull_request.attached_issues.each do |issue|
|
||||
next if PullAttachedIssue.exist?(issue_id: issue.id, fixed: true)
|
||||
token_num = issue.blockchain_token_num
|
||||
token_num = token_num.nil? ? 0 : token_num
|
||||
author_id = @pull_request.user_id
|
||||
if token_num > 0
|
||||
Blockchain::FixIssue.call({user_id: author_id.to_s, project_id: @project.id.to_s, token_num: token_num}) if Site.has_blockchain? && @project.use_blockchain
|
||||
PullAttachedIssue.find_by(issue_id: issue.id, pull_request_id: @pull_request.id).update(fixed: true)
|
||||
end
|
||||
# update issue to state 5
|
||||
issue.update(status_id: 5)
|
||||
|
||||
Reference in New Issue
Block a user