Skip to content

Commit

Permalink
Merge pull request #1212 from hanshuaikang/feature/develop_by_han
Browse files Browse the repository at this point in the history
minor: 新增审批助手 env 配置
  • Loading branch information
hanshuaikang authored Oct 17, 2023
2 parents 2a38bc4 + 098f69d commit 83d6e55
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,7 @@ def my_before_proxy_func(request, json_data, request_headers):
BKCHAT_URL = os.environ.get("BKCHAT_URL", "")
BKCHAT_CALLBACK_URL = os.environ.get("BKCHAT_CALLBACK_URL", "")
ITSM_SUMMARY_URL = os.environ.get("ITSM_SUMMARY_URL", "")
BKCHAT_ENV = os.environ.get("BKCHAT_ENV", None)


def redirect_func(request):
Expand Down
4 changes: 4 additions & 0 deletions itsm/component/bkchat/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ def send_fast_approval_message(title, content, receivers, ticket, state_id):
},
}

# 如果配置了的环境标示, 需要在请求参数增加这种环境标示
if settings.BKCHAT_ENV:
data["env"] = settings.BKCHAT_ENV

logger.info(
"[fast_approval({})]send fast approval message data:{}".format(ticket_sn, data)
)
Expand Down

0 comments on commit 83d6e55

Please sign in to comment.