Browse Source

Merge pull request '关闭Pm的webhook推送' (#173) from KingChan/forgeplus:pm_project_develop into pm_project_develop

pull/347/head
KingChan 2 years ago
parent
commit
767b232ed4
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      app/services/api/v1/issues/create_service.rb

+ 3
- 3
app/services/api/v1/issues/create_service.rb View File

@@ -90,9 +90,9 @@ class Api::V1::Issues::CreateService < ApplicationService
end end


# 触发webhook # 触发webhook
TouchWebhookJob.set(wait: 5.seconds).perform_later('IssueCreate', @created_issue&.id, current_user.id)
TouchWebhookJob.set(wait: 5.seconds).perform_later('IssueLabel', @created_issue&.id, current_user.id, {issue_tag_ids: [[], issue_tag_ids]}) unless issue_tag_ids.blank?
TouchWebhookJob.set(wait: 5.seconds).perform_later('IssueAssign', @created_issue&.id, current_user.id, {assigner_ids: [[], assigner_ids]}) unless assigner_ids.blank?
TouchWebhookJob.set(wait: 5.seconds).perform_later('IssueCreate', @created_issue&.id, current_user.id) unless @project.id.zero?
TouchWebhookJob.set(wait: 5.seconds).perform_later('IssueLabel', @created_issue&.id, current_user.id, {issue_tag_ids: [[], issue_tag_ids]}) unless issue_tag_ids.blank? && @project.id.zero?
TouchWebhookJob.set(wait: 5.seconds).perform_later('IssueAssign', @created_issue&.id, current_user.id, {assigner_ids: [[], assigner_ids]}) unless assigner_ids.blank? && @project.id.zero?
unlock("Api::V1::Issues::CreateService:#{project.id}") # 结束写数据,解锁 unlock("Api::V1::Issues::CreateService:#{project.id}") # 结束写数据,解锁
end end


Loading…
Cancel
Save