feat(workflow): support custom external approval titles#4813
Open
Cynthia-0203 wants to merge 7 commits into
Open
feat(workflow): support custom external approval titles#4813Cynthia-0203 wants to merge 7 commits into
Cynthia-0203 wants to merge 7 commits into
Conversation
Signed-off-by: Cynthia <chenchen@koderover.com>
Signed-off-by: Cynthia <chenchen@koderover.com>
Signed-off-by: Cynthia <chenchen@koderover.com>
Signed-off-by: Cynthia <chenchen@koderover.com>
Signed-off-by: Cynthia <chenchen@koderover.com>
Signed-off-by: Cynthia <chenchen@koderover.com>
PetrusZ
reviewed
Jul 16, 2026
| return nodeTypeKey | ||
| } | ||
|
|
||
| return fmt.Sprintf("%s-%x", nodeTypeKey, md5.Sum([]byte(title))) |
Contributor
Author
There was a problem hiding this comment.
没有限制,只是这样固定标题生成key的长度而已
Contributor
There was a problem hiding this comment.
那直接用标题原文不就可以了?md5后存在数据库里没法阅读,不好debug
Signed-off-by: Cynthia <chenchen@koderover.com>
PetrusZ
reviewed
Jul 17, 2026
Comment on lines
+1578
to
+1582
| approvalTitle := strings.TrimSpace(spec.ApprovalTitle) | ||
| if approvalTitle == "" { | ||
| approvalTitle = "Zadig 工作流" | ||
| } | ||
| approvalNodeTypeKey := data.GetNodeTypeTitleKey(spec.ApprovalTitle) |
Contributor
There was a problem hiding this comment.
approvalTitle为空的时候,会设置为Zadig 工作流,导致GetNodeTypeTitleKey无法继续使用默认的NodeTypeKey
| return config.StatusTimeout, fmt.Errorf("workflow timeout") | ||
| default: | ||
| userApprovalResult, err := workwxservice.GetWorkWXApprovalEvent(instanceID) | ||
| detail, err := client.GetApprovalDetail(instanceID) |
Contributor
There was a problem hiding this comment.
这里不从event推送中获取审批结果了吗?需要查看一下workwx这个接口的rate limit,会不会造成问题
Contributor
Author
There was a problem hiding this comment.
对的,因为企微需要在后台选择需要回调的模版,比如修改了标题之后创建了一个模版但是没在企微后台勾选的话是没法获得回调信息的只能主动去查询。接口的限制是 600次/分钟。
Contributor
There was a problem hiding this comment.
现在每1s查一次,只能并发10个企微审批,稍微有一点危险
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / Why we need it:
Supports custom approval titles for external approval jobs, so users can define clearer titles for Lark, DingTalk, and WorkWX approvals.
What is changed and how it works?
approval_titleto workflow approval job specs and task specs.Does this PR introduce a user-facing change?
This change is