mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
add pull request state
This commit is contained in:
@@ -2,7 +2,8 @@ class PullRequests::SendJournalService < ApplicationService
|
||||
|
||||
def initialize(project, pull_request,current_user)
|
||||
@project = project
|
||||
@issue = pull_request
|
||||
@pull_request = pull_request
|
||||
@issue = pull_request.issue
|
||||
@current_user = current_user
|
||||
@org = project.owner
|
||||
end
|
||||
@@ -23,6 +24,7 @@ class PullRequests::SendJournalService < ApplicationService
|
||||
}
|
||||
journal = Journal.new journal_params
|
||||
if journal.save
|
||||
@pull_request.update_attributes(status: 3)
|
||||
TouchWebhookJob.set(wait: 5.seconds).perform_later('PullRequestComment', @issue&.id, sender_id, journal.id, 'created', {})
|
||||
push_activity_2_blockchain("issue_comment_create", journal) if Site.has_blockchain? && @project.use_blockchain
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user