From 4f2e8b10f9d75e0a86e6c38d32d6530737d30c7a Mon Sep 17 00:00:00 2001 From: Robert He Date: Mon, 27 Jul 2026 05:55:12 +0800 Subject: [PATCH 01/22] feat: sep onf into dirs --- example-configs/bots/dev-team.yaml | 2 + example-configs/bots/ops-team.yaml | 2 + example-configs/bots/org-cn-notify.yaml | 3 + example-configs/bots/org-notify.yaml | 2 + example-configs/events.yaml | 609 - .../branch_protection_configuration.yaml | 3 + .../definitions/branch_protection_rule.yaml | 4 + .../events/definitions/check_run.yaml | 5 + .../events/definitions/check_suite.yaml | 4 + .../definitions/code_scanning_alert.yaml | 7 + .../events/definitions/commit_comment.yaml | 2 + .../events/definitions/create.yaml | 1 + .../events/definitions/custom_property.yaml | 5 + .../definitions/custom_property_values.yaml | 2 + .../events/definitions/delete.yaml | 1 + .../events/definitions/dependabot_alert.yaml | 8 + .../events/definitions/deploy_key.yaml | 3 + .../events/definitions/deployment.yaml | 1 + .../deployment_protection_rule.yaml | 2 + .../events/definitions/deployment_review.yaml | 4 + .../events/definitions/deployment_status.yaml | 1 + .../events/definitions/discussion.yaml | 13 + .../definitions/discussion_comment.yaml | 4 + example-configs/events/definitions/fork.yaml | 1 + .../definitions/github_app_authorization.yaml | 2 + .../events/definitions/gollum.yaml | 1 + .../events/definitions/installation.yaml | 6 + .../installation_repositories.yaml | 3 + .../definitions/installation_target.yaml | 2 + .../events/definitions/issue_comment.yaml | 4 + .../definitions/issue_dependencies.yaml | 5 + .../events/definitions/issues.yaml | 19 + example-configs/events/definitions/label.yaml | 4 + .../definitions/marketplace_purchase.yaml | 6 + .../events/definitions/member.yaml | 4 + .../events/definitions/membership.yaml | 3 + .../events/definitions/merge_group.yaml | 3 + example-configs/events/definitions/meta.yaml | 2 + .../events/definitions/milestone.yaml | 6 + .../events/definitions/org_block.yaml | 3 + .../events/definitions/organization.yaml | 4 + .../events/definitions/package.yaml | 3 + .../events/definitions/page_build.yaml | 1 + .../personal_access_token_request.yaml | 5 + example-configs/events/definitions/ping.yaml | 1 + .../events/definitions/project.yaml | 6 + .../events/definitions/project_card.yaml | 6 + .../events/definitions/project_column.yaml | 5 + .../events/definitions/projects_v2.yaml | 6 + .../events/definitions/projects_v2_item.yaml | 8 + .../projects_v2_status_update.yaml | 4 + .../events/definitions/public.yaml | 1 + .../events/definitions/pull_request.yaml | 24 + .../definitions/pull_request_review.yaml | 4 + .../pull_request_review_comment.yaml | 4 + .../pull_request_review_thread.yaml | 3 + example-configs/events/definitions/push.yaml | 2 + .../events/definitions/registry_package.yaml | 3 + .../events/definitions/release.yaml | 8 + .../events/definitions/repository.yaml | 10 + .../definitions/repository_advisory.yaml | 3 + .../definitions/repository_dispatch.yaml | 1 + .../events/definitions/repository_import.yaml | 1 + .../definitions/repository_ruleset.yaml | 4 + .../repository_vulnerability_alert.yaml | 5 + .../definitions/secret_scanning_alert.yaml | 6 + .../secret_scanning_alert_location.yaml | 2 + .../definitions/secret_scanning_scan.yaml | 2 + .../events/definitions/security_advisory.yaml | 4 + .../definitions/security_and_analysis.yaml | 1 + .../events/definitions/sponsorship.yaml | 7 + example-configs/events/definitions/star.yaml | 3 + .../events/definitions/status.yaml | 1 + .../events/definitions/sub_issues.yaml | 5 + example-configs/events/definitions/team.yaml | 6 + .../events/definitions/team_add.yaml | 1 + example-configs/events/definitions/watch.yaml | 2 + .../events/definitions/workflow_dispatch.yaml | 1 + .../events/definitions/workflow_job.yaml | 5 + .../events/definitions/workflow_run.yaml | 4 + example-configs/events/event_sets/all.yaml | 77 + example-configs/events/event_sets/basic.yaml | 10 + example-configs/events/event_sets/custom.yaml | 27 + example-configs/events/event_sets/org.yaml | 20 + example-configs/feishu-bots.yaml | 20 - .../00-CompPsyUnion-motion-vote-backend.yaml | 16 + .../01-CompPsyUnion-experimental-all.yaml | 5 + example-configs/patterns/02-hnrobert-all.yaml | 5 + example-configs/patterns/03-all.yaml | 6 + example-configs/repos.yaml | 52 - example-configs/templates.cn.jsonc | 14161 --------------- example-configs/templates.jsonc | 14204 ---------------- .../cn/branch_protection_configuration.json | 96 + .../templates/cn/branch_protection_rule.json | 171 + example-configs/templates/cn/check_run.json | 231 + example-configs/templates/cn/check_suite.json | 171 + .../templates/cn/code_scanning_alert.json | 309 + .../templates/cn/commit_comment.json | 93 + example-configs/templates/cn/create.json | 33 + .../templates/cn/custom_property.json | 188 + .../templates/cn/custom_property_values.json | 50 + example-configs/templates/cn/delete.json | 33 + .../templates/cn/dependabot_alert.json | 355 + example-configs/templates/cn/deploy_key.json | 96 + example-configs/templates/cn/deployment.json | 33 + .../cn/deployment_protection_rule.json | 50 + .../templates/cn/deployment_review.json | 137 + .../templates/cn/deployment_status.json | 33 + example-configs/templates/cn/discussion.json | 685 + .../templates/cn/discussion_comment.json | 185 + example-configs/templates/cn/fork.json | 47 + .../cn/github_app_authorization.json | 50 + example-configs/templates/cn/gollum.json | 47 + .../templates/cn/installation.json | 263 + .../cn/installation_repositories.json | 96 + .../templates/cn/installation_target.json | 50 + .../templates/cn/issue_comment.json | 369 + .../templates/cn/issue_dependencies.json | 188 + example-configs/templates/cn/issues.json | 1375 ++ example-configs/templates/cn/label.json | 171 + .../templates/cn/marketplace_purchase.json | 234 + example-configs/templates/cn/member.json | 171 + example-configs/templates/cn/membership.json | 125 + example-configs/templates/cn/merge_group.json | 125 + example-configs/templates/cn/meta.json | 50 + example-configs/templates/cn/milestone.json | 263 + example-configs/templates/cn/org_block.json | 96 + .../templates/cn/organization.json | 171 + example-configs/templates/cn/package.json | 125 + example-configs/templates/cn/page_build.json | 33 + .../cn/personal_access_token_request.json | 188 + example-configs/templates/cn/ping.json | 33 + example-configs/templates/cn/project.json | 263 + .../templates/cn/project_card.json | 263 + .../templates/cn/project_column.json | 217 + example-configs/templates/cn/projects_v2.json | 263 + .../templates/cn/projects_v2_item.json | 326 + .../cn/projects_v2_status_update.json | 142 + example-configs/templates/cn/public.json | 33 + .../templates/cn/pull_request.json | 1114 ++ .../templates/cn/pull_request_review.json | 185 + .../cn/pull_request_review_comment.json | 185 + .../cn/pull_request_review_thread.json | 125 + example-configs/templates/cn/push.json | 90 + .../templates/cn/registry_package.json | 96 + example-configs/templates/cn/release.json | 405 + example-configs/templates/cn/repository.json | 461 + .../templates/cn/repository_advisory.json | 96 + .../templates/cn/repository_dispatch.json | 50 + .../templates/cn/repository_import.json | 50 + .../templates/cn/repository_ruleset.json | 142 + .../cn/repository_vulnerability_alert.json | 188 + .../templates/cn/secret_scanning_alert.json | 263 + .../cn/secret_scanning_alert_location.json | 50 + .../templates/cn/secret_scanning_scan.json | 50 + .../templates/cn/security_advisory.json | 171 + .../templates/cn/security_and_analysis.json | 50 + example-configs/templates/cn/sponsorship.json | 292 + example-configs/templates/cn/star.json | 125 + example-configs/templates/cn/status.json | 33 + example-configs/templates/cn/sub_issues.json | 188 + example-configs/templates/cn/team.json | 263 + example-configs/templates/cn/team_add.json | 50 + example-configs/templates/cn/watch.json | 79 + .../templates/cn/workflow_dispatch.json | 50 + .../templates/cn/workflow_job.json | 259 + .../templates/cn/workflow_run.json | 319 + .../branch_protection_configuration.json | 96 + .../default/branch_protection_rule.json | 171 + .../templates/default/check_run.json | 231 + .../templates/default/check_suite.json | 171 + .../default/code_scanning_alert.json | 309 + .../templates/default/commit_comment.json | 93 + example-configs/templates/default/create.json | 33 + .../templates/default/custom_property.json | 188 + .../default/custom_property_values.json | 50 + example-configs/templates/default/delete.json | 33 + .../templates/default/dependabot_alert.json | 355 + .../templates/default/deploy_key.json | 96 + .../templates/default/deployment.json | 33 + .../default/deployment_protection_rule.json | 50 + .../templates/default/deployment_review.json | 137 + .../templates/default/deployment_status.json | 33 + .../templates/default/discussion.json | 685 + .../templates/default/discussion_comment.json | 185 + example-configs/templates/default/fork.json | 47 + .../default/github_app_authorization.json | 50 + example-configs/templates/default/gollum.json | 47 + .../templates/default/installation.json | 263 + .../default/installation_repositories.json | 96 + .../default/installation_target.json | 50 + .../templates/default/issue_comment.json | 369 + .../templates/default/issue_dependencies.json | 188 + example-configs/templates/default/issues.json | 1418 ++ example-configs/templates/default/label.json | 171 + .../default/marketplace_purchase.json | 234 + example-configs/templates/default/member.json | 171 + .../templates/default/membership.json | 125 + .../templates/default/merge_group.json | 125 + example-configs/templates/default/meta.json | 50 + .../templates/default/milestone.json | 263 + .../templates/default/org_block.json | 96 + .../templates/default/organization.json | 171 + .../templates/default/package.json | 125 + .../templates/default/page_build.json | 33 + .../personal_access_token_request.json | 188 + example-configs/templates/default/ping.json | 33 + .../templates/default/project.json | 263 + .../templates/default/project_card.json | 263 + .../templates/default/project_column.json | 217 + .../templates/default/projects_v2.json | 263 + .../templates/default/projects_v2_item.json | 326 + .../default/projects_v2_status_update.json | 142 + example-configs/templates/default/public.json | 33 + .../templates/default/pull_request.json | 1114 ++ .../default/pull_request_review.json | 185 + .../default/pull_request_review_comment.json | 185 + .../default/pull_request_review_thread.json | 125 + example-configs/templates/default/push.json | 90 + .../templates/default/registry_package.json | 96 + .../templates/default/release.json | 405 + .../templates/default/repository.json | 461 + .../default/repository_advisory.json | 96 + .../default/repository_dispatch.json | 50 + .../templates/default/repository_import.json | 50 + .../templates/default/repository_ruleset.json | 142 + .../repository_vulnerability_alert.json | 188 + .../default/secret_scanning_alert.json | 263 + .../secret_scanning_alert_location.json | 50 + .../default/secret_scanning_scan.json | 50 + .../templates/default/security_advisory.json | 171 + .../default/security_and_analysis.json | 50 + .../templates/default/sponsorship.json | 292 + example-configs/templates/default/star.json | 125 + example-configs/templates/default/status.json | 33 + .../templates/default/sub_issues.json | 188 + example-configs/templates/default/team.json | 263 + .../templates/default/team_add.json | 50 + example-configs/templates/default/watch.json | 79 + .../templates/default/workflow_dispatch.json | 50 + .../templates/default/workflow_job.json | 259 + .../templates/default/workflow_run.json | 319 + internal/config/config.go | 273 +- internal/config/config_test.go | 157 +- 244 files changed, 29087 insertions(+), 29233 deletions(-) create mode 100644 example-configs/bots/dev-team.yaml create mode 100644 example-configs/bots/ops-team.yaml create mode 100644 example-configs/bots/org-cn-notify.yaml create mode 100644 example-configs/bots/org-notify.yaml delete mode 100644 example-configs/events.yaml create mode 100644 example-configs/events/definitions/branch_protection_configuration.yaml create mode 100644 example-configs/events/definitions/branch_protection_rule.yaml create mode 100644 example-configs/events/definitions/check_run.yaml create mode 100644 example-configs/events/definitions/check_suite.yaml create mode 100644 example-configs/events/definitions/code_scanning_alert.yaml create mode 100644 example-configs/events/definitions/commit_comment.yaml create mode 100644 example-configs/events/definitions/create.yaml create mode 100644 example-configs/events/definitions/custom_property.yaml create mode 100644 example-configs/events/definitions/custom_property_values.yaml create mode 100644 example-configs/events/definitions/delete.yaml create mode 100644 example-configs/events/definitions/dependabot_alert.yaml create mode 100644 example-configs/events/definitions/deploy_key.yaml create mode 100644 example-configs/events/definitions/deployment.yaml create mode 100644 example-configs/events/definitions/deployment_protection_rule.yaml create mode 100644 example-configs/events/definitions/deployment_review.yaml create mode 100644 example-configs/events/definitions/deployment_status.yaml create mode 100644 example-configs/events/definitions/discussion.yaml create mode 100644 example-configs/events/definitions/discussion_comment.yaml create mode 100644 example-configs/events/definitions/fork.yaml create mode 100644 example-configs/events/definitions/github_app_authorization.yaml create mode 100644 example-configs/events/definitions/gollum.yaml create mode 100644 example-configs/events/definitions/installation.yaml create mode 100644 example-configs/events/definitions/installation_repositories.yaml create mode 100644 example-configs/events/definitions/installation_target.yaml create mode 100644 example-configs/events/definitions/issue_comment.yaml create mode 100644 example-configs/events/definitions/issue_dependencies.yaml create mode 100644 example-configs/events/definitions/issues.yaml create mode 100644 example-configs/events/definitions/label.yaml create mode 100644 example-configs/events/definitions/marketplace_purchase.yaml create mode 100644 example-configs/events/definitions/member.yaml create mode 100644 example-configs/events/definitions/membership.yaml create mode 100644 example-configs/events/definitions/merge_group.yaml create mode 100644 example-configs/events/definitions/meta.yaml create mode 100644 example-configs/events/definitions/milestone.yaml create mode 100644 example-configs/events/definitions/org_block.yaml create mode 100644 example-configs/events/definitions/organization.yaml create mode 100644 example-configs/events/definitions/package.yaml create mode 100644 example-configs/events/definitions/page_build.yaml create mode 100644 example-configs/events/definitions/personal_access_token_request.yaml create mode 100644 example-configs/events/definitions/ping.yaml create mode 100644 example-configs/events/definitions/project.yaml create mode 100644 example-configs/events/definitions/project_card.yaml create mode 100644 example-configs/events/definitions/project_column.yaml create mode 100644 example-configs/events/definitions/projects_v2.yaml create mode 100644 example-configs/events/definitions/projects_v2_item.yaml create mode 100644 example-configs/events/definitions/projects_v2_status_update.yaml create mode 100644 example-configs/events/definitions/public.yaml create mode 100644 example-configs/events/definitions/pull_request.yaml create mode 100644 example-configs/events/definitions/pull_request_review.yaml create mode 100644 example-configs/events/definitions/pull_request_review_comment.yaml create mode 100644 example-configs/events/definitions/pull_request_review_thread.yaml create mode 100644 example-configs/events/definitions/push.yaml create mode 100644 example-configs/events/definitions/registry_package.yaml create mode 100644 example-configs/events/definitions/release.yaml create mode 100644 example-configs/events/definitions/repository.yaml create mode 100644 example-configs/events/definitions/repository_advisory.yaml create mode 100644 example-configs/events/definitions/repository_dispatch.yaml create mode 100644 example-configs/events/definitions/repository_import.yaml create mode 100644 example-configs/events/definitions/repository_ruleset.yaml create mode 100644 example-configs/events/definitions/repository_vulnerability_alert.yaml create mode 100644 example-configs/events/definitions/secret_scanning_alert.yaml create mode 100644 example-configs/events/definitions/secret_scanning_alert_location.yaml create mode 100644 example-configs/events/definitions/secret_scanning_scan.yaml create mode 100644 example-configs/events/definitions/security_advisory.yaml create mode 100644 example-configs/events/definitions/security_and_analysis.yaml create mode 100644 example-configs/events/definitions/sponsorship.yaml create mode 100644 example-configs/events/definitions/star.yaml create mode 100644 example-configs/events/definitions/status.yaml create mode 100644 example-configs/events/definitions/sub_issues.yaml create mode 100644 example-configs/events/definitions/team.yaml create mode 100644 example-configs/events/definitions/team_add.yaml create mode 100644 example-configs/events/definitions/watch.yaml create mode 100644 example-configs/events/definitions/workflow_dispatch.yaml create mode 100644 example-configs/events/definitions/workflow_job.yaml create mode 100644 example-configs/events/definitions/workflow_run.yaml create mode 100644 example-configs/events/event_sets/all.yaml create mode 100644 example-configs/events/event_sets/basic.yaml create mode 100644 example-configs/events/event_sets/custom.yaml create mode 100644 example-configs/events/event_sets/org.yaml delete mode 100644 example-configs/feishu-bots.yaml create mode 100644 example-configs/patterns/00-CompPsyUnion-motion-vote-backend.yaml create mode 100644 example-configs/patterns/01-CompPsyUnion-experimental-all.yaml create mode 100644 example-configs/patterns/02-hnrobert-all.yaml create mode 100644 example-configs/patterns/03-all.yaml delete mode 100644 example-configs/repos.yaml delete mode 100644 example-configs/templates.cn.jsonc delete mode 100644 example-configs/templates.jsonc create mode 100644 example-configs/templates/cn/branch_protection_configuration.json create mode 100644 example-configs/templates/cn/branch_protection_rule.json create mode 100644 example-configs/templates/cn/check_run.json create mode 100644 example-configs/templates/cn/check_suite.json create mode 100644 example-configs/templates/cn/code_scanning_alert.json create mode 100644 example-configs/templates/cn/commit_comment.json create mode 100644 example-configs/templates/cn/create.json create mode 100644 example-configs/templates/cn/custom_property.json create mode 100644 example-configs/templates/cn/custom_property_values.json create mode 100644 example-configs/templates/cn/delete.json create mode 100644 example-configs/templates/cn/dependabot_alert.json create mode 100644 example-configs/templates/cn/deploy_key.json create mode 100644 example-configs/templates/cn/deployment.json create mode 100644 example-configs/templates/cn/deployment_protection_rule.json create mode 100644 example-configs/templates/cn/deployment_review.json create mode 100644 example-configs/templates/cn/deployment_status.json create mode 100644 example-configs/templates/cn/discussion.json create mode 100644 example-configs/templates/cn/discussion_comment.json create mode 100644 example-configs/templates/cn/fork.json create mode 100644 example-configs/templates/cn/github_app_authorization.json create mode 100644 example-configs/templates/cn/gollum.json create mode 100644 example-configs/templates/cn/installation.json create mode 100644 example-configs/templates/cn/installation_repositories.json create mode 100644 example-configs/templates/cn/installation_target.json create mode 100644 example-configs/templates/cn/issue_comment.json create mode 100644 example-configs/templates/cn/issue_dependencies.json create mode 100644 example-configs/templates/cn/issues.json create mode 100644 example-configs/templates/cn/label.json create mode 100644 example-configs/templates/cn/marketplace_purchase.json create mode 100644 example-configs/templates/cn/member.json create mode 100644 example-configs/templates/cn/membership.json create mode 100644 example-configs/templates/cn/merge_group.json create mode 100644 example-configs/templates/cn/meta.json create mode 100644 example-configs/templates/cn/milestone.json create mode 100644 example-configs/templates/cn/org_block.json create mode 100644 example-configs/templates/cn/organization.json create mode 100644 example-configs/templates/cn/package.json create mode 100644 example-configs/templates/cn/page_build.json create mode 100644 example-configs/templates/cn/personal_access_token_request.json create mode 100644 example-configs/templates/cn/ping.json create mode 100644 example-configs/templates/cn/project.json create mode 100644 example-configs/templates/cn/project_card.json create mode 100644 example-configs/templates/cn/project_column.json create mode 100644 example-configs/templates/cn/projects_v2.json create mode 100644 example-configs/templates/cn/projects_v2_item.json create mode 100644 example-configs/templates/cn/projects_v2_status_update.json create mode 100644 example-configs/templates/cn/public.json create mode 100644 example-configs/templates/cn/pull_request.json create mode 100644 example-configs/templates/cn/pull_request_review.json create mode 100644 example-configs/templates/cn/pull_request_review_comment.json create mode 100644 example-configs/templates/cn/pull_request_review_thread.json create mode 100644 example-configs/templates/cn/push.json create mode 100644 example-configs/templates/cn/registry_package.json create mode 100644 example-configs/templates/cn/release.json create mode 100644 example-configs/templates/cn/repository.json create mode 100644 example-configs/templates/cn/repository_advisory.json create mode 100644 example-configs/templates/cn/repository_dispatch.json create mode 100644 example-configs/templates/cn/repository_import.json create mode 100644 example-configs/templates/cn/repository_ruleset.json create mode 100644 example-configs/templates/cn/repository_vulnerability_alert.json create mode 100644 example-configs/templates/cn/secret_scanning_alert.json create mode 100644 example-configs/templates/cn/secret_scanning_alert_location.json create mode 100644 example-configs/templates/cn/secret_scanning_scan.json create mode 100644 example-configs/templates/cn/security_advisory.json create mode 100644 example-configs/templates/cn/security_and_analysis.json create mode 100644 example-configs/templates/cn/sponsorship.json create mode 100644 example-configs/templates/cn/star.json create mode 100644 example-configs/templates/cn/status.json create mode 100644 example-configs/templates/cn/sub_issues.json create mode 100644 example-configs/templates/cn/team.json create mode 100644 example-configs/templates/cn/team_add.json create mode 100644 example-configs/templates/cn/watch.json create mode 100644 example-configs/templates/cn/workflow_dispatch.json create mode 100644 example-configs/templates/cn/workflow_job.json create mode 100644 example-configs/templates/cn/workflow_run.json create mode 100644 example-configs/templates/default/branch_protection_configuration.json create mode 100644 example-configs/templates/default/branch_protection_rule.json create mode 100644 example-configs/templates/default/check_run.json create mode 100644 example-configs/templates/default/check_suite.json create mode 100644 example-configs/templates/default/code_scanning_alert.json create mode 100644 example-configs/templates/default/commit_comment.json create mode 100644 example-configs/templates/default/create.json create mode 100644 example-configs/templates/default/custom_property.json create mode 100644 example-configs/templates/default/custom_property_values.json create mode 100644 example-configs/templates/default/delete.json create mode 100644 example-configs/templates/default/dependabot_alert.json create mode 100644 example-configs/templates/default/deploy_key.json create mode 100644 example-configs/templates/default/deployment.json create mode 100644 example-configs/templates/default/deployment_protection_rule.json create mode 100644 example-configs/templates/default/deployment_review.json create mode 100644 example-configs/templates/default/deployment_status.json create mode 100644 example-configs/templates/default/discussion.json create mode 100644 example-configs/templates/default/discussion_comment.json create mode 100644 example-configs/templates/default/fork.json create mode 100644 example-configs/templates/default/github_app_authorization.json create mode 100644 example-configs/templates/default/gollum.json create mode 100644 example-configs/templates/default/installation.json create mode 100644 example-configs/templates/default/installation_repositories.json create mode 100644 example-configs/templates/default/installation_target.json create mode 100644 example-configs/templates/default/issue_comment.json create mode 100644 example-configs/templates/default/issue_dependencies.json create mode 100644 example-configs/templates/default/issues.json create mode 100644 example-configs/templates/default/label.json create mode 100644 example-configs/templates/default/marketplace_purchase.json create mode 100644 example-configs/templates/default/member.json create mode 100644 example-configs/templates/default/membership.json create mode 100644 example-configs/templates/default/merge_group.json create mode 100644 example-configs/templates/default/meta.json create mode 100644 example-configs/templates/default/milestone.json create mode 100644 example-configs/templates/default/org_block.json create mode 100644 example-configs/templates/default/organization.json create mode 100644 example-configs/templates/default/package.json create mode 100644 example-configs/templates/default/page_build.json create mode 100644 example-configs/templates/default/personal_access_token_request.json create mode 100644 example-configs/templates/default/ping.json create mode 100644 example-configs/templates/default/project.json create mode 100644 example-configs/templates/default/project_card.json create mode 100644 example-configs/templates/default/project_column.json create mode 100644 example-configs/templates/default/projects_v2.json create mode 100644 example-configs/templates/default/projects_v2_item.json create mode 100644 example-configs/templates/default/projects_v2_status_update.json create mode 100644 example-configs/templates/default/public.json create mode 100644 example-configs/templates/default/pull_request.json create mode 100644 example-configs/templates/default/pull_request_review.json create mode 100644 example-configs/templates/default/pull_request_review_comment.json create mode 100644 example-configs/templates/default/pull_request_review_thread.json create mode 100644 example-configs/templates/default/push.json create mode 100644 example-configs/templates/default/registry_package.json create mode 100644 example-configs/templates/default/release.json create mode 100644 example-configs/templates/default/repository.json create mode 100644 example-configs/templates/default/repository_advisory.json create mode 100644 example-configs/templates/default/repository_dispatch.json create mode 100644 example-configs/templates/default/repository_import.json create mode 100644 example-configs/templates/default/repository_ruleset.json create mode 100644 example-configs/templates/default/repository_vulnerability_alert.json create mode 100644 example-configs/templates/default/secret_scanning_alert.json create mode 100644 example-configs/templates/default/secret_scanning_alert_location.json create mode 100644 example-configs/templates/default/secret_scanning_scan.json create mode 100644 example-configs/templates/default/security_advisory.json create mode 100644 example-configs/templates/default/security_and_analysis.json create mode 100644 example-configs/templates/default/sponsorship.json create mode 100644 example-configs/templates/default/star.json create mode 100644 example-configs/templates/default/status.json create mode 100644 example-configs/templates/default/sub_issues.json create mode 100644 example-configs/templates/default/team.json create mode 100644 example-configs/templates/default/team_add.json create mode 100644 example-configs/templates/default/watch.json create mode 100644 example-configs/templates/default/workflow_dispatch.json create mode 100644 example-configs/templates/default/workflow_job.json create mode 100644 example-configs/templates/default/workflow_run.json diff --git a/example-configs/bots/dev-team.yaml b/example-configs/bots/dev-team.yaml new file mode 100644 index 0000000..117f1d1 --- /dev/null +++ b/example-configs/bots/dev-team.yaml @@ -0,0 +1,2 @@ +alias: dev-team +url: https://open.feishu.cn/open-apis/bot/v2/hook/xxxxxxx diff --git a/example-configs/bots/ops-team.yaml b/example-configs/bots/ops-team.yaml new file mode 100644 index 0000000..e98b68d --- /dev/null +++ b/example-configs/bots/ops-team.yaml @@ -0,0 +1,2 @@ +alias: ops-team +url: https://open.feishu.cn/open-apis/bot/v2/hook/yyyyyyy diff --git a/example-configs/bots/org-cn-notify.yaml b/example-configs/bots/org-cn-notify.yaml new file mode 100644 index 0000000..fbdd4cb --- /dev/null +++ b/example-configs/bots/org-cn-notify.yaml @@ -0,0 +1,3 @@ +alias: org-cn-notify +url: https://open.feishu.cn/open-apis/bot/v2/hook/zzzzzzz +template: cn diff --git a/example-configs/bots/org-notify.yaml b/example-configs/bots/org-notify.yaml new file mode 100644 index 0000000..cdef260 --- /dev/null +++ b/example-configs/bots/org-notify.yaml @@ -0,0 +1,2 @@ +alias: org-notify +url: https://open.feishu.cn/open-apis/bot/v2/hook/zzzzzzz diff --git a/example-configs/events.yaml b/example-configs/events.yaml deleted file mode 100644 index e638a4c..0000000 --- a/example-configs/events.yaml +++ /dev/null @@ -1,609 +0,0 @@ -# ========================================= -# events.yaml -# ----------------------------------------- -# 定义支持的GitHub事件结构 -# 可通过 `alias` 在repo中快速引用 -# ========================================= - -# 模板集合,用于在repos.yaml中引用 -# 注意:如果在模板里包含了一个完整事件(例如使用 `push:`), -# 并且在该事件下没有进一步指定分支/类型等条件,我们会把它视为“全选”(匹配该事件的所有子类型)。 -event_sets: - # "all" 模板:包含GitHub支持的全部事件(包含所有事件) - all: - branch_protection_configuration: - branch_protection_rule: - branches: - check_run: - check_suite: - code_scanning_alert: - commit_comment: - create: - custom_property: - custom_property_values: - delete: - dependabot_alert: - deploy_key: - deployment: - deployment_protection_rule: - deployment_review: - deployment_status: - discussion: - discussion_comment: - fork: - github_app_authorization: - gollum: - installation: - installation_repositories: - installation_target: - issue_comment: - issue_dependencies: - issues: - label: - marketplace_purchase: - member: - membership: - merge_group: - meta: - milestone: - org_block: - organization: - package: - page_build: - personal_access_token_request: - ping: - project: - project_card: - project_column: - projects_v2: - projects_v2_item: - projects_v2_status_update: - public: - pull_request: - pull_request_review: - pull_request_review_comment: - pull_request_review_thread: - push: - registry_package: - release: - repository: - repository_advisory: - repository_dispatch: - repository_import: - repository_ruleset: - repository_vulnerability_alert: - secret_scanning_alert: - secret_scanning_alert_location: - secret_scanning_scan: - security_advisory: - security_and_analysis: - sponsorship: - star: - status: - sub_issues: - team: - team_add: - types: - watch: - workflow_dispatch: - workflow_job: - workflow_run: - - # "basic" 模板:适合中小型项目,一般常用事件 - basic: - discussion: - discussion_comment: - issue_comment: - issues: - package: - pull_request: - pull_request_review: - pull_request_review_comment: - push: - release: - - # 自定义模板:可按需添加事件并细化自定义新的 event_sets(示例) - custom: - discussion: - types: - - created - - answered - issues: - types: - - opened - - closed - - reopened - pull_request: - branches: - - main - - develop - - release/* - types: - - opened - - closed - - reopened - push: - branches: - - main - - develop - - release/* - release: - types: - - published - - edited - - org: - organization: - org_block: - team: - team_add: - member: - membership: - repository: - repository_vulnerability_alert: - secret_scanning_alert: - secret_scanning_alert_location: - security_advisory: - security_and_analysis: - github_app_authorization: - installation: - installation_repositories: - installation_target: - marketplace_purchase: - sponsorship: - personal_access_token_request: - meta: - -# 下面是完整事件列表,供模板引用或自定义精细化配置,也可以直接在 repos.yaml 中每个仓库的 events 中使用。如果要 CV 请注意缩进。 -events: - # 在仓库分支保护配置启用/禁用时触发(仓库或组织级别的分支保护设置变更) - branch_protection_configuration: - types: - - disabled - - enabled - # 当单个分支保护规则被创建/删除/编辑时触发 - branch_protection_rule: - types: - - created - - deleted - - edited - # 单个 check run 的生命周期事件(CI 检查) - check_run: - types: - - created - - completed - - rerequested - - requested_action - # check suite(多个 check run 的集合)相关事件 - check_suite: - types: - - completed - - requested - - rerequested - # 代码扫描发现的告警/漏洞相关事件 - code_scanning_alert: - types: - - appeared_in_branch - - closed_by_user - - created - - fixed - - reopened - - reopened_by_user - # 对 commit 的评论 - commit_comment: - types: - - created - # 创建分支或标签时触发 - create: - # 自定义属性(如项目自定义字段)被操作时触发 - custom_property: - types: - - created - - deleted - - promote_to_enterprise - - updated - # 自定义属性的值发生变更时触发 - custom_property_values: - types: - - updated - # 删除分支或标签时触发 - delete: - # Dependabot 报警相关事件 - dependabot_alert: - types: - - auto_dismissed - - auto_reopened - - created - - dismissed - - fixed - - reintroduced - - reopened - # 部署密钥创建/删除 - deploy_key: - types: - - created - - deleted - # 部署(deployment)创建或相关操作 - deployment: - # 部署保护规则请求(如需要人工批准) - deployment_protection_rule: - types: - - requested - # 部署审查(批准/拒绝/请求) - deployment_review: - types: - - approved - - rejected - - requested - # 部署状态更新 - deployment_status: - # 仓库讨论(discussion)及其状态变更 - discussion: - types: - - created - - edited - - deleted - - transferred - - pinned - - unpinned - - locked - - unlocked - - labeled - - unlabeled - - answered - - unanswered - # 对讨论的评论 - discussion_comment: - types: - - created - - edited - - deleted - # 仓库被 fork - fork: - # GitHub App 授权/撤销等事件 - github_app_authorization: - types: - - revoked - # wiki (gollum) 页面变更 - gollum: - # GitHub App 安装/卸载/权限变更 - installation: - types: - - created - - deleted - - new_permissions_accepted - - suspend - - unsuspend - # 安装的仓库被添加或移除 - installation_repositories: - types: - - added - - removed - # 安装目标(target)被重命名等 - installation_target: - types: - - renamed - # issue 上的评论 - issue_comment: - types: - - created - - edited - - deleted - # issue 依赖关系变更 - issue_dependencies: - types: - - blocked_by_added - - blocked_by_removed - - blocking_added - - blocking_removed - # issue 本身的生命周期(打开/关闭/重新打开等) - issues: - types: - - opened - - closed - - reopened - - assigned - - unassigned - - labeled - - unlabeled - - edited - - milestoned - - demilestoned - - transferred - - deleted - - pinned - - unpinned - - locked - - unlocked - - typed - - untyped - # 标签操作(创建/删除/编辑) - label: - types: - - created - - deleted - - edited - # Marketplace 购买/变更事件 - marketplace_purchase: - types: - - cancelled - - changed - - pending_change - - pending_change_cancelled - - purchased - # 组织成员(member)被添加/移除/编辑 - member: - types: - - added - - removed - - edited - # 团队成员关系变更(membership) - membership: - types: - - added - - removed - # merge group 相关事件(例如 checks 请求被创建/销毁) - merge_group: - types: - - checks_requested - - destroyed - # 元数据事件(如 meta 信息被删除) - meta: - types: - - deleted - # milestone 生命周期事件 - milestone: - types: - - created - - closed - - opened - - edited - - deleted - # 组织阻止(block)/解锁用户 - org_block: - types: - - blocked - - unblocked - # 组织级别操作(成员/邀请等) - organization: - types: - - member_added - - member_removed - - member_invited - # 包(package)发布/更新事件 - package: - types: - - published - - updated - # GitHub Pages 构建事件 - page_build: - # 个人访问令牌请求(PAT)相关的审批/创建/拒绝等 - personal_access_token_request: - types: - - approved - - cancelled - - created - - denied - # Webhook 的 ping(当创建 webhook 时 GitHub 发送以测试连通性) - ping: - # classic project(项目)的事件(创建/更新/关闭等) - project: - types: - - created - - updated - - closed - - reopened - - deleted - # project 卡片的变更 - project_card: - types: - - created - - moved - - converted - - edited - - deleted - # project 列的变更 - project_column: - types: - - created - - updated - - moved - - deleted - # projects v2(新版项目)整体事件 - projects_v2: - types: - - closed - - created - - deleted - - edited - - reopened - # projects v2 中单个 item 的事件 - projects_v2_item: - types: - - archived - - converted - - created - - deleted - - edited - - reordered - - restored - # projects v2 状态更新 - projects_v2_status_update: - types: - - created - - deleted - - edited - # 仓库从私有变为公开等 public 事件 - public: - # Pull Request 事件(创建/同步/合并等) - pull_request: - branches: - - "*" - types: - - opened - - closed - - reopened - - synchronize - - assigned - - unassigned - - labeled - - unlabeled - - review_requested - - review_request_removed - - ready_for_review - - converted_to_draft - - auto_merge_enabled - - auto_merge_disabled - - dequeued - - enqueued - - edited - - locked - - unlocked - - milestoned - - demilestoned - # pull request 的代码评审(review)相关事件 - pull_request_review: - types: - - submitted - - edited - - dismissed - # pull request 中的 review comment(审查评论) - pull_request_review_comment: - types: - - created - - edited - - deleted - # review comment 线程(thread)被解决/未解决 - pull_request_review_thread: - types: - - resolved - - unresolved - # push 事件(提交被推送到仓库)——通常关心分支过滤 - push: - branches: - - "*" - # 注册到 package registry 的包的发布/更新事件 - registry_package: - types: - - published - - updated - # release(发布)相关事件,例如创建/发布/撤销预发布 - release: - types: - - published - - unpublished - - created - - edited - - deleted - - prereleased - - released - # 仓库本身的生命周期事件(创建/删除/归档/重命名等) - repository: - types: - - created - - deleted - - archived - - unarchived - - edited - - renamed - - transferred - - publicized - - privatized - # 与安全或合规相关的仓库建议或公告 - repository_advisory: - types: - - published - - reported - # repository_dispatch:手动/外部触发的自定义事件 - repository_dispatch: - # repository_import:仓库导入相关事件(例如从另一个平台导入) - repository_import: - # 仓库规则集(ruleset)创建/删除/编辑 - repository_ruleset: - types: - - created - - deleted - - edited - # 仓库漏洞告警(vulnerability alert) - repository_vulnerability_alert: - types: - - create - - dismiss - - reopen - - resolve - # Secret scanning 报警(如检测到泄露的密钥) - secret_scanning_alert: - types: - - created - - publicly_leaked - - reopened - - resolved - - validated - # 密钥泄露位置相关通知 - secret_scanning_alert_location: - types: - - created - # 密钥扫描任务完成事件 - secret_scanning_scan: - types: - - completed - # 安全通告(advisory)发布/更新/撤回等 - security_advisory: - types: - - published - - updated - - withdrawn - # 与安全及分析相关的设置变更 - security_and_analysis: - # 赞助(sponsorship)相关事件,例如创建/取消等 - sponsorship: - types: - - cancelled - - created - - edited - - pending_cancellation - - pending_tier_change - - tier_changed - # star(给仓库加星)事件 - star: - types: - - created - - deleted - # 状态(status)通常与 CI 状态/Checks 相关 - status: - # 子任务/子 issue 相关事件(如果使用子 issue 功能) - sub_issues: - types: - - parent_issue_added - - parent_issue_removed - - sub_issue_added - - sub_issue_removed - # 团队(team)相关的创建/删除/编辑及权限变化 - team: - types: - - created - - deleted - - edited - - added_to_repository - - removed_from_repository - # team_add:将团队添加到仓库的简短事件 - team_add: - # watch/star 事件(用户开始关注/开始看仓库) - watch: - types: - - started - # workflow_dispatch:手动触发的 GitHub Actions workflow - workflow_dispatch: - # workflow_job:GitHub Actions 中单个 job 的状态更新 - workflow_job: - types: - - completed - - in_progress - - queued - - waiting - # workflow_run:整个 workflow 的运行生命周期事件 - workflow_run: - types: - - completed - - requested - - in_progress diff --git a/example-configs/events/definitions/branch_protection_configuration.yaml b/example-configs/events/definitions/branch_protection_configuration.yaml new file mode 100644 index 0000000..0f268c5 --- /dev/null +++ b/example-configs/events/definitions/branch_protection_configuration.yaml @@ -0,0 +1,3 @@ +types: +- disabled +- enabled diff --git a/example-configs/events/definitions/branch_protection_rule.yaml b/example-configs/events/definitions/branch_protection_rule.yaml new file mode 100644 index 0000000..ba109ac --- /dev/null +++ b/example-configs/events/definitions/branch_protection_rule.yaml @@ -0,0 +1,4 @@ +types: +- created +- deleted +- edited diff --git a/example-configs/events/definitions/check_run.yaml b/example-configs/events/definitions/check_run.yaml new file mode 100644 index 0000000..5e48229 --- /dev/null +++ b/example-configs/events/definitions/check_run.yaml @@ -0,0 +1,5 @@ +types: +- created +- completed +- rerequested +- requested_action diff --git a/example-configs/events/definitions/check_suite.yaml b/example-configs/events/definitions/check_suite.yaml new file mode 100644 index 0000000..f137658 --- /dev/null +++ b/example-configs/events/definitions/check_suite.yaml @@ -0,0 +1,4 @@ +types: +- completed +- requested +- rerequested diff --git a/example-configs/events/definitions/code_scanning_alert.yaml b/example-configs/events/definitions/code_scanning_alert.yaml new file mode 100644 index 0000000..7cf1b33 --- /dev/null +++ b/example-configs/events/definitions/code_scanning_alert.yaml @@ -0,0 +1,7 @@ +types: +- appeared_in_branch +- closed_by_user +- created +- fixed +- reopened +- reopened_by_user diff --git a/example-configs/events/definitions/commit_comment.yaml b/example-configs/events/definitions/commit_comment.yaml new file mode 100644 index 0000000..bdaafbb --- /dev/null +++ b/example-configs/events/definitions/commit_comment.yaml @@ -0,0 +1,2 @@ +types: +- created diff --git a/example-configs/events/definitions/create.yaml b/example-configs/events/definitions/create.yaml new file mode 100644 index 0000000..19765bd --- /dev/null +++ b/example-configs/events/definitions/create.yaml @@ -0,0 +1 @@ +null diff --git a/example-configs/events/definitions/custom_property.yaml b/example-configs/events/definitions/custom_property.yaml new file mode 100644 index 0000000..be44eef --- /dev/null +++ b/example-configs/events/definitions/custom_property.yaml @@ -0,0 +1,5 @@ +types: +- created +- deleted +- promote_to_enterprise +- updated diff --git a/example-configs/events/definitions/custom_property_values.yaml b/example-configs/events/definitions/custom_property_values.yaml new file mode 100644 index 0000000..2dd44c5 --- /dev/null +++ b/example-configs/events/definitions/custom_property_values.yaml @@ -0,0 +1,2 @@ +types: +- updated diff --git a/example-configs/events/definitions/delete.yaml b/example-configs/events/definitions/delete.yaml new file mode 100644 index 0000000..19765bd --- /dev/null +++ b/example-configs/events/definitions/delete.yaml @@ -0,0 +1 @@ +null diff --git a/example-configs/events/definitions/dependabot_alert.yaml b/example-configs/events/definitions/dependabot_alert.yaml new file mode 100644 index 0000000..dbecd72 --- /dev/null +++ b/example-configs/events/definitions/dependabot_alert.yaml @@ -0,0 +1,8 @@ +types: +- auto_dismissed +- auto_reopened +- created +- dismissed +- fixed +- reintroduced +- reopened diff --git a/example-configs/events/definitions/deploy_key.yaml b/example-configs/events/definitions/deploy_key.yaml new file mode 100644 index 0000000..48954ee --- /dev/null +++ b/example-configs/events/definitions/deploy_key.yaml @@ -0,0 +1,3 @@ +types: +- created +- deleted diff --git a/example-configs/events/definitions/deployment.yaml b/example-configs/events/definitions/deployment.yaml new file mode 100644 index 0000000..19765bd --- /dev/null +++ b/example-configs/events/definitions/deployment.yaml @@ -0,0 +1 @@ +null diff --git a/example-configs/events/definitions/deployment_protection_rule.yaml b/example-configs/events/definitions/deployment_protection_rule.yaml new file mode 100644 index 0000000..0e5b744 --- /dev/null +++ b/example-configs/events/definitions/deployment_protection_rule.yaml @@ -0,0 +1,2 @@ +types: +- requested diff --git a/example-configs/events/definitions/deployment_review.yaml b/example-configs/events/definitions/deployment_review.yaml new file mode 100644 index 0000000..c0036ef --- /dev/null +++ b/example-configs/events/definitions/deployment_review.yaml @@ -0,0 +1,4 @@ +types: +- approved +- rejected +- requested diff --git a/example-configs/events/definitions/deployment_status.yaml b/example-configs/events/definitions/deployment_status.yaml new file mode 100644 index 0000000..19765bd --- /dev/null +++ b/example-configs/events/definitions/deployment_status.yaml @@ -0,0 +1 @@ +null diff --git a/example-configs/events/definitions/discussion.yaml b/example-configs/events/definitions/discussion.yaml new file mode 100644 index 0000000..8adb349 --- /dev/null +++ b/example-configs/events/definitions/discussion.yaml @@ -0,0 +1,13 @@ +types: +- created +- edited +- deleted +- transferred +- pinned +- unpinned +- locked +- unlocked +- labeled +- unlabeled +- answered +- unanswered diff --git a/example-configs/events/definitions/discussion_comment.yaml b/example-configs/events/definitions/discussion_comment.yaml new file mode 100644 index 0000000..9181f62 --- /dev/null +++ b/example-configs/events/definitions/discussion_comment.yaml @@ -0,0 +1,4 @@ +types: +- created +- edited +- deleted diff --git a/example-configs/events/definitions/fork.yaml b/example-configs/events/definitions/fork.yaml new file mode 100644 index 0000000..19765bd --- /dev/null +++ b/example-configs/events/definitions/fork.yaml @@ -0,0 +1 @@ +null diff --git a/example-configs/events/definitions/github_app_authorization.yaml b/example-configs/events/definitions/github_app_authorization.yaml new file mode 100644 index 0000000..7553b91 --- /dev/null +++ b/example-configs/events/definitions/github_app_authorization.yaml @@ -0,0 +1,2 @@ +types: +- revoked diff --git a/example-configs/events/definitions/gollum.yaml b/example-configs/events/definitions/gollum.yaml new file mode 100644 index 0000000..19765bd --- /dev/null +++ b/example-configs/events/definitions/gollum.yaml @@ -0,0 +1 @@ +null diff --git a/example-configs/events/definitions/installation.yaml b/example-configs/events/definitions/installation.yaml new file mode 100644 index 0000000..8afea98 --- /dev/null +++ b/example-configs/events/definitions/installation.yaml @@ -0,0 +1,6 @@ +types: +- created +- deleted +- new_permissions_accepted +- suspend +- unsuspend diff --git a/example-configs/events/definitions/installation_repositories.yaml b/example-configs/events/definitions/installation_repositories.yaml new file mode 100644 index 0000000..f3e3a63 --- /dev/null +++ b/example-configs/events/definitions/installation_repositories.yaml @@ -0,0 +1,3 @@ +types: +- added +- removed diff --git a/example-configs/events/definitions/installation_target.yaml b/example-configs/events/definitions/installation_target.yaml new file mode 100644 index 0000000..4916ad3 --- /dev/null +++ b/example-configs/events/definitions/installation_target.yaml @@ -0,0 +1,2 @@ +types: +- renamed diff --git a/example-configs/events/definitions/issue_comment.yaml b/example-configs/events/definitions/issue_comment.yaml new file mode 100644 index 0000000..9181f62 --- /dev/null +++ b/example-configs/events/definitions/issue_comment.yaml @@ -0,0 +1,4 @@ +types: +- created +- edited +- deleted diff --git a/example-configs/events/definitions/issue_dependencies.yaml b/example-configs/events/definitions/issue_dependencies.yaml new file mode 100644 index 0000000..cf5d435 --- /dev/null +++ b/example-configs/events/definitions/issue_dependencies.yaml @@ -0,0 +1,5 @@ +types: +- blocked_by_added +- blocked_by_removed +- blocking_added +- blocking_removed diff --git a/example-configs/events/definitions/issues.yaml b/example-configs/events/definitions/issues.yaml new file mode 100644 index 0000000..2e8682b --- /dev/null +++ b/example-configs/events/definitions/issues.yaml @@ -0,0 +1,19 @@ +types: +- opened +- closed +- reopened +- assigned +- unassigned +- labeled +- unlabeled +- edited +- milestoned +- demilestoned +- transferred +- deleted +- pinned +- unpinned +- locked +- unlocked +- typed +- untyped diff --git a/example-configs/events/definitions/label.yaml b/example-configs/events/definitions/label.yaml new file mode 100644 index 0000000..ba109ac --- /dev/null +++ b/example-configs/events/definitions/label.yaml @@ -0,0 +1,4 @@ +types: +- created +- deleted +- edited diff --git a/example-configs/events/definitions/marketplace_purchase.yaml b/example-configs/events/definitions/marketplace_purchase.yaml new file mode 100644 index 0000000..fa16d5f --- /dev/null +++ b/example-configs/events/definitions/marketplace_purchase.yaml @@ -0,0 +1,6 @@ +types: +- cancelled +- changed +- pending_change +- pending_change_cancelled +- purchased diff --git a/example-configs/events/definitions/member.yaml b/example-configs/events/definitions/member.yaml new file mode 100644 index 0000000..b8cc040 --- /dev/null +++ b/example-configs/events/definitions/member.yaml @@ -0,0 +1,4 @@ +types: +- added +- removed +- edited diff --git a/example-configs/events/definitions/membership.yaml b/example-configs/events/definitions/membership.yaml new file mode 100644 index 0000000..f3e3a63 --- /dev/null +++ b/example-configs/events/definitions/membership.yaml @@ -0,0 +1,3 @@ +types: +- added +- removed diff --git a/example-configs/events/definitions/merge_group.yaml b/example-configs/events/definitions/merge_group.yaml new file mode 100644 index 0000000..aa25b2c --- /dev/null +++ b/example-configs/events/definitions/merge_group.yaml @@ -0,0 +1,3 @@ +types: +- checks_requested +- destroyed diff --git a/example-configs/events/definitions/meta.yaml b/example-configs/events/definitions/meta.yaml new file mode 100644 index 0000000..277ed17 --- /dev/null +++ b/example-configs/events/definitions/meta.yaml @@ -0,0 +1,2 @@ +types: +- deleted diff --git a/example-configs/events/definitions/milestone.yaml b/example-configs/events/definitions/milestone.yaml new file mode 100644 index 0000000..e0540ef --- /dev/null +++ b/example-configs/events/definitions/milestone.yaml @@ -0,0 +1,6 @@ +types: +- created +- closed +- opened +- edited +- deleted diff --git a/example-configs/events/definitions/org_block.yaml b/example-configs/events/definitions/org_block.yaml new file mode 100644 index 0000000..3c7f5b1 --- /dev/null +++ b/example-configs/events/definitions/org_block.yaml @@ -0,0 +1,3 @@ +types: +- blocked +- unblocked diff --git a/example-configs/events/definitions/organization.yaml b/example-configs/events/definitions/organization.yaml new file mode 100644 index 0000000..0268d22 --- /dev/null +++ b/example-configs/events/definitions/organization.yaml @@ -0,0 +1,4 @@ +types: +- member_added +- member_removed +- member_invited diff --git a/example-configs/events/definitions/package.yaml b/example-configs/events/definitions/package.yaml new file mode 100644 index 0000000..999bcbf --- /dev/null +++ b/example-configs/events/definitions/package.yaml @@ -0,0 +1,3 @@ +types: +- published +- updated diff --git a/example-configs/events/definitions/page_build.yaml b/example-configs/events/definitions/page_build.yaml new file mode 100644 index 0000000..19765bd --- /dev/null +++ b/example-configs/events/definitions/page_build.yaml @@ -0,0 +1 @@ +null diff --git a/example-configs/events/definitions/personal_access_token_request.yaml b/example-configs/events/definitions/personal_access_token_request.yaml new file mode 100644 index 0000000..dc88ebc --- /dev/null +++ b/example-configs/events/definitions/personal_access_token_request.yaml @@ -0,0 +1,5 @@ +types: +- approved +- cancelled +- created +- denied diff --git a/example-configs/events/definitions/ping.yaml b/example-configs/events/definitions/ping.yaml new file mode 100644 index 0000000..19765bd --- /dev/null +++ b/example-configs/events/definitions/ping.yaml @@ -0,0 +1 @@ +null diff --git a/example-configs/events/definitions/project.yaml b/example-configs/events/definitions/project.yaml new file mode 100644 index 0000000..acf264d --- /dev/null +++ b/example-configs/events/definitions/project.yaml @@ -0,0 +1,6 @@ +types: +- created +- updated +- closed +- reopened +- deleted diff --git a/example-configs/events/definitions/project_card.yaml b/example-configs/events/definitions/project_card.yaml new file mode 100644 index 0000000..4274f30 --- /dev/null +++ b/example-configs/events/definitions/project_card.yaml @@ -0,0 +1,6 @@ +types: +- created +- moved +- converted +- edited +- deleted diff --git a/example-configs/events/definitions/project_column.yaml b/example-configs/events/definitions/project_column.yaml new file mode 100644 index 0000000..3670f1a --- /dev/null +++ b/example-configs/events/definitions/project_column.yaml @@ -0,0 +1,5 @@ +types: +- created +- updated +- moved +- deleted diff --git a/example-configs/events/definitions/projects_v2.yaml b/example-configs/events/definitions/projects_v2.yaml new file mode 100644 index 0000000..beb8022 --- /dev/null +++ b/example-configs/events/definitions/projects_v2.yaml @@ -0,0 +1,6 @@ +types: +- closed +- created +- deleted +- edited +- reopened diff --git a/example-configs/events/definitions/projects_v2_item.yaml b/example-configs/events/definitions/projects_v2_item.yaml new file mode 100644 index 0000000..ce15c91 --- /dev/null +++ b/example-configs/events/definitions/projects_v2_item.yaml @@ -0,0 +1,8 @@ +types: +- archived +- converted +- created +- deleted +- edited +- reordered +- restored diff --git a/example-configs/events/definitions/projects_v2_status_update.yaml b/example-configs/events/definitions/projects_v2_status_update.yaml new file mode 100644 index 0000000..ba109ac --- /dev/null +++ b/example-configs/events/definitions/projects_v2_status_update.yaml @@ -0,0 +1,4 @@ +types: +- created +- deleted +- edited diff --git a/example-configs/events/definitions/public.yaml b/example-configs/events/definitions/public.yaml new file mode 100644 index 0000000..19765bd --- /dev/null +++ b/example-configs/events/definitions/public.yaml @@ -0,0 +1 @@ +null diff --git a/example-configs/events/definitions/pull_request.yaml b/example-configs/events/definitions/pull_request.yaml new file mode 100644 index 0000000..fbc2b24 --- /dev/null +++ b/example-configs/events/definitions/pull_request.yaml @@ -0,0 +1,24 @@ +branches: +- '*' +types: +- opened +- closed +- reopened +- synchronize +- assigned +- unassigned +- labeled +- unlabeled +- review_requested +- review_request_removed +- ready_for_review +- converted_to_draft +- auto_merge_enabled +- auto_merge_disabled +- dequeued +- enqueued +- edited +- locked +- unlocked +- milestoned +- demilestoned diff --git a/example-configs/events/definitions/pull_request_review.yaml b/example-configs/events/definitions/pull_request_review.yaml new file mode 100644 index 0000000..2b34d74 --- /dev/null +++ b/example-configs/events/definitions/pull_request_review.yaml @@ -0,0 +1,4 @@ +types: +- submitted +- edited +- dismissed diff --git a/example-configs/events/definitions/pull_request_review_comment.yaml b/example-configs/events/definitions/pull_request_review_comment.yaml new file mode 100644 index 0000000..9181f62 --- /dev/null +++ b/example-configs/events/definitions/pull_request_review_comment.yaml @@ -0,0 +1,4 @@ +types: +- created +- edited +- deleted diff --git a/example-configs/events/definitions/pull_request_review_thread.yaml b/example-configs/events/definitions/pull_request_review_thread.yaml new file mode 100644 index 0000000..394e676 --- /dev/null +++ b/example-configs/events/definitions/pull_request_review_thread.yaml @@ -0,0 +1,3 @@ +types: +- resolved +- unresolved diff --git a/example-configs/events/definitions/push.yaml b/example-configs/events/definitions/push.yaml new file mode 100644 index 0000000..f3f7622 --- /dev/null +++ b/example-configs/events/definitions/push.yaml @@ -0,0 +1,2 @@ +branches: +- '*' diff --git a/example-configs/events/definitions/registry_package.yaml b/example-configs/events/definitions/registry_package.yaml new file mode 100644 index 0000000..999bcbf --- /dev/null +++ b/example-configs/events/definitions/registry_package.yaml @@ -0,0 +1,3 @@ +types: +- published +- updated diff --git a/example-configs/events/definitions/release.yaml b/example-configs/events/definitions/release.yaml new file mode 100644 index 0000000..0b906ce --- /dev/null +++ b/example-configs/events/definitions/release.yaml @@ -0,0 +1,8 @@ +types: +- published +- unpublished +- created +- edited +- deleted +- prereleased +- released diff --git a/example-configs/events/definitions/repository.yaml b/example-configs/events/definitions/repository.yaml new file mode 100644 index 0000000..ff069f4 --- /dev/null +++ b/example-configs/events/definitions/repository.yaml @@ -0,0 +1,10 @@ +types: +- created +- deleted +- archived +- unarchived +- edited +- renamed +- transferred +- publicized +- privatized diff --git a/example-configs/events/definitions/repository_advisory.yaml b/example-configs/events/definitions/repository_advisory.yaml new file mode 100644 index 0000000..56871e7 --- /dev/null +++ b/example-configs/events/definitions/repository_advisory.yaml @@ -0,0 +1,3 @@ +types: +- published +- reported diff --git a/example-configs/events/definitions/repository_dispatch.yaml b/example-configs/events/definitions/repository_dispatch.yaml new file mode 100644 index 0000000..19765bd --- /dev/null +++ b/example-configs/events/definitions/repository_dispatch.yaml @@ -0,0 +1 @@ +null diff --git a/example-configs/events/definitions/repository_import.yaml b/example-configs/events/definitions/repository_import.yaml new file mode 100644 index 0000000..19765bd --- /dev/null +++ b/example-configs/events/definitions/repository_import.yaml @@ -0,0 +1 @@ +null diff --git a/example-configs/events/definitions/repository_ruleset.yaml b/example-configs/events/definitions/repository_ruleset.yaml new file mode 100644 index 0000000..ba109ac --- /dev/null +++ b/example-configs/events/definitions/repository_ruleset.yaml @@ -0,0 +1,4 @@ +types: +- created +- deleted +- edited diff --git a/example-configs/events/definitions/repository_vulnerability_alert.yaml b/example-configs/events/definitions/repository_vulnerability_alert.yaml new file mode 100644 index 0000000..cfcb0f8 --- /dev/null +++ b/example-configs/events/definitions/repository_vulnerability_alert.yaml @@ -0,0 +1,5 @@ +types: +- create +- dismiss +- reopen +- resolve diff --git a/example-configs/events/definitions/secret_scanning_alert.yaml b/example-configs/events/definitions/secret_scanning_alert.yaml new file mode 100644 index 0000000..72a4790 --- /dev/null +++ b/example-configs/events/definitions/secret_scanning_alert.yaml @@ -0,0 +1,6 @@ +types: +- created +- publicly_leaked +- reopened +- resolved +- validated diff --git a/example-configs/events/definitions/secret_scanning_alert_location.yaml b/example-configs/events/definitions/secret_scanning_alert_location.yaml new file mode 100644 index 0000000..bdaafbb --- /dev/null +++ b/example-configs/events/definitions/secret_scanning_alert_location.yaml @@ -0,0 +1,2 @@ +types: +- created diff --git a/example-configs/events/definitions/secret_scanning_scan.yaml b/example-configs/events/definitions/secret_scanning_scan.yaml new file mode 100644 index 0000000..6cc154c --- /dev/null +++ b/example-configs/events/definitions/secret_scanning_scan.yaml @@ -0,0 +1,2 @@ +types: +- completed diff --git a/example-configs/events/definitions/security_advisory.yaml b/example-configs/events/definitions/security_advisory.yaml new file mode 100644 index 0000000..2c7df52 --- /dev/null +++ b/example-configs/events/definitions/security_advisory.yaml @@ -0,0 +1,4 @@ +types: +- published +- updated +- withdrawn diff --git a/example-configs/events/definitions/security_and_analysis.yaml b/example-configs/events/definitions/security_and_analysis.yaml new file mode 100644 index 0000000..19765bd --- /dev/null +++ b/example-configs/events/definitions/security_and_analysis.yaml @@ -0,0 +1 @@ +null diff --git a/example-configs/events/definitions/sponsorship.yaml b/example-configs/events/definitions/sponsorship.yaml new file mode 100644 index 0000000..3d9bc34 --- /dev/null +++ b/example-configs/events/definitions/sponsorship.yaml @@ -0,0 +1,7 @@ +types: +- cancelled +- created +- edited +- pending_cancellation +- pending_tier_change +- tier_changed diff --git a/example-configs/events/definitions/star.yaml b/example-configs/events/definitions/star.yaml new file mode 100644 index 0000000..48954ee --- /dev/null +++ b/example-configs/events/definitions/star.yaml @@ -0,0 +1,3 @@ +types: +- created +- deleted diff --git a/example-configs/events/definitions/status.yaml b/example-configs/events/definitions/status.yaml new file mode 100644 index 0000000..19765bd --- /dev/null +++ b/example-configs/events/definitions/status.yaml @@ -0,0 +1 @@ +null diff --git a/example-configs/events/definitions/sub_issues.yaml b/example-configs/events/definitions/sub_issues.yaml new file mode 100644 index 0000000..fcb8a2d --- /dev/null +++ b/example-configs/events/definitions/sub_issues.yaml @@ -0,0 +1,5 @@ +types: +- parent_issue_added +- parent_issue_removed +- sub_issue_added +- sub_issue_removed diff --git a/example-configs/events/definitions/team.yaml b/example-configs/events/definitions/team.yaml new file mode 100644 index 0000000..f742f3f --- /dev/null +++ b/example-configs/events/definitions/team.yaml @@ -0,0 +1,6 @@ +types: +- created +- deleted +- edited +- added_to_repository +- removed_from_repository diff --git a/example-configs/events/definitions/team_add.yaml b/example-configs/events/definitions/team_add.yaml new file mode 100644 index 0000000..19765bd --- /dev/null +++ b/example-configs/events/definitions/team_add.yaml @@ -0,0 +1 @@ +null diff --git a/example-configs/events/definitions/watch.yaml b/example-configs/events/definitions/watch.yaml new file mode 100644 index 0000000..e2c5640 --- /dev/null +++ b/example-configs/events/definitions/watch.yaml @@ -0,0 +1,2 @@ +types: +- started diff --git a/example-configs/events/definitions/workflow_dispatch.yaml b/example-configs/events/definitions/workflow_dispatch.yaml new file mode 100644 index 0000000..19765bd --- /dev/null +++ b/example-configs/events/definitions/workflow_dispatch.yaml @@ -0,0 +1 @@ +null diff --git a/example-configs/events/definitions/workflow_job.yaml b/example-configs/events/definitions/workflow_job.yaml new file mode 100644 index 0000000..6e631e7 --- /dev/null +++ b/example-configs/events/definitions/workflow_job.yaml @@ -0,0 +1,5 @@ +types: +- completed +- in_progress +- queued +- waiting diff --git a/example-configs/events/definitions/workflow_run.yaml b/example-configs/events/definitions/workflow_run.yaml new file mode 100644 index 0000000..8604d36 --- /dev/null +++ b/example-configs/events/definitions/workflow_run.yaml @@ -0,0 +1,4 @@ +types: +- completed +- requested +- in_progress diff --git a/example-configs/events/event_sets/all.yaml b/example-configs/events/event_sets/all.yaml new file mode 100644 index 0000000..f0c0239 --- /dev/null +++ b/example-configs/events/event_sets/all.yaml @@ -0,0 +1,77 @@ +branch_protection_configuration: null +branch_protection_rule: null +branches: null +check_run: null +check_suite: null +code_scanning_alert: null +commit_comment: null +create: null +custom_property: null +custom_property_values: null +delete: null +dependabot_alert: null +deploy_key: null +deployment: null +deployment_protection_rule: null +deployment_review: null +deployment_status: null +discussion: null +discussion_comment: null +fork: null +github_app_authorization: null +gollum: null +installation: null +installation_repositories: null +installation_target: null +issue_comment: null +issue_dependencies: null +issues: null +label: null +marketplace_purchase: null +member: null +membership: null +merge_group: null +meta: null +milestone: null +org_block: null +organization: null +package: null +page_build: null +personal_access_token_request: null +ping: null +project: null +project_card: null +project_column: null +projects_v2: null +projects_v2_item: null +projects_v2_status_update: null +public: null +pull_request: null +pull_request_review: null +pull_request_review_comment: null +pull_request_review_thread: null +push: null +registry_package: null +release: null +repository: null +repository_advisory: null +repository_dispatch: null +repository_import: null +repository_ruleset: null +repository_vulnerability_alert: null +secret_scanning_alert: null +secret_scanning_alert_location: null +secret_scanning_scan: null +security_advisory: null +security_and_analysis: null +sponsorship: null +star: null +status: null +sub_issues: null +team: null +team_add: null +types: null +watch: null +workflow_dispatch: null +workflow_job: null +workflow_run: null diff --git a/example-configs/events/event_sets/basic.yaml b/example-configs/events/event_sets/basic.yaml new file mode 100644 index 0000000..7be6c26 --- /dev/null +++ b/example-configs/events/event_sets/basic.yaml @@ -0,0 +1,10 @@ +discussion: null +discussion_comment: null +issue_comment: null +issues: null +package: null +pull_request: null +pull_request_review: null +pull_request_review_comment: null +push: null +release: null diff --git a/example-configs/events/event_sets/custom.yaml b/example-configs/events/event_sets/custom.yaml new file mode 100644 index 0000000..d17c76b --- /dev/null +++ b/example-configs/events/event_sets/custom.yaml @@ -0,0 +1,27 @@ +discussion: + types: + - created + - answered +issues: + types: + - opened + - closed + - reopened +pull_request: + branches: + - main + - develop + - release/* + types: + - opened + - closed + - reopened +push: + branches: + - main + - develop + - release/* +release: + types: + - published + - edited diff --git a/example-configs/events/event_sets/org.yaml b/example-configs/events/event_sets/org.yaml new file mode 100644 index 0000000..f13a525 --- /dev/null +++ b/example-configs/events/event_sets/org.yaml @@ -0,0 +1,20 @@ +organization: null +org_block: null +team: null +team_add: null +member: null +membership: null +repository: null +repository_vulnerability_alert: null +secret_scanning_alert: null +secret_scanning_alert_location: null +security_advisory: null +security_and_analysis: null +github_app_authorization: null +installation: null +installation_repositories: null +installation_target: null +marketplace_purchase: null +sponsorship: null +personal_access_token_request: null +meta: null diff --git a/example-configs/feishu-bots.yaml b/example-configs/feishu-bots.yaml deleted file mode 100644 index af67cc1..0000000 --- a/example-configs/feishu-bots.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# ========================================= -# feishu-bots.yaml -# ----------------------------------------- -# 存放所有飞书机器人的别名和Webhook URL -# 可在repos.yaml中通过alias引用 -# ========================================= - -feishu_bots: - - alias: "dev-team" # 可以在 repos.yaml 中通过该别名引用这个链接 - url: "https://open.feishu.cn/open-apis/bot/v2/hook/xxxxxxx" - - - alias: "ops-team" - url: "https://open.feishu.cn/open-apis/bot/v2/hook/yyyyyyy" - - - alias: "org-notify" - url: "https://open.feishu.cn/open-apis/bot/v2/hook/zzzzzzz" - - - alias: "org-cn-notify" - url: "https://open.feishu.cn/open-apis/bot/v2/hook/zzzzzzz" - template: "cn" diff --git a/example-configs/patterns/00-CompPsyUnion-motion-vote-backend.yaml b/example-configs/patterns/00-CompPsyUnion-motion-vote-backend.yaml new file mode 100644 index 0000000..8a944fb --- /dev/null +++ b/example-configs/patterns/00-CompPsyUnion-motion-vote-backend.yaml @@ -0,0 +1,16 @@ +pattern: CompPsyUnion/motion-vote-backend +events: + push: + branches: + - main + - develop + pull_request: + types: + - opened + - closed + - reopened + issues: null + release: null +notify_to: +- ops-team +- https://open.feishu.cn/open-apis/bot/v2/hook/zzzzzzz diff --git a/example-configs/patterns/01-CompPsyUnion-experimental-all.yaml b/example-configs/patterns/01-CompPsyUnion-experimental-all.yaml new file mode 100644 index 0000000..35d8a4d --- /dev/null +++ b/example-configs/patterns/01-CompPsyUnion-experimental-all.yaml @@ -0,0 +1,5 @@ +pattern: CompPsyUnion/experimental-* +events: + all: null +notify_to: +- dev-team diff --git a/example-configs/patterns/02-hnrobert-all.yaml b/example-configs/patterns/02-hnrobert-all.yaml new file mode 100644 index 0000000..0a3aba9 --- /dev/null +++ b/example-configs/patterns/02-hnrobert-all.yaml @@ -0,0 +1,5 @@ +pattern: hnrobert/* +events: + custom: null +notify_to: +- ops-team diff --git a/example-configs/patterns/03-all.yaml b/example-configs/patterns/03-all.yaml new file mode 100644 index 0000000..2dfab69 --- /dev/null +++ b/example-configs/patterns/03-all.yaml @@ -0,0 +1,6 @@ +pattern: '*' +events: + basic: null + project: null +notify_to: +- org-notify diff --git a/example-configs/repos.yaml b/example-configs/repos.yaml deleted file mode 100644 index b8e377a..0000000 --- a/example-configs/repos.yaml +++ /dev/null @@ -1,52 +0,0 @@ -# ========================================= -# repos.yaml -# ----------------------------------------- -# 用于定义组织/仓库与事件模板、通知对象的映射关系 -# 支持通配符,默认按顺序取首条匹配;server.match_all_rules: true 时会依次处理所有匹配规则 -# -# 可选:每条匹配可单独配置一个 `secret`,用于校验该 GitHub Webhook 的签名。 -# 留空则回退到 server.yaml 中的全局 `server.secret`。 -# 这样不同仓库/组织的 Webhook 可以使用各自独立的密钥。 -# ========================================= - -repos: - # 示例:针对特定项目定义更详细监听 - - pattern: "CompPsyUnion/motion-vote-backend" - events: - push: # 直接引用 events.yaml 中的事件 - branches: # 可以进一步细化,覆盖 events.yaml 中的默认配置 - - main - - develop - pull_request: # 同理 - types: - - opened - - closed - - reopened - issues: # 如果不细化,直接监听所有 types - release: - notify_to: - - ops-team # 引用 feishu-bots.yaml 的 alias. 引号可加可不加 - - "https://open.feishu.cn/open-apis/bot/v2/hook/zzzzzzz" # 这里是 dev-team, 但直接使用完整 URL 也可以。如有冲突 alias 优先 - # secret: "this-repo-only-secret" # 可选:仅校验该仓库 Webhook 的密钥;留空则用全局 server.secret - - # 示例:匹配实验性项目(使用 glob 模式) - - pattern: "CompPsyUnion/experimental-*" - events: - all: # 直接应用 event_sets: 中定义的的模板。如果有命名重合,优先使用自定义模板 - notify_to: - - dev-team # 引用 feishu-bots.yaml 的 alias - - # 示例:匹配所有个人项目 - - pattern: "hnrobert/*" - events: - custom: # 直接应用 event_sets: 中定义的的模板 - notify_to: - - ops-team # 引用 feishu-bots.yaml 的 alias - - # 示例:匹配所有仓库(放在最后,作为兜底配置,已经被匹配过的仓库会被拦截,不会用到这里) - - pattern: "*" - events: - basic: # 应用 events.yaml 内 event_sets: 中定义的的模板。可以理解将 basic 里的事件展开添加到该仓库监听 - project: # 也可以同时叠加更多事件。注意后添加的会覆盖先添加的的同类事件配置 - notify_to: - - org-notify # 引用 feishu-bots.yaml 的 alias diff --git a/example-configs/templates.cn.jsonc b/example-configs/templates.cn.jsonc deleted file mode 100644 index 58b951c..0000000 --- a/example-configs/templates.cn.jsonc +++ /dev/null @@ -1,14161 +0,0 @@ -// 中文模板配置文件 -// 此文件定义了所有 GitHub 事件的飞书消息卡片模板(中文版) -{ - "templates": { - "branch_protection_configuration": { - "payloads": [ - { - "tags": [ - "disabled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 分支保护配置 已禁用" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "enabled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 分支保护配置 已启用" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "branch_protection_rule": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🛡️ 分支保护{{action}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**规则:** {{rule_name}}\n**操作:** {{action}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 分支保护规则 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 分支保护规则 已删除" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 分支保护规则 已编辑" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "check_run": { - "payloads": [ - { - "tags": [ - "completed", - "success" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✅ 检查通过:{{check_run.name}}" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md | default('')}}**检查:** {{check_run.name}}\n\n**状态:** {{check_run.status}}\n**结果:** {{check_run.conclusion}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "completed", - "failure" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "❌ 检查失败:{{check_run.name}}" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md | default('')}}\n**检查:** {{check_run.name}}\n**状态:** {{check_run.status}}\n**结果:** {{check_run.conclusion}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✅ Check Run:{{check_run.name}} {{check_run.status}}" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md | default('')}}\n**检查:** {{check_run.name}}\n**状态:** {{check_run.status}}\n**结果:** {{check_run.conclusion}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 检查运行 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "requested_action" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 检查运行 已请求操作" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "rerequested" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 检查运行 已重新请求" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "check_suite": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🧪 Check Suite:{{action}}" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md | default('')}}\n**结果:** {{check_suite.conclusion | default('N/A')}}\n**提交:** {{check_suite.head_sha}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "completed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 检查套件 已完成" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "requested" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 检查套件 已请求" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "rerequested" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 检查套件 已重新请求" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "code_scanning_alert": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔍 代码扫描警告{{action}}" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**警告:** {{alert_rule_description}}\n**严重度:** {{alert_rule_severity}}\n**状态:** {{alert_state}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "appeared_in_branch" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 代码扫描警报 出现在分支" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "closed_by_user" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 代码扫描警报 被用户关闭" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 代码扫描警报 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "fixed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 代码扫描警报 已修复" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reopened" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 代码扫描警报 已重新打开" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reopened_by_user" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 代码扫描警报 被用户重新打开" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "commit_comment": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "💬 提交评论" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**提交:** {{commit_sha_short}}\n**作者:** {{sender_link_md}}\n**评论:** {{comment_body}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看评论" - }, - "url": "{{comment_html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 提交评论 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "create": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✨ 新创建:{{ref_type}} 在 {{repository.full_name}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**创建者:** {{sender_link_md | default(sender.login)}}\n**类型:** {{ref_type}} 名称: {{ref}}\n" - } - } - ] - } - } - } - ] - }, - "custom_property": { - "payloads": [ - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 自定义属性 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 自定义属性 已删除" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "promote_to_enterprise" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 自定义属性 提升至企业" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "updated" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 自定义属性 已更新" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "custom_property_values": { - "payloads": [ - { - "tags": [ - "updated" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 自定义属性值 已更新" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "delete": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🗑️ 删除:{{ref_type}} 在 {{repository.full_name}}" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**触发者:** {{sender_link_md | default(sender.login)}}\n**删除:** {{ref_type}} {{ref}}\n" - } - } - ] - } - } - } - ] - }, - "dependabot_alert": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🤖 Dependabot警告{{action}}" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**包:** {{alert_package_name}}\n**严重度:** {{alert_severity}}\n**状态:** {{alert_state}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "auto_dismissed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Dependabot 警报 自动驳回" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "auto_reopened" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Dependabot 警报 自动重新打开" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Dependabot 警报 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "dismissed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Dependabot 警报 已驳回" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "fixed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Dependabot 警报 已修复" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reintroduced" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Dependabot 警报 重新引入" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reopened" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Dependabot 警报 已重新打开" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "deploy_key": { - "payloads": [ - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 部署密钥 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 部署密钥 已删除" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "deployment": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🚢 部署:{{deployment.environment}}" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**应用:** {{deployment.ref}}\n**环境:** {{deployment.environment}}\n**发起人:** {{sender_link_md | default(sender.login)}}\n" - } - } - ] - } - } - } - ] - }, - "deployment_protection_rule": { - "payloads": [ - { - "tags": [ - "requested" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 部署保护规则 已请求" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "deployment_review": { - "payloads": [ - { - "tags": [ - "approved" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✅ 部署已批准" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**审核者:** {{sender_link_md}}\n**环境:** {{environment}}\n**评论:** {{comment}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "rejected" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "❌ 部署已拒绝" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**审核者:** {{sender_link_md}}\n**环境:** {{environment}}\n**评论:** {{comment}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 部署审核{{action}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**审核者:** {{sender_link_md}}\n**环境:** {{environment}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "requested" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 部署审查 已请求" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "deployment_status": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📣 部署状态:{{deployment_status.state}}" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**部署:** {{deployment.ref}}\n**状态:** {{deployment_status.state}}\n**描述:** {{deployment_status.description}}\n" - } - } - ] - } - } - } - ] - }, - "discussion": { - "payloads": [ - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "💬 新讨论已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**标题:** {{discussion.title}}\n**作者:** {{sender_link_md}}\n**分类:** {{discussion.category.name}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "{{discussion.body}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "参与讨论" - }, - "url": "{{discussion.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "answered" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✅ 讨论已被回答" - }, - "template": "purple" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**讨论:** {{discussion.title}}\n**回答者:** {{sender_link_md}}\n**分类:** {{discussion.category.name}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "此讨论已标记了答案" - } - ] - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看答案" - }, - "url": "{{discussion.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "locked" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔒 讨论已锁定" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**讨论:** {{discussion.title}}\n**锁定者:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "此讨论已被锁定" - } - ] - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看讨论" - }, - "url": "{{discussion.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unlocked" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "� 讨论已解锁" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**讨论:** {{discussion.title}}\n**解锁者:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "此讨论现已开放评论" - } - ] - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "参与讨论" - }, - "url": "{{discussion.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "closed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📋 讨论已关闭" - }, - "template": "grey" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**讨论:** {{discussion.title}}\n**关闭者:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看讨论" - }, - "url": "{{discussion.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "💬 讨论 {{action}}" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**讨论:** {{discussion.title}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}\n**分类:** {{discussion.category.name}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看讨论" - }, - "url": "{{discussion.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 discussion 已删除" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 discussion 已编辑" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "labeled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 discussion 已添加标签" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "pinned" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 discussion 已固定" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "transferred" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 discussion 已转移" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unanswered" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 discussion 未回答" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unlabeled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 discussion 已移除标签" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unpinned" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 discussion 已取消固定" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "discussion_comment": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "💬 讨论评论:{{discussion.title}}" - }, - "template": "teal" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**作者:** {{sender_link_md | default(sender.login)}}\n**讨论:** {{discussion.title}}\n**评论:** {{comment.body}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看评论" - }, - "url": "{{comment.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 discussion_comment 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 discussion_comment 已删除" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 discussion_comment 已编辑" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "fork": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🍴 Fork:{{forkee.full_name}}" - }, - "template": "purple" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Fork者:** {{sender_link_md | default(sender.login)}}\n**目标仓库:** {{forkee.full_name}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看Fork仓库" - }, - "url": "{{forkee.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - } - ] - }, - "github_app_authorization": { - "payloads": [ - { - "tags": [ - "revoked" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 github_app_authorization 已撤销" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "gollum": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📚 Wiki 更新:{{repository.full_name}}" - }, - "template": "gray" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**推送者:** {{sender_link_md | default(sender.login)}}\n**变更:** {{pages | length}} 个页面已更新\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看仓库" - }, - "url": "{{repository.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - } - ] - }, - "installation": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🤖 GitHub应用{{action}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**应用:** {{app_name}}\n**操作:** {{action}}\n**安装者:** {{sender_link_md}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 installation 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 installation 已删除" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "new_permissions_accepted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 installation 新权限已接受" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "suspend" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 installation 已暂停" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unsuspend" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 installation 已恢复" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "installation_repositories": { - "payloads": [ - { - "tags": [ - "added" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 installation_repositories 已添加" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "removed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 installation_repositories 已移除" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "installation_target": { - "payloads": [ - { - "tags": [ - "renamed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 installation_target 已重命名" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "issue_comment": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "💬 Issue 评论:#{{issue.number}}" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**作者:** {{sender_link_md | default(sender.login)}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**评论:** {{comment.body}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看评论" - }, - "url": "{{comment.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Issue 评论 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Issue 评论 已删除" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Issue 评论 已编辑" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "pull_request" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "💬 PR 评论:#{{issue.number}}" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**作者:** {{sender_link_md | default(sender.login)}}\n**Pull Request:** {{issue_link_md | default(issue.html_url | default(''))}}\n**评论:** {{comment.body}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看评论" - }, - "url": "{{comment.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created", - "pull_request" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 PR 评论 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted", - "pull_request" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 PR 评论 已删除" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited", - "pull_request" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 PR 评论 已编辑" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "issue_dependencies": { - "payloads": [ - { - "tags": [ - "blocked_by_added" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Issue 依赖 被阻止者已添加" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "blocked_by_removed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Issue 依赖 被阻止者已移除" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "blocking_added" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Issue 依赖 阻止者已添加" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "blocking_removed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Issue 依赖 阻止者已移除" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "issues": { - "payloads": [ - { - "tags": [ - "opened", - "type:bug" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🐛 Bug 报告:{{issue.title}}" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "🐛 **发现 Bug**,报告者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**描述:** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**标签:** {{issue_labels_joined}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 Bug" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "opened", - "type:feature" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✨ 新功能请求:{{issue.title}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "✨ **新功能请求**,创建者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**描述:** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**标签:** {{issue_labels_joined}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看功能" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "opened", - "type:task" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📋 任务创建:{{issue.title}}" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "📋 **任务创建**,创建者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**描述:** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**标签:** {{issue_labels_joined}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看任务" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "closed", - "type:bug" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✅ Bug 已修复:{{issue.title}}" - }, - "template": "purple" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "✅ **Bug 已修复**,操作者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**状态:** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**标签:** {{issue_labels_joined}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 Bug" - }, - "url": "{{issue.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "closed", - "type:feature" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✅ 功能已完成:{{issue.title}}" - }, - "template": "purple" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "✅ **功能已完成**,操作者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**状态:** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**标签:** {{issue_labels_joined}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看功能" - }, - "url": "{{issue.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "closed", - "type:task" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✅ 任务已完成:{{issue.title}}" - }, - "template": "purple" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "✅ **任务已完成**,操作者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**状态:** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**标签:** {{issue_labels_joined}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看任务" - }, - "url": "{{issue.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reopened", - "type:bug" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔄 Bug 已重新开启:{{issue.title}}" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "🔄 **Bug 已重新开启**,操作者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**标签:** {{issue_labels_joined}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 Bug" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reopened", - "type:feature" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔄 功能已重新开启:{{issue.title}}" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "🔄 **功能已重新开启**,操作者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**标签:** {{issue_labels_joined}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看功能" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reopened", - "type:task" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔄 任务已重新开启:{{issue.title}}" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "🔄 **任务已重新开启**,操作者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**标签:** {{issue_labels_joined}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看任务" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "opened" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📝 Issue 已开启:{{issue.title}}" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "📝 **Issue 已开启**,创建者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**描述:** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**标签:** {{issue_labels_joined}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "closed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✅ Issue 已关闭:{{issue.title}}" - }, - "template": "purple" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "✅ **Issue 已关闭**,操作者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**状态:** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**标签:** {{issue_labels_joined}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 Issue" - }, - "url": "{{issue.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reopened" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔄 Issue 已重新开启:{{issue.title}}" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "🔄 **Issue 已重新开启**,操作者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**标签:** {{issue_labels_joined}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "assigned" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "👤 Issue 已分配:{{issue.title}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "👤 **Issue 已分配**,操作者:{{sender_link_md | default(sender.login)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if assignee_link_md}}**分配给:** {{assignee_link_md}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unassigned" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "👤 Issue 已取消分配:{{issue.title}}" - }, - "template": "grey" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "👤 **Issue 已取消分配**,操作者:{{sender_link_md | default(sender.login)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if assignee_link_md}}**移除分配:** {{assignee_link_md}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 Issue" - }, - "url": "{{issue.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✏️ Issue 已编辑:{{issue.title}}" - }, - "template": "grey" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "✏️ **Issue 已编辑**,操作者:{{sender_link_md | default(sender.login)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if changes_title_from}}**标题改自:** {{changes_title_from}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 Issue" - }, - "url": "{{issue.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "milestoned" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🎯 里程碑已添加:{{issue.title}}" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "🎯 **里程碑已添加**,操作者:{{sender_link_md | default(sender.login)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if milestone_title}}**里程碑:** {{milestone_title}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "demilestoned" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🎯 里程碑已移除:{{issue.title}}" - }, - "template": "grey" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "🎯 **里程碑已移除**,操作者:{{sender_link_md | default(sender.login)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if milestone_title}}**移除里程碑:** {{milestone_title}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 Issue" - }, - "url": "{{issue.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "transferred" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📦 Issue 已转移:{{issue.title}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "📦 **Issue 已转移**,操作者:{{sender_link_md | default(sender.login)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if changes_new_repository_full_name}}**转移到仓库:** {{changes_new_repository_full_name}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🗑️ Issue 已删除:{{issue.title}}" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "🗑️ **Issue 已删除**,操作者:{{sender_link_md | default(sender.login)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" - } - } - ] - } - } - }, - { - "tags": [ - "pinned" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📌 Issue 已置顶:{{issue.title}}" - }, - "template": "yellow" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "📌 **Issue 已置顶**,操作者:{{sender_link_md | default(sender.login)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unpinned" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📌 Issue 已取消置顶:{{issue.title}}" - }, - "template": "grey" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "📌 **Issue 已取消置顶**,操作者:{{sender_link_md | default(sender.login)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 Issue" - }, - "url": "{{issue.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "locked" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔒 Issue 已锁定:{{issue.title}}" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "🔒 **Issue 已锁定**,操作者:{{sender_link_md | default(sender.login)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.active_lock_reason}}**原因:** {{issue.active_lock_reason}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 Issue" - }, - "url": "{{issue.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unlocked" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔓 Issue 已解锁:{{issue.title}}" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "🔓 **Issue 已解锁**,操作者:{{sender_link_md | default(sender.login)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "labeled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🏷️ 标签已添加:{{labeled_label_name}} - {{issue.title}}" - }, - "template": "teal" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**标签:** {{labeled_label_link_md | default(labeled_label_name)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**操作者:** {{sender_link_md | default(sender.login)}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unlabeled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🏷️ 标签已移除:{{labeled_label_name}} - {{issue.title}}" - }, - "template": "grey" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**标签:** {{labeled_label_link_md | default(labeled_label_name)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**操作者:** {{sender_link_md | default(sender.login)}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 Issue" - }, - "url": "{{issue.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "typed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✏️ Issue 已设置类型:{{issue.title}}" - }, - "template": "yellow" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "✏️ **Issue 已设置类型**,操作者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_type}}**类型:** {{issue_type}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "untyped" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✏️ Issue 类型已移除:{{issue.title}}" - }, - "template": "grey" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "✏️ **Issue 类型已移除**,操作者:{{sender_link_md | default(sender.login)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 Issue" - }, - "url": "{{issue.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "type:bug" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🐞 Bug:{{issue.title}}" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "🐛 **发现 Bug**,报告者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "type:feature" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✨ Feature:{{issue.title}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "✨ **功能需求**,提出者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "type:task" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📝 任务:{{issue.title}}" - }, - "template": "yellow" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "📝 **任务**,创建者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "type:unknown" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "⚠️ Issue:{{issue.title}}" - }, - "template": "yellow" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "⚠️ **Issue**,创建者:{{sender_link_md | default(sender.login)}} {{issue_type_display | default(issue_user_link_md | default(''))}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📝 Issue:{{issue.title}}" - }, - "template": "gray" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**作者:** {{sender_link_md | default(sender.login)}}\n**状态:** {{issue.state | default('unknown')}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - } - ] - }, - "label": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🏷️ 标签{{action}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**标签:** {{label_name}}\n**操作:** {{action}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 标签 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 标签 已删除" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 标签 已编辑" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "marketplace_purchase": { - "payloads": [ - { - "tags": [ - "cancelled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 市场购买 已取消" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "changed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 市场购买 已变更" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "pending_change" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 市场购买 待变更" - }, - "template": "yellow" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "pending_change_cancelled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 市场购买 待变更项目已取消" - }, - "template": "yellow" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "purchased" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 市场购买 已购买" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "member": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "👤 成员事件:{{action}} {{member.login}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**成员:** {{member.login}}\n**操作:** {{action}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "added" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 成员 已添加" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 成员 已编辑" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "removed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 成员 已移除" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "membership": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "➕ 成员加入/移除:{{action}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**成员:** {{member.user.login}}\n**操作:** {{action}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "added" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 成员资格 已添加" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "removed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 成员资格 已移除" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "merge_group": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔀 合并队列{{action}}" - }, - "template": "purple" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**头部SHA:** {{merge_group_head_sha}}\n**操作:** {{action}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "checks_requested" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 合并组 已请求检查" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "destroyed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 合并组 已销毁" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "meta": { - "payloads": [ - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 元数据 已删除" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "milestone": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🏁 里程碑:{{action}} {{milestone.title}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**里程碑:** {{milestone.title}}\n**描述:** {{milestone.description}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "closed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 里程碑 已关闭" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 里程碑 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 里程碑 已删除" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 里程碑 已编辑" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "opened" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 里程碑 已打开" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "org_block": { - "payloads": [ - { - "tags": [ - "blocked" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 组织封禁 已封禁" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unblocked" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 组织封禁 已解除封禁" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "organization": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🏢 组织成员变更:{{action}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**组织:** {{organization.login}}\n**成员:** {{membership.user.login | default('N/A')}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "member_added" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 组织 成员已添加" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "member_invited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 组织 成员已邀请" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "member_removed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 组织 成员已移除" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "package": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📦 包事件:{{action}} {{package.name | default('package')}}" - }, - "template": "purple" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**包名:** {{package_link_md | default(package.name)}}\n**操作:** {{action}}\n**类型:** {{package.package_type | default('')}}\n**版本/Tag:** {{package.version | default('')}} {{package_tag_name | default(package.tag_name | default(''))}}\n**发布者:** {{sender_link_md | default(pusher_link_md | default(''))}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "published" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 package 已发布" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "updated" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 package 已更新" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "page_build": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📄 页面构建:{{action}}" - }, - "template": "grey" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository.full_name}}\n**操作:** {{action}}\n" - } - } - ] - } - } - } - ] - }, - "personal_access_token_request": { - "payloads": [ - { - "tags": [ - "approved" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 个人访问令牌请求 已批准" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "cancelled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 个人访问令牌请求 已取消" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 个人访问令牌请求 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "denied" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 个人访问令牌请求 denied" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "ping": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✅ GitHub Webhook 添加成功" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**GitHub 寄语:** {{zen}}\n\n{{#if repository}}**仓库:** [{{repository.full_name}}]({{repository.html_url}})\n{{/if}}{{#if organization}}**组织:** [{{organization.login}}](https:\/\/github.com/{{organization.login}})\n{{/if}}**Hook ID:** {{hook_id}}\n**Hook 类型:** {{hook_type}}" // fuck jsonc - } - } - ] - } - } - } - ] - }, - "project": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📋 项目:{{action}} {{project.name}}" - }, - "template": "brown" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**项目:** {{project.name}}\n**操作:** {{action}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "closed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目 已关闭" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目 已删除" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reopened" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目 已重新打开" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "updated" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目 已更新" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "project_card": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🃏 项目卡片:{{action}}" - }, - "template": "brown" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**卡片:** {{project_card.note | default('无注释')}}\n**操作:** {{action}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "converted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目卡片 已转换" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目卡片 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目卡片 已删除" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目卡片 已编辑" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "moved" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目卡片 已移动" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "project_column": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📐 项目列:{{action}}" - }, - "template": "brown" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**列名:** {{project_column.name}}\n**操作:** {{action}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目列 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目列 已删除" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "moved" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目列 已移动" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "updated" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目列 已更新" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "projects_v2": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📋 项目{{action}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**项目:** {{project_title}}\n**操作:** {{action}}\n**创建者:** {{sender_link_md}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "closed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目 V2 已关闭" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目 V2 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目 V2 已删除" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目 V2 已编辑" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reopened" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目 V2 已重新打开" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "projects_v2_item": { - "payloads": [ - { - "tags": [ - "archived" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目 V2 条目 已归档" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "converted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目 V2 条目 已转换" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目 V2 条目 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目 V2 条目 已删除" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目 V2 条目 已编辑" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reordered" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目 V2 条目 已重新排序" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "restored" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目 V2 条目 已恢复" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "projects_v2_status_update": { - "payloads": [ - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目 V2 状态更新 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目 V2 状态更新 已删除" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 项目 V2 状态更新 已编辑" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "public": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🌐 仓库公开:{{repository.full_name}}" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库已公开:** {{repository.full_name}}\n" - } - } - ] - } - } - } - ] - }, - "pull_request": { - "payloads": [ - { - "tags": [ - "closed", - "merged" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔮 Pull Request 已合并" - }, - "template": "purple" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**合并者:** {{sender_link_md}}\n**分支:** {{pr_head_branch_link_md}} → {{pr_base_branch_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "{{pr_body}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 PR" - }, - "url": "{{pr_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "closed", - "unmerged" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "❌ Pull Request 关闭(未合并)" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**关闭者:** {{sender_link_md}}\n**分支:** {{pr_head_branch_link_md}} → {{pr_base_branch_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "此 PR 未合并即关闭" - } - ] - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 PR" - }, - "url": "{{pr_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "opened" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔀 新 Pull Request 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**作者:** {{pr_user_link_md}}\n**分支:** {{pr_head_branch_link_md}} → {{pr_base_branch_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "{{pr_body}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "审查 PR" - }, - "url": "{{pr_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reopened" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔄 Pull Request 已重新打开" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**重新打开者:** {{sender_link_md}}\n**分支:** {{pr_head_branch_link_md}} → {{pr_base_branch_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 PR" - }, - "url": "{{pr_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "synchronize" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔄 Pull Request 已更新" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**更新者:** {{sender_link_md}}\n**分支:** {{pr_head_branch_link_md}} → {{pr_base_branch_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "新提交已推送到此 PR" - } - ] - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看变更" - }, - "url": "{{pr_url}}/files", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "ready_for_review" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✅ Pull Request 已准备好审查" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**作者:** {{pr_user_link_md}}\n**分支:** {{pr_head_branch_link_md}} → {{pr_base_branch_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "此 PR 已准备好接受审查" - } - ] - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "立即审查" - }, - "url": "{{pr_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "converted_to_draft" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📝 Pull Request 已转为草稿" - }, - "template": "grey" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**转换者:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "此 PR 现在处于草稿模式" - } - ] - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 PR" - }, - "url": "{{pr_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "review_requested" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "👁️ 请求审查" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**请求者:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "审查 PR" - }, - "url": "{{pr_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔀 Pull Request {{action}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看 PR" - }, - "url": "{{pr_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "assigned" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 pull_request 已分配" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "auto_merge_disabled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 pull_request auto_merge_disabled" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "auto_merge_enabled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 pull_request auto_merge_enabled" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "demilestoned" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 pull_request 已移除里程碑" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "dequeued" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 pull_request dequeued" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 pull_request 已编辑" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "enqueued" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 pull_request enqueued" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "labeled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 pull_request 已添加标签" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "locked" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 pull_request 已锁定" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "milestoned" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 pull_request 已添加里程碑" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "review_request_removed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 pull_request review_request_removed" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unassigned" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 pull_request 已取消分配" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unlabeled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 pull_request 已移除标签" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unlocked" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 pull_request 已解锁" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "pull_request_review": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📝 PR 审查 {{action}}:#{{pull_request.number}}" - }, - "template": "cyan" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**审查者:** {{review_user_link_md | default(review.user.login)}}\n**PR:** #{{pull_request.number}} {{pull_request.title}}\n**结果:** {{review.state}}\n{{review.body}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看审查" - }, - "url": "{{review.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "dismissed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 pull_request_review 已驳回" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 pull_request_review 已编辑" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "submitted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 pull_request_review 已提交" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "pull_request_review_comment": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "💬 PR 审查评论:#{{pull_request.number}}" - }, - "template": "cyan" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**作者:** {{sender_link_md | default(sender.login)}}\n**PR:** #{{pull_request.number}}\n**评论:** {{comment.body}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看评论" - }, - "url": "{{comment.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 pull_request_review_comment 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 pull_request_review_comment 已删除" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 pull_request_review_comment 已编辑" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "pull_request_review_thread": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "💬 PR审核讨论{{action}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**PR:** #{{pull_request.number}} {{pull_request.title}}\n**讨论:** {{thread_comments | length}} 条评论\n**操作:** {{action}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "resolved" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 pull_request_review_thread 已解决" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unresolved" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 pull_request_review_thread unresolved" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "push": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "💾 新推送:{{repository.full_name}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "{{pusher_link_md | default(pusher.name)}} 推送了 {{commits | length}} 个提交到分支 **{{branch_name}}** {{branch_link_md | default('')}}\n{{repository_link_md | default('')}} {{branch_link_md | default('')}}\n\n**提交信息:**\n{{commit_messages_joined | default(commit_message | default(pull_request.body | default('无提交信息'))) }}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看提交详情" - }, - "url": "{{compare_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "force" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🚨 强制推送:{{repository.full_name}}" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**检测到强制推送**,操作人:{{sender_link_md | default(sender.login)}},分支:**{{branch_name}}** {{branch_link_md | default('')}}\n可能已重写历史。提交数:{{commits | length}}\n{{repository_link_md | default('')}} {{branch_link_md | default('')}}\n\n**提交信息:**\n{{commit_messages_joined | default(commit_message | default('无提交信息')) }}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看提交详情" - }, - "url": "{{compare_url}}", - "type": "primary" - } - ] - } - ] - } - } - } - ] - }, - "registry_package": { - "payloads": [ - { - "tags": [ - "published" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "� 注册表包已发布" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**包名:** {{package_name}}\n**类型:** {{package_type | upper}}\n**版本:** {{package_version}}\n**发布者:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看包" - }, - "url": "{{repository.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "updated" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 仓库包 已更新" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**包名:** {{package_name}}\n**类型:** {{package_type | upper}}\n**版本:** {{package_version}}\n**更新者:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "release": { - "payloads": [ - { - "tags": [ - "published" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🚀 版本已发布" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**版本:** {{release.tag_name}}\n**发布名称:** {{release.name}}\n**发布者:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "{{release.body}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看发布" - }, - "url": "{{release.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "prereleased" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔶 预发布版本已发布" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**版本:** {{release.tag_name}}\n**发布名称:** {{release.name}}\n**发布者:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "⚠️ 这是一个预发布版本" - } - ] - }, - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "{{release.body}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看预发布" - }, - "url": "{{release.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📝 草稿发布已创建" - }, - "template": "grey" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**版本:** {{release.tag_name}}\n**发布名称:** {{release.name}}\n**创建者:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "这是一个草稿发布(尚未发布)" - } - ] - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看草稿" - }, - "url": "{{release.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🗑️ 发布已删除" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**版本:** {{release.tag_name}}\n**删除者:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "此发布已被删除" - } - ] - } - ] - } - } - }, - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🚀 发布 {{action}}" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**版本:** {{release.tag_name}}\n**发布名称:** {{release.name}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看发布" - }, - "url": "{{release.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 release 已编辑" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "released" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 release released" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unpublished" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 release unpublished" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "repository": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🏷️ 仓库变更:{{repository.full_name}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**操作:** {{action}}\n**仓库:** {{repository.full_name}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看仓库" - }, - "url": "{{repository.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "archived" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 仓库 已归档" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 仓库 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 仓库 已删除" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 仓库 已编辑" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "privatized" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 仓库 已私有化" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "publicized" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 仓库 已公开" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "renamed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 仓库 已重命名" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "transferred" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 仓库 已转移" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unarchived" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 仓库 已取消归档" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "repository_advisory": { - "payloads": [ - { - "tags": [ - "published" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 仓库公告 已发布" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reported" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 仓库公告 已报告" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "repository_dispatch": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 仓库调度" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "repository_import": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 仓库导入" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "repository_ruleset": { - "payloads": [ - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 仓库规则集 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 仓库规则集 已删除" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 仓库规则集 已编辑" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "repository_vulnerability_alert": { - "payloads": [ - { - "tags": [ - "create" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 仓库漏洞警报 创建" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "dismiss" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 仓库漏洞警报 驳回" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reopen" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 仓库漏洞警报 重新打开" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "resolve" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 仓库漏洞警报 解决" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "secret_scanning_alert": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔐 密钥扫描警告{{action}}" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**密钥类型:** {{alert_secret_type}}\n**状态:** {{alert_state}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 密钥扫描警报 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "publicly_leaked" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 密钥扫描警报 公开泄露" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reopened" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 密钥扫描警报 已重新打开" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "resolved" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 密钥扫描警报 已解决" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "validated" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 密钥扫描警报 已验证" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "secret_scanning_alert_location": { - "payloads": [ - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 密钥扫描警报位置 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "secret_scanning_scan": { - "payloads": [ - { - "tags": [ - "completed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 密钥扫描 已完成" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "security_advisory": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔒 安全通告:{{action}}" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**通告:** {{security_advisory.summary | default('详情请查看安全通告')}}\n**严重度:** {{security_advisory.severity | default('N/A')}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "published" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 安全公告 已发布" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "updated" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 安全公告 已更新" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "withdrawn" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 安全公告 已撤回" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "security_and_analysis": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 安全与分析" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "sponsorship": { - "payloads": [ - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "💖 新赞助者!" - }, - "template": "pink" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**赞助者:** {{sponsor_login}}\n**等级:** {{tier_name}}\n**金额:** ${{tier_monthly_price_in_dollars}}/月\n" - } - } - ] - } - } - }, - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "💖 赞助{{action}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**赞助者:** {{sponsor_login}}\n**操作:** {{action}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "cancelled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 赞助 已取消" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 赞助 已编辑" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "pending_cancellation" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 赞助 待取消" - }, - "template": "yellow" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "pending_tier_change" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 赞助 待变更等级" - }, - "template": "yellow" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "tier_changed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 赞助 等级已变更" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "star": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "⭐ {{action}} by {{sender_name | default(sender.login)}}" - }, - "template": "yellow" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository.full_name}}\n**操作:** {{action}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 星标 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 星标 已删除" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "status": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔁 状态更新:{{state}}" - }, - "template": "gray" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository.full_name}}\n**操作:** {{action}}\n" - } - } - ] - } - } - } - ] - }, - "sub_issues": { - "payloads": [ - { - "tags": [ - "parent_issue_added" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 子 Issue 父 Issue 已添加" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "parent_issue_removed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 子 Issue 父 Issue 已移除" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "sub_issue_added" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 子 Issue 子 Issue 已添加" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "sub_issue_removed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 子 Issue 子 Issue 已移除" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "team": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "👥 团队事件:{{action}} {{team.name}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**团队:** {{team.name}}\n**操作:** {{action}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "added_to_repository" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 团队 已添加到仓库" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 团队 已创建" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 团队 已删除" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 团队 已编辑" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "removed_from_repository" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 团队 已从仓库移除" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "team_add": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 团队添加" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "watch": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 来自 {{sender_name | default(sender.login)}} 的关注:{{action}}" - }, - "template": "yellow" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository.full_name}}\n**操作:** {{action}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "started" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 关注 已开始" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "workflow_dispatch": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 工作流调度" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "workflow_job": { - "payloads": [ - { - "tags": [ - "completed", - "success" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✅ 任务成功:{{job_name}}" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**任务:** {{job_name}}\n**工作流:** {{workflow_name}}\n**状态:** {{job_status}}\n**结果:** {{job_conclusion}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看任务" - }, - "url": "{{job_html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "completed", - "failure" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "❌ 任务失败:{{job_name}}" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**任务:** {{job_name}}\n**工作流:** {{workflow_name}}\n**状态:** {{job_status}}\n**结果:** {{job_conclusion}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看任务" - }, - "url": "{{job_html_url}}", - "type": "danger" - } - ] - } - ] - } - } - }, - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "⚙️ 任务{{action}}:{{job_name}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**任务:** {{job_name}}\n**工作流:** {{workflow_name}}\n**状态:** {{job_status}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "in_progress" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 工作流作业 进行中" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "queued" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 工作流作业 已排队" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "waiting" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 工作流作业 等待中" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "workflow_run": { - "payloads": [ - { - "tags": [ - "completed", - "success" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✅ 工作流执行成功" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**工作流:** {{workflow.name}}\n**运行编号:** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**分支:** {{workflow_run.head_branch}}\n**触发者:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "✅ 所有检查已通过" - } - ] - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看运行" - }, - "url": "{{workflow_run.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "completed", - "failure" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "❌ 工作流执行失败" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**工作流:** {{workflow.name}}\n**运行编号:** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**分支:** {{workflow_run.head_branch}}\n**触发者:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "❌ 工作流执行失败" - } - ] - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看日志" - }, - "url": "{{workflow_run.html_url}}", - "type": "danger" - } - ] - } - ] - } - } - }, - { - "tags": [ - "completed", - "cancelled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "⚠️ 工作流已取消" - }, - "template": "yellow" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**工作流:** {{workflow.name}}\n**运行编号:** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**分支:** {{workflow_run.head_branch}}\n**取消者:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "此工作流运行已被取消" - } - ] - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看运行" - }, - "url": "{{workflow_run.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "in_progress" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "⏳ 工作流运行中" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**工作流:** {{workflow.name}}\n**运行编号:** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**分支:** {{workflow_run.head_branch}}\n**触发者:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "⏳ 工作流正在运行中..." - } - ] - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看进度" - }, - "url": "{{workflow_run.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "⚙️ 工作流 {{action}}" - }, - "template": "purple" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**工作流:** {{workflow.name}}\n**运行编号:** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**状态:** {{workflow_run.conclusion | default(workflow_run.status)}}\n**操作:** {{action}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看运行" - }, - "url": "{{workflow_run.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "requested" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 workflow_run 已请求" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "查看详情" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - } - } -} diff --git a/example-configs/templates.jsonc b/example-configs/templates.jsonc deleted file mode 100644 index ba04c8e..0000000 --- a/example-configs/templates.jsonc +++ /dev/null @@ -1,14204 +0,0 @@ -// Template configuration file -// This file defines all Feishu message card templates for GitHub events (English version) -{ - "templates": { - "branch_protection_configuration": { - "payloads": [ - { - "tags": [ - "disabled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Branch Protection Configuration Disabled" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "enabled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Branch Protection Configuration Enabled" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "branch_protection_rule": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🛡️ Branch Protection {{action}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Rule:** {{rule_name}}\n**Action:** {{action}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Branch Protection Rule Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Branch Protection Rule Deleted" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Branch Protection Rule Edited" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "check_run": { - "payloads": [ - { - "tags": [ - "completed", - "success" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✅ Check Succeeded: {{check_run.name}}" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md | default('')}}\n**Check:** {{check_run.name}}\n**Status:** {{check_run.status}}\n**Conclusion:** {{check_run.conclusion}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "completed", - "failure" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "❌ Check Failed: {{check_run.name}}" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "Repository:** {{repository_link_md | default('')}}\n**Check:** {{check_run.name}}\n****Status:** {{check_run.status}}\n**Conclusion:** {{check_run.conclusion}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✅ Check Run: {{check_run.name}} {{check_run.status}}" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "Repository:** {{repository_link_md | default('')}}\n**Check:** {{check_run.name}}\n****Status:** {{check_run.status}}\n**Conclusion:** {{check_run.conclusion}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Check Run Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "requested_action" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Check Run Requested Action" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "rerequested" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Check Run Rerequested" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "check_suite": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🧪 Check Suite: {{action}}" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md | default('')}}\n**Conclusion:** {{check_suite.conclusion | default('N/A')}}\n**Head SHA:** {{check_suite.head_sha}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "completed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Check Suite Completed" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "requested" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Check Suite Requested" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "rerequested" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Check Suite Rerequested" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "code_scanning_alert": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔍 Code Scanning Alert {{action}}" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Alert:** {{alert_rule_description}}\n**Severity:** {{alert_rule_severity}}\n**State:** {{alert_state}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "appeared_in_branch" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Code Scanning Alert Appeared In Branch" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "closed_by_user" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Code Scanning Alert Closed By User" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Code Scanning Alert Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "fixed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Code Scanning Alert Fixed" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reopened" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Code Scanning Alert Reopened" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reopened_by_user" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Code Scanning Alert Reopened By User" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "commit_comment": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "💬 Commit Comment" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Commit:** {{commit_sha_short}}\n**Author:** {{sender_link_md}}\n**Comment:** {{comment_body}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Comment" - }, - "url": "{{comment_html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Commit Comment Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "create": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✨ Created: {{ref_type}} in {{repository.full_name}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Creator:** {{sender_link_md | default(sender.login)}}\n**Type:** {{ref_type}} Name: {{ref}}\n" - } - } - ] - } - } - } - ] - }, - "custom_property": { - "payloads": [ - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Custom Property Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Custom Property Deleted" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "promote_to_enterprise" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Custom Property Promote To Enterprise" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "updated" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Custom Property Updated" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "custom_property_values": { - "payloads": [ - { - "tags": [ - "updated" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Custom Property Values Updated" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "delete": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🗑️ Deleted: {{ref_type}} in {{repository.full_name}}" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Actor:** {{sender_link_md | default(sender.login)}}\n**Deleted:** {{ref_type}} {{ref}}\n" - } - } - ] - } - } - } - ] - }, - "dependabot_alert": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🤖 Dependabot Alert {{action}}" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Package:** {{alert_package_name}}\n**Severity:** {{alert_severity}}\n**State:** {{alert_state}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "auto_dismissed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Dependabot Alert Auto Dismissed" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "auto_reopened" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Dependabot Alert Auto Reopened" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Dependabot Alert Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "dismissed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Dependabot Alert Dismissed" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "fixed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Dependabot Alert Fixed" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reintroduced" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Dependabot Alert Reintroduced" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reopened" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Dependabot Alert Reopened" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "deploy_key": { - "payloads": [ - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Deploy Key Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Deploy Key Deleted" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "deployment": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🚢 Deployment: {{deployment.environment}}" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Ref:** {{deployment.ref}}\n**Environment:** {{deployment.environment}}\n**Actor:** {{sender_link_md | default(sender.login)}}\n" - } - } - ] - } - } - } - ] - }, - "deployment_protection_rule": { - "payloads": [ - { - "tags": [ - "requested" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Deployment Protection Rule Requested" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "deployment_review": { - "payloads": [ - { - "tags": [ - "approved" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✅ Deployment Approved" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Reviewer:** {{sender_link_md}}\n**Environment:** {{environment}}\n**Comment:** {{comment}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "rejected" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "❌ Deployment Rejected" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Reviewer:** {{sender_link_md}}\n**Environment:** {{environment}}\n**Comment:** {{comment}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Deployment Review {{action}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Reviewer:** {{sender_link_md}}\n**Environment:** {{environment}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "requested" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Deployment Review Requested" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "deployment_status": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📣 Deployment status: {{deployment_status.state}}" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Ref:** {{deployment.ref}}\n**State:** {{deployment_status.state}}\n**Description:** {{deployment_status.description}}\n" - } - } - ] - } - } - } - ] - }, - "discussion": { - "payloads": [ - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "💬 New Discussion Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Title:** {{discussion.title}}\n**Author:** {{sender_link_md}}\n**Category:** {{discussion.category.name}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "{{discussion.body}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "Join Discussion" - }, - "url": "{{discussion.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "answered" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✅ Discussion Answered" - }, - "template": "purple" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Discussion:** {{discussion.title}}\n**Answered by:** {{sender_link_md}}\n**Category:** {{discussion.category.name}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "An answer has been marked for this discussion" - } - ] - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Answer" - }, - "url": "{{discussion.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "locked" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔒 Discussion Locked" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Discussion:** {{discussion.title}}\n**Locked by:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "This discussion has been locked" - } - ] - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Discussion" - }, - "url": "{{discussion.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unlocked" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔓 Discussion Unlocked" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Discussion:** {{discussion.title}}\n**Unlocked by:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "This discussion is now open for comments" - } - ] - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "Join Discussion" - }, - "url": "{{discussion.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "closed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📋 Discussion Closed" - }, - "template": "grey" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Discussion:** {{discussion.title}}\n**Closed by:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Discussion" - }, - "url": "{{discussion.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "💬 Discussion {{action}}" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Discussion:** {{discussion.title}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}\n**Category:** {{discussion.category.name}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Discussion" - }, - "url": "{{discussion.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Discussion Deleted" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Discussion Edited" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "labeled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Discussion Labeled" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "pinned" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Discussion Pinned" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "transferred" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Discussion Transferred" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unanswered" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Discussion Unanswered" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unlabeled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Discussion Unlabeled" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unpinned" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Discussion Unpinned" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "discussion_comment": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "💬 Discussion Comment: {{discussion.title}}" - }, - "template": "teal" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Author:** {{sender_link_md | default(sender.login)}}\n**Discussion:** {{discussion.title}}\n**Comment:** {{comment.body}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Comment" - }, - "url": "{{comment.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Discussion Comment Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Discussion Comment Deleted" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Discussion Comment Edited" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "fork": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🍴 Fork: {{forkee.full_name}}" - }, - "template": "purple" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Forked repo to:** {{forkee.full_name}}\n**Forker:** {{sender_link_md | default(sender.login)}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View fork" - }, - "url": "{{forkee.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - } - ] - }, - "github_app_authorization": { - "payloads": [ - { - "tags": [ - "revoked" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Github App Authorization Revoked" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "gollum": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📚 Wiki Update: {{repository.full_name}}" - }, - "template": "gray" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Pusher:** {{sender_link_md | default(sender.login)}}\n**Changes:** {{pages | length}} pages updated\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View repo" - }, - "url": "{{repository.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - } - ] - }, - "installation": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🤖 GitHub App {{action}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**App:** {{app_name}}\n**Action:** {{action}}\n**Installer:** {{sender_link_md}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Installation Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Installation Deleted" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "new_permissions_accepted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Installation New Permissions Accepted" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "suspend" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Installation Suspend" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unsuspend" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Installation Unsuspend" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "installation_repositories": { - "payloads": [ - { - "tags": [ - "added" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Installation Repositories Added" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "removed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Installation Repositories Removed" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "installation_target": { - "payloads": [ - { - "tags": [ - "renamed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Installation Target Renamed" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "issue_comment": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "💬 Issue Comment: #{{issue.number}}" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Author:** {{sender_link_md | default(sender.login)}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**Comment:** {{comment.body}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Comment" - }, - "url": "{{comment.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Issue Comment Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Issue Comment Deleted" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Issue Comment Edited" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "pull_request" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "💬 PR Comment: #{{issue.number}}" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Author:** {{sender_link_md | default(sender.login)}}\n**Pull Request:** {{issue_link_md | default(issue.html_url | default(''))}}\n**Comment:** {{comment.body}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Comment" - }, - "url": "{{comment.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created", - "pull_request" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 PR Comment Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted", - "pull_request" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 PR Comment Deleted" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited", - "pull_request" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 PR Comment Edited" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "issue_dependencies": { - "payloads": [ - { - "tags": [ - "blocked_by_added" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Issue Dependencies Blocked By Added" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "blocked_by_removed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Issue Dependencies Blocked By Removed" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "blocking_added" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Issue Dependencies Blocking Added" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "blocking_removed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Issue Dependencies Blocking Removed" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "issues": { - "payloads": [ - { - "tags": [ - "opened", - "type:bug" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🐛 Bug reported: {{issue.title}}" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "🐛 **Bug reported** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**Description:** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Bug" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "opened", - "type:feature" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✨ Feature request: {{issue.title}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "✨ **Feature request** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**Description:** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Feature" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "opened", - "type:task" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📋 Task created: {{issue.title}}" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "📋 **Task created** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**Description:** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Task" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "closed", - "type:bug" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✅ Bug fixed: {{issue.title}}" - }, - "template": "purple" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "✅ **Bug fixed** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**State:** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Bug" - }, - "url": "{{issue.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "closed", - "type:feature" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✅ Feature completed: {{issue.title}}" - }, - "template": "purple" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "✅ **Feature completed** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**State:** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Feature" - }, - "url": "{{issue.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "closed", - "type:task" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✅ Task completed: {{issue.title}}" - }, - "template": "purple" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "✅ **Task completed** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**State:** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Task" - }, - "url": "{{issue.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reopened", - "type:bug" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔄 Bug reopened: {{issue.title}}" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "🔄 **Bug reopened** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Bug" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reopened", - "type:feature" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔄 Feature reopened: {{issue.title}}" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "🔄 **Feature reopened** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Feature" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reopened", - "type:task" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔄 Task reopened: {{issue.title}}" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "🔄 **Task reopened** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Task" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "opened" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📝 Issue opened: {{issue.title}}" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "📝 **Issue opened** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**Description:** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "closed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✅ Issue closed: {{issue.title}}" - }, - "template": "purple" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "✅ **Issue closed** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**State:** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Issue" - }, - "url": "{{issue.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reopened" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔄 Issue reopened: {{issue.title}}" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "🔄 **Issue reopened** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "assigned" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "👤 Issue assigned: {{issue.title}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "👤 **Issue assigned** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if assignee_link_md}}**Assignee:** {{assignee_link_md}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unassigned" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "👤 Issue unassigned: {{issue.title}}" - }, - "template": "grey" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "👤 **Issue unassigned** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if assignee_link_md}}**Removed assignee:** {{assignee_link_md}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Issue" - }, - "url": "{{issue.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✏️ Issue edited: {{issue.title}}" - }, - "template": "grey" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "✏️ **Issue edited** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if changes_title_from}}**Title changed from:** {{changes_title_from}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Issue" - }, - "url": "{{issue.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "milestoned" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🎯 Milestone added: {{issue.title}}" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "🎯 **Milestone added** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if milestone_title}}**Milestone:** {{milestone_title}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "demilestoned" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🎯 Milestone removed: {{issue.title}}" - }, - "template": "grey" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "🎯 **Milestone removed** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if milestone_title}}**Removed milestone:** {{milestone_title}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Issue" - }, - "url": "{{issue.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "transferred" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📦 Issue transferred: {{issue.title}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "📦 **Issue transferred** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if changes_new_repository_full_name}}**To repository:** {{changes_new_repository_full_name}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🗑️ Issue deleted: {{issue.title}}" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "🗑️ **Issue deleted** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" - } - } - ] - } - } - }, - { - "tags": [ - "pinned" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📌 Issue pinned: {{issue.title}}" - }, - "template": "yellow" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "📌 **Issue pinned** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unpinned" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📌 Issue unpinned: {{issue.title}}" - }, - "template": "grey" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "📌 **Issue unpinned** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Issue" - }, - "url": "{{issue.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "locked" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔒 Issue locked: {{issue.title}}" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "🔒 **Issue locked** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.active_lock_reason}}**Reason:** {{issue.active_lock_reason}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Issue" - }, - "url": "{{issue.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unlocked" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔓 Issue unlocked: {{issue.title}}" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "🔓 **Issue unlocked** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "labeled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🏷️ Label added: {{labeled_label_name}} on {{issue.title}}" - }, - "template": "teal" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Label:** {{labeled_label_link_md | default(labeled_label_name)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**By:** {{sender_link_md | default(sender.login)}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unlabeled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🏷️ Label removed: {{labeled_label_name}} from {{issue.title}}" - }, - "template": "grey" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Label:** {{labeled_label_link_md | default(labeled_label_name)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**By:** {{sender_link_md | default(sender.login)}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Issue" - }, - "url": "{{issue.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "typed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✏️ Issue typed: {{issue.title}}" - }, - "template": "yellow" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "✏️ **Issue typed** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_type}}**Type:** {{issue_type}}{{/if}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "untyped" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✏️ Issue type removed: {{issue.title}}" - }, - "template": "grey" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "✏️ **Issue type removed** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Issue" - }, - "url": "{{issue.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "type:bug" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🐞 Bug: {{issue.title}}" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "🐛 **Bug reported** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "type:feature" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✨ Feature: {{issue.title}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "✨ **Feature request** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "type:task" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📝 Task: {{issue.title}}" - }, - "template": "yellow" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "📝 **Task created** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "type:unknown" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "⚠️ Issue: {{issue.title}}" - }, - "template": "yellow" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "⚠️ **Issue** by {{sender_link_md | default(sender.login)}} {{issue_type_display | default(issue_user_link_md | default(''))}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "labeled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🏷️ Label added: {{labeled_label_name}} on {{issue.title}}" - }, - "template": "teal" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**Label:** {{labeled_label_link_md | default(labeled_label_name)}}\n**By:** {{sender_link_md | default(sender.login)}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📝 Issue: {{issue.title}}" - }, - "template": "gray" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**Author:** {{sender_link_md | default(sender.login)}}\n**State:** {{issue.state | default('unknown')}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Issue" - }, - "url": "{{issue.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - } - ] - }, - "label": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🏷️ Label {{action}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Label:** {{label_name}}\n**Action:** {{action}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Label Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Label Deleted" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Label Edited" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "marketplace_purchase": { - "payloads": [ - { - "tags": [ - "cancelled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Marketplace Purchase Cancelled" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "changed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Marketplace Purchase Changed" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "pending_change" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Marketplace Purchase Pending Change" - }, - "template": "yellow" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "pending_change_cancelled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Marketplace Purchase Pending Change Cancelled" - }, - "template": "yellow" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "purchased" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Marketplace Purchase Purchased" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "member": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "👤 Member event: {{action}} {{member.login}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Member:** {{member.login}}\n**Action:** {{action}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "added" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Member Added" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Member Edited" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "removed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Member Removed" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "membership": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "➕ Membership: {{action}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Member:** {{member.user.login}}\n**Action:** {{action}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "added" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Membership Added" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "removed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Membership Removed" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "merge_group": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔀 Merge Queue {{action}}" - }, - "template": "purple" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Head SHA:** {{merge_group_head_sha}}\n**Action:** {{action}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "checks_requested" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Merge Group Checks Requested" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "destroyed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Merge Group Destroyed" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "meta": { - "payloads": [ - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Meta Deleted" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "milestone": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🏁 Milestone: {{action}} {{milestone.title}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Milestone:** {{milestone.title}}\n**Description:** {{milestone.description}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "closed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Milestone Closed" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Milestone Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Milestone Deleted" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Milestone Edited" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "opened" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Milestone Opened" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "org_block": { - "payloads": [ - { - "tags": [ - "blocked" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Org Block Blocked" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unblocked" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Org Block Unblocked" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "organization": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🏢 Organization change: {{action}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Organization:** {{organization.login}}\n**Member:** {{membership.user.login | default('N/A')}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "member_added" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Organization Member Added" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "member_invited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Organization Member Invited" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "member_removed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Organization Member Removed" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "package": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📦 Package: {{action}} {{package.name | default('package')}}" - }, - "template": "purple" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Package:** {{package_link_md | default(package.name)}}\n**Action:** {{action}}\n**Type:** {{package.package_type | default('')}}\n**Version/Tag:** {{package.version | default('')}} {{package_tag_name | default(package.tag_name | default(''))}}\n**Published by:** {{sender_link_md | default(pusher_link_md | default(''))}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "published" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Package Published" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "updated" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Package Updated" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "page_build": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📄 Page Build: {{action}}" - }, - "template": "gray" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository.full_name}}\n**Action:** {{action}}\n" - } - } - ] - } - } - } - ] - }, - "personal_access_token_request": { - "payloads": [ - { - "tags": [ - "approved" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Personal Access Token Request Approved" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "cancelled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Personal Access Token Request Cancelled" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Personal Access Token Request Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "denied" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Personal Access Token Request Denied" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "ping": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✅ GitHub Webhook Successfully Added" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**GitHub says:** {{zen}}\n\n{{#if repository}}**Repository:** [{{repository.full_name}}]({{repository.html_url}})\n{{/if}}{{#if organization}}**Organization:** [{{organization.login}}](https:\/\/github.com/{{organization.login}})\n{{/if}}**Hook ID:** {{hook_id}}\n**Hook Type:** {{hook_type}}" // fuck jsonc - } - } - ] - } - } - } - ] - }, - "project": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📋 Project: {{action}} {{project.name}}" - }, - "template": "brown" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Project:** {{project.name}}\n**Action:** {{action}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "closed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Project Closed" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Project Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Project Deleted" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reopened" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Project Reopened" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "updated" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Project Updated" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "project_card": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🃏 Project Card: {{action}}" - }, - "template": "brown" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Card:** {{project_card.note | default('No note')}}\n**Action:** {{action}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "converted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Project Card Converted" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Project Card Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Project Card Deleted" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Project Card Edited" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "moved" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Project Card Moved" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "project_column": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📐 Project Column: {{action}}" - }, - "template": "brown" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Column:** {{project_column.name}}\n**Action:** {{action}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Project Column Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Project Column Deleted" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "moved" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Project Column Moved" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "updated" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Project Column Updated" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "projects_v2": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📋 Project {{action}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Project:** {{project_title}}\n**Action:** {{action}}\n**Creator:** {{sender_link_md}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "closed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Projects V2 Closed" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Projects V2 Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Projects V2 Deleted" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Projects V2 Edited" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reopened" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Projects V2 Reopened" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "projects_v2_item": { - "payloads": [ - { - "tags": [ - "archived" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Projects V2 Item Archived" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "converted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Projects V2 Item Converted" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Projects V2 Item Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Projects V2 Item Deleted" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Projects V2 Item Edited" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reordered" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Projects V2 Item Reordered" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "restored" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Projects V2 Item Restored" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "projects_v2_status_update": { - "payloads": [ - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Projects V2 Status Update Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Projects V2 Status Update Deleted" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Projects V2 Status Update Edited" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "public": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🌐 Repository made public: {{repository.full_name}}" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository.full_name}} is now public\n" - } - } - ] - } - } - } - ] - }, - "pull_request": { - "payloads": [ - { - "tags": [ - "closed", - "merged" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔮 Pull Request Merged" - }, - "template": "purple" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Merged by:** {{sender_link_md}}\n**Branch:** {{pr_head_branch_link_md}} → {{pr_base_branch_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "{{pr_body}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View PR" - }, - "url": "{{pr_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "closed", - "unmerged" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "❌ Pull Request Closed (Not Merged)" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Closed by:** {{sender_link_md}}\n**Branch:** {{pr_head_branch_link_md}} → {{pr_base_branch_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "This PR was closed without merging" - } - ] - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View PR" - }, - "url": "{{pr_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "opened" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔀 New Pull Request Opened" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Author:** {{pr_user_link_md}}\n**Branch:** {{pr_head_branch_link_md}} → {{pr_base_branch_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "{{pr_body}}" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "Review PR" - }, - "url": "{{pr_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reopened" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔄 Pull Request Reopened" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Reopened by:** {{sender_link_md}}\n**Branch:** {{pr_head_branch_link_md}} → {{pr_base_branch_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View PR" - }, - "url": "{{pr_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "synchronize" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔄 Pull Request Updated" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Updated by:** {{sender_link_md}}\n**Branch:** {{pr_head_branch_link_md}} → {{pr_base_branch_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "New commits pushed to this PR" - } - ] - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Changes" - }, - "url": "{{pr_url}}/files", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "ready_for_review" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✅ Pull Request Ready for Review" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Author:** {{pr_user_link_md}}\n**Branch:** {{pr_head_branch_link_md}} → {{pr_base_branch_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "This PR is ready for review" - } - ] - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "Review Now" - }, - "url": "{{pr_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "converted_to_draft" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📝 Pull Request Converted to Draft" - }, - "template": "grey" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Converted by:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "This PR is now in draft mode" - } - ] - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View PR" - }, - "url": "{{pr_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "review_requested" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "👁️ Review Requested" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Requested by:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "Review PR" - }, - "url": "{{pr_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔀 Pull Request {{action}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View PR" - }, - "url": "{{pr_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "assigned" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Pull Request Assigned" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "auto_merge_disabled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Pull Request Auto Merge Disabled" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "auto_merge_enabled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Pull Request Auto Merge Enabled" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "demilestoned" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Pull Request Demilestoned" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "dequeued" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Pull Request Dequeued" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Pull Request Edited" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "enqueued" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Pull Request Enqueued" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "labeled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Pull Request Labeled" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "locked" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Pull Request Locked" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "milestoned" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Pull Request Milestoned" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "review_request_removed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Pull Request Review Request Removed" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unassigned" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Pull Request Unassigned" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unlabeled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Pull Request Unlabeled" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unlocked" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Pull Request Unlocked" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "pull_request_review": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📝 PR Review {{action}}: #{{pull_request.number}}" - }, - "template": "cyan" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Reviewer:** {{review_user_link_md | default(review.user.login)}}\n**PR:** #{{pull_request.number}} {{pull_request.title}}\n**Conclusion:** {{review.state}}\n{{review.body}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Review" - }, - "url": "{{review.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "dismissed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Pull Request Review Dismissed" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Pull Request Review Edited" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "submitted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Pull Request Review Submitted" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "pull_request_review_comment": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "💬 PR Review Comment: #{{pull_request.number}}" - }, - "template": "cyan" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Author:** {{sender_link_md | default(sender.login)}}\n**PR:** #{{pull_request.number}}\n**Comment:** {{comment.body}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Comment" - }, - "url": "{{comment.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Pull Request Review Comment Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Pull Request Review Comment Deleted" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Pull Request Review Comment Edited" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "pull_request_review_thread": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "💬 PR Review Thread {{action}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**PR:** #{{pull_request.number}} {{pull_request.title}}\n**Thread:** {{thread_comments | length}} comments\n**Action:** {{action}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "resolved" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Pull Request Review Thread Resolved" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unresolved" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Pull Request Review Thread Unresolved" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "push": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "💾 New Push: {{repository.full_name}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "{{pusher_link_md | default(pusher.name)}} pushed {{commits | length}} commits to **{{branch_name}}**\n\n**Repository:** {{repository_link_md | default('')}} · {{branch_link_md | default('')}}\n\n**Commit messages:**\n{{commit_messages_joined | default(commit_message | default(pull_request.body | default('No commit messages'))) }}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View commits" - }, - "url": "{{compare_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "force" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🚨 Force Push: {{repository.full_name}}" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Force push detected** by {{sender_link_md | default(sender.login)}} on **{{branch_name}}**\nThis may have rewritten history. Commits: {{commits | length}}\n\n**Repository:** {{repository_link_md | default('')}} · {{branch_link_md | default('')}}\n\n**Commit messages:**\n{{commit_messages_joined | default(commit_message | default('No commit messages')) }}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View commits" - }, - "url": "{{compare_url}}", - "type": "primary" - } - ] - } - ] - } - } - } - ] - }, - "registry_package": { - "payloads": [ - { - "tags": [ - "published" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Registry Package Published" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Package:** {{package_name}}\n**Type:** {{package_type | upper}}\n**Version:** {{package_version}}\n**Published by:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Package" - }, - "url": "{{repository.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "updated" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "� Registry Package Updated" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Package:** {{package_name}}\n**Type:** {{package_type | upper}}\n**Version:** {{package_version}}\n**Updated by:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Package" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "release": { - "payloads": [ - { - "tags": [ - "published" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🚀 Release Published" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Version:** {{release.tag_name}}\n**Release Name:** {{release.name}}\n**Published by:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "{{release.body}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Release" - }, - "url": "{{release.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "prereleased" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔶 Pre-release Published" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Version:** {{release.tag_name}}\n**Release Name:** {{release.name}}\n**Published by:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "⚠️ This is a pre-release version" - } - ] - }, - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "{{release.body}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Pre-release" - }, - "url": "{{release.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "📝 Release Draft Created" - }, - "template": "grey" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Version:** {{release.tag_name}}\n**Release Name:** {{release.name}}\n**Created by:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "This is a draft release (not published yet)" - } - ] - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Draft" - }, - "url": "{{release.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🗑️ Release Deleted" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Version:** {{release.tag_name}}\n**Deleted by:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "This release has been deleted" - } - ] - } - ] - } - } - }, - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🚀 Release {{action}}" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Version:** {{release.tag_name}}\n**Release Name:** {{release.name}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Release" - }, - "url": "{{release.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Release Edited" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "released" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Release Released" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unpublished" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Release Unpublished" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "repository": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🏷️ Repository change: {{repository.full_name}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository.full_name}}\n**Action:** {{action}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View repo" - }, - "url": "{{repository.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "archived" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Repository Archived" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Repository Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Repository Deleted" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Repository Edited" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "privatized" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Repository Privatized" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "publicized" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Repository Publicized" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "renamed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Repository Renamed" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "transferred" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Repository Transferred" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "unarchived" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Repository Unarchived" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "repository_advisory": { - "payloads": [ - { - "tags": [ - "published" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Repository Advisory Published" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reported" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Repository Advisory Reported" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "repository_dispatch": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Repository Dispatch Event" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "repository_import": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Repository Import Event" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "repository_ruleset": { - "payloads": [ - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Repository Ruleset Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Repository Ruleset Deleted" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Repository Ruleset Edited" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "repository_vulnerability_alert": { - "payloads": [ - { - "tags": [ - "create" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Repository Vulnerability Alert Create" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "dismiss" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Repository Vulnerability Alert Dismiss" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reopen" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Repository Vulnerability Alert Reopen" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "resolve" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Repository Vulnerability Alert Resolve" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "secret_scanning_alert": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔐 Secret Scanning Alert {{action}}" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Secret Type:** {{alert_secret_type}}\n**State:** {{alert_state}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Secret Scanning Alert Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "publicly_leaked" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Secret Scanning Alert Publicly Leaked" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "reopened" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Secret Scanning Alert Reopened" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "resolved" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Secret Scanning Alert Resolved" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "validated" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Secret Scanning Alert Validated" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "secret_scanning_alert_location": { - "payloads": [ - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Secret Scanning Alert Location Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "secret_scanning_scan": { - "payloads": [ - { - "tags": [ - "completed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Secret Scanning Scan Completed" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "security_advisory": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔒 Security Advisory: {{action}}" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Summary:** {{security_advisory.summary | default('See advisory for details')}}\n**Severity:** {{security_advisory.severity | default('N/A')}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "published" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Security Advisory Published" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "updated" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Security Advisory Updated" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "withdrawn" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Security Advisory Withdrawn" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "security_and_analysis": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Security And Analysis Event" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "sponsorship": { - "payloads": [ - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "💖 New Sponsor!" - }, - "template": "pink" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Sponsor:** {{sponsor_login}}\n**Tier:** {{tier_name}}\n**Amount:** ${{tier_monthly_price_in_dollars}}/month\n" - } - } - ] - } - } - }, - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "💖 Sponsorship {{action}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Sponsor:** {{sponsor_login}}\n**Action:** {{action}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "cancelled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Sponsorship Cancelled" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Sponsorship Edited" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "pending_cancellation" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Sponsorship Pending Cancellation" - }, - "template": "yellow" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "pending_tier_change" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Sponsorship Pending Tier Change" - }, - "template": "yellow" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "tier_changed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Sponsorship Tier Changed" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "star": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "⭐ {{action}} by {{sender_name | default(sender.login)}}" - }, - "template": "yellow" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository.full_name}}\n**Action:** {{action}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Star Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Star Deleted" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "status": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔁 Status update: {{state}}" - }, - "template": "gray" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Context:** {{context}}\n**State:** {{state}}\n" - } - } - ] - } - } - } - ] - }, - "sub_issues": { - "payloads": [ - { - "tags": [ - "parent_issue_added" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Sub Issues Parent Issue Added" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "parent_issue_removed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Sub Issues Parent Issue Removed" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "sub_issue_added" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Sub Issues Sub Issue Added" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "sub_issue_removed" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Sub Issues Sub Issue Removed" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "team": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "👥 Team event: {{action}} {{team.name}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Team:** {{team.name}}\n**Action:** {{action}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "added_to_repository" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Team Added To Repository" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "created" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Team Created" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "deleted" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Team Deleted" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "edited" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Team Edited" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "removed_from_repository" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Team Removed From Repository" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "team_add": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Team Add Event" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "watch": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Watch: {{action}} by {{sender_name | default(sender.login)}}" - }, - "template": "yellow" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository.full_name}}\n**Action:** {{action}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "started" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Watch Started" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "workflow_dispatch": { - "payloads": [ - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Workflow Dispatch Event" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "workflow_job": { - "payloads": [ - { - "tags": [ - "completed", - "success" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✅ Job succeeded: {{job_name}}" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Job:** {{job_name}}\n**Workflow:** {{workflow_name}}\n**Status:** {{job_status}}\n**Conclusion:** {{job_conclusion}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Job" - }, - "url": "{{job_html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "completed", - "failure" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "❌ Job failed: {{job_name}}" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Job:** {{job_name}}\n**Workflow:** {{workflow_name}}\n**Status:** {{job_status}}\n**Conclusion:** {{job_conclusion}}\n" - } - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Job" - }, - "url": "{{job_html_url}}", - "type": "danger" - } - ] - } - ] - } - } - }, - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "⚙️ Job {{action}}: {{job_name}}" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Job:** {{job_name}}\n**Workflow:** {{workflow_name}}\n**Status:** {{job_status}}\n" - } - } - ] - } - } - }, - { - "tags": [ - "in_progress" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Workflow Job In Progress" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "queued" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Workflow Job Queued" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "waiting" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Workflow Job Waiting" - }, - "template": "turquoise" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - }, - "workflow_run": { - "payloads": [ - { - "tags": [ - "completed", - "success" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "✅ Workflow Succeeded" - }, - "template": "green" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Workflow:** {{workflow.name}}\n**Run #:** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**Branch:** {{workflow_run.head_branch}}\n**Triggered by:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "✅ All checks passed" - } - ] - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Run" - }, - "url": "{{workflow_run.html_url}}", - "type": "primary" - } - ] - } - ] - } - } - }, - { - "tags": [ - "completed", - "failure" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "❌ Workflow Failed" - }, - "template": "red" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Workflow:** {{workflow.name}}\n**Run #:** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**Branch:** {{workflow_run.head_branch}}\n**Triggered by:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "❌ Workflow execution failed" - } - ] - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Logs" - }, - "url": "{{workflow_run.html_url}}", - "type": "danger" - } - ] - } - ] - } - } - }, - { - "tags": [ - "completed", - "cancelled" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "⚠️ Workflow Cancelled" - }, - "template": "yellow" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Workflow:** {{workflow.name}}\n**Run #:** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**Branch:** {{workflow_run.head_branch}}\n**Cancelled by:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "This workflow run was cancelled" - } - ] - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Run" - }, - "url": "{{workflow_run.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "in_progress" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "⏳ Workflow Running" - }, - "template": "blue" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Workflow:** {{workflow.name}}\n**Run #:** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**Branch:** {{workflow_run.head_branch}}\n**Triggered by:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "note", - "elements": [ - { - "tag": "plain_text", - "content": "⏳ Workflow is currently running..." - } - ] - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "Watch Progress" - }, - "url": "{{workflow_run.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "default" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "⚙️ Workflow {{action}}" - }, - "template": "purple" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Workflow:** {{workflow.name}}\n**Run #:** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**Status:** {{workflow_run.conclusion | default(workflow_run.status)}}\n**Action:** {{action}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Run" - }, - "url": "{{workflow_run.html_url}}", - "type": "default" - } - ] - } - ] - } - } - }, - { - "tags": [ - "requested" - ], - "payload": { - "msg_type": "interactive", - "card": { - "config": { - "wide_screen_mode": true - }, - "header": { - "title": { - "tag": "plain_text", - "content": "🔔 Workflow Run Requested" - }, - "template": "orange" - }, - "elements": [ - { - "tag": "div", - "text": { - "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" - } - }, - { - "tag": "hr" - }, - { - "tag": "action", - "actions": [ - { - "tag": "button", - "text": { - "tag": "plain_text", - "content": "View Details" - }, - "url": "{{repository.html_url}}", - "type": "default" - } - ] - } - ] - } - } - } - ] - } - } -} diff --git a/example-configs/templates/cn/branch_protection_configuration.json b/example-configs/templates/cn/branch_protection_configuration.json new file mode 100644 index 0000000..71ef4cf --- /dev/null +++ b/example-configs/templates/cn/branch_protection_configuration.json @@ -0,0 +1,96 @@ +{ + "payloads": [ + { + "tags": [ + "disabled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5206\u652f\u4fdd\u62a4\u914d\u7f6e \u5df2\u7981\u7528" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "enabled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5206\u652f\u4fdd\u62a4\u914d\u7f6e \u5df2\u542f\u7528" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/branch_protection_rule.json b/example-configs/templates/cn/branch_protection_rule.json new file mode 100644 index 0000000..df93309 --- /dev/null +++ b/example-configs/templates/cn/branch_protection_rule.json @@ -0,0 +1,171 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udee1\ufe0f \u5206\u652f\u4fdd\u62a4{{action}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u89c4\u5219\uff1a** {{rule_name}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5206\u652f\u4fdd\u62a4\u89c4\u5219 \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5206\u652f\u4fdd\u62a4\u89c4\u5219 \u5df2\u5220\u9664" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5206\u652f\u4fdd\u62a4\u89c4\u5219 \u5df2\u7f16\u8f91" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/check_run.json b/example-configs/templates/cn/check_run.json new file mode 100644 index 0000000..512ebf5 --- /dev/null +++ b/example-configs/templates/cn/check_run.json @@ -0,0 +1,231 @@ +{ + "payloads": [ + { + "tags": [ + "completed", + "success" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2705 \u68c0\u67e5\u901a\u8fc7\uff1a{{check_run.name}}" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md | default('')}}**\u68c0\u67e5\uff1a** {{check_run.name}}\n\n**\u72b6\u6001\uff1a** {{check_run.status}}\n**\u7ed3\u679c\uff1a** {{check_run.conclusion}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "completed", + "failure" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u274c \u68c0\u67e5\u5931\u8d25\uff1a{{check_run.name}}" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md | default('')}}\n**\u68c0\u67e5\uff1a** {{check_run.name}}\n**\u72b6\u6001\uff1a** {{check_run.status}}\n**\u7ed3\u679c\uff1a** {{check_run.conclusion}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2705 Check Run\uff1a{{check_run.name}} {{check_run.status}}" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md | default('')}}\n**\u68c0\u67e5\uff1a** {{check_run.name}}\n**\u72b6\u6001\uff1a** {{check_run.status}}\n**\u7ed3\u679c\uff1a** {{check_run.conclusion}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u68c0\u67e5\u8fd0\u884c \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "requested_action" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u68c0\u67e5\u8fd0\u884c \u5df2\u8bf7\u6c42\u64cd\u4f5c" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "rerequested" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u68c0\u67e5\u8fd0\u884c \u5df2\u91cd\u65b0\u8bf7\u6c42" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/check_suite.json b/example-configs/templates/cn/check_suite.json new file mode 100644 index 0000000..8a28347 --- /dev/null +++ b/example-configs/templates/cn/check_suite.json @@ -0,0 +1,171 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83e\uddea Check Suite\uff1a{{action}}" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md | default('')}}\n**\u7ed3\u679c\uff1a** {{check_suite.conclusion | default('N/A')}}\n**\u63d0\u4ea4\uff1a** {{check_suite.head_sha}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "completed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u68c0\u67e5\u5957\u4ef6 \u5df2\u5b8c\u6210" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "requested" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u68c0\u67e5\u5957\u4ef6 \u5df2\u8bf7\u6c42" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "rerequested" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u68c0\u67e5\u5957\u4ef6 \u5df2\u91cd\u65b0\u8bf7\u6c42" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/code_scanning_alert.json b/example-configs/templates/cn/code_scanning_alert.json new file mode 100644 index 0000000..c020e05 --- /dev/null +++ b/example-configs/templates/cn/code_scanning_alert.json @@ -0,0 +1,309 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd0d \u4ee3\u7801\u626b\u63cf\u8b66\u544a{{action}}" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u8b66\u544a\uff1a** {{alert_rule_description}}\n**\u4e25\u91cd\u5ea6\uff1a** {{alert_rule_severity}}\n**\u72b6\u6001\uff1a** {{alert_state}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "appeared_in_branch" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4ee3\u7801\u626b\u63cf\u8b66\u62a5 \u51fa\u73b0\u5728\u5206\u652f" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "closed_by_user" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4ee3\u7801\u626b\u63cf\u8b66\u62a5 \u88ab\u7528\u6237\u5173\u95ed" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4ee3\u7801\u626b\u63cf\u8b66\u62a5 \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "fixed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4ee3\u7801\u626b\u63cf\u8b66\u62a5 \u5df2\u4fee\u590d" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reopened" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4ee3\u7801\u626b\u63cf\u8b66\u62a5 \u5df2\u91cd\u65b0\u6253\u5f00" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reopened_by_user" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4ee3\u7801\u626b\u63cf\u8b66\u62a5 \u88ab\u7528\u6237\u91cd\u65b0\u6253\u5f00" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/commit_comment.json b/example-configs/templates/cn/commit_comment.json new file mode 100644 index 0000000..343fe6e --- /dev/null +++ b/example-configs/templates/cn/commit_comment.json @@ -0,0 +1,93 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcac \u63d0\u4ea4\u8bc4\u8bba" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u63d0\u4ea4\uff1a** {{commit_sha_short}}\n**\u4f5c\u8005\uff1a** {{sender_link_md}}\n**\u8bc4\u8bba\uff1a** {{comment_body}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8bc4\u8bba" + }, + "url": "{{comment_html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u63d0\u4ea4\u8bc4\u8bba \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/create.json b/example-configs/templates/cn/create.json new file mode 100644 index 0000000..41c7ca9 --- /dev/null +++ b/example-configs/templates/cn/create.json @@ -0,0 +1,33 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2728 \u65b0\u521b\u5efa\uff1a{{ref_type}} \u5728 {{repository.full_name}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u521b\u5efa\u8005\uff1a** {{sender_link_md | default(sender.login)}}\n**\u7c7b\u578b\uff1a** {{ref_type}} \u540d\u79f0\uff1a {{ref}}\n" + } + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/custom_property.json b/example-configs/templates/cn/custom_property.json new file mode 100644 index 0000000..38b9dac --- /dev/null +++ b/example-configs/templates/cn/custom_property.json @@ -0,0 +1,188 @@ +{ + "payloads": [ + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u81ea\u5b9a\u4e49\u5c5e\u6027 \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u81ea\u5b9a\u4e49\u5c5e\u6027 \u5df2\u5220\u9664" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "promote_to_enterprise" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u81ea\u5b9a\u4e49\u5c5e\u6027 \u63d0\u5347\u81f3\u4f01\u4e1a" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "updated" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u81ea\u5b9a\u4e49\u5c5e\u6027 \u5df2\u66f4\u65b0" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/custom_property_values.json b/example-configs/templates/cn/custom_property_values.json new file mode 100644 index 0000000..96c850c --- /dev/null +++ b/example-configs/templates/cn/custom_property_values.json @@ -0,0 +1,50 @@ +{ + "payloads": [ + { + "tags": [ + "updated" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u81ea\u5b9a\u4e49\u5c5e\u6027\u503c \u5df2\u66f4\u65b0" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/delete.json b/example-configs/templates/cn/delete.json new file mode 100644 index 0000000..42b790c --- /dev/null +++ b/example-configs/templates/cn/delete.json @@ -0,0 +1,33 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\uddd1\ufe0f \u5220\u9664\uff1a{{ref_type}} \u5728 {{repository.full_name}}" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u89e6\u53d1\u8005\uff1a** {{sender_link_md | default(sender.login)}}\n**\u5220\u9664\uff1a** {{ref_type}} {{ref}}\n" + } + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/dependabot_alert.json b/example-configs/templates/cn/dependabot_alert.json new file mode 100644 index 0000000..7f4fddc --- /dev/null +++ b/example-configs/templates/cn/dependabot_alert.json @@ -0,0 +1,355 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83e\udd16 Dependabot\u8b66\u544a{{action}}" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u5305\uff1a** {{alert_package_name}}\n**\u4e25\u91cd\u5ea6\uff1a** {{alert_severity}}\n**\u72b6\u6001\uff1a** {{alert_state}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "auto_dismissed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Dependabot \u8b66\u62a5 \u81ea\u52a8\u9a73\u56de" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "auto_reopened" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Dependabot \u8b66\u62a5 \u81ea\u52a8\u91cd\u65b0\u6253\u5f00" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Dependabot \u8b66\u62a5 \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "dismissed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Dependabot \u8b66\u62a5 \u5df2\u9a73\u56de" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "fixed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Dependabot \u8b66\u62a5 \u5df2\u4fee\u590d" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reintroduced" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Dependabot \u8b66\u62a5 \u91cd\u65b0\u5f15\u5165" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reopened" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Dependabot \u8b66\u62a5 \u5df2\u91cd\u65b0\u6253\u5f00" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/deploy_key.json b/example-configs/templates/cn/deploy_key.json new file mode 100644 index 0000000..8cc2e81 --- /dev/null +++ b/example-configs/templates/cn/deploy_key.json @@ -0,0 +1,96 @@ +{ + "payloads": [ + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u90e8\u7f72\u5bc6\u94a5 \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u90e8\u7f72\u5bc6\u94a5 \u5df2\u5220\u9664" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/deployment.json b/example-configs/templates/cn/deployment.json new file mode 100644 index 0000000..50ffea9 --- /dev/null +++ b/example-configs/templates/cn/deployment.json @@ -0,0 +1,33 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udea2 \u90e8\u7f72\uff1a{{deployment.environment}}" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u5e94\u7528\uff1a** {{deployment.ref}}\n**\u73af\u5883\uff1a** {{deployment.environment}}\n**\u53d1\u8d77\u4eba\uff1a** {{sender_link_md | default(sender.login)}}\n" + } + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/deployment_protection_rule.json b/example-configs/templates/cn/deployment_protection_rule.json new file mode 100644 index 0000000..978f108 --- /dev/null +++ b/example-configs/templates/cn/deployment_protection_rule.json @@ -0,0 +1,50 @@ +{ + "payloads": [ + { + "tags": [ + "requested" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u90e8\u7f72\u4fdd\u62a4\u89c4\u5219 \u5df2\u8bf7\u6c42" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/deployment_review.json b/example-configs/templates/cn/deployment_review.json new file mode 100644 index 0000000..a794ce3 --- /dev/null +++ b/example-configs/templates/cn/deployment_review.json @@ -0,0 +1,137 @@ +{ + "payloads": [ + { + "tags": [ + "approved" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2705 \u90e8\u7f72\u5df2\u6279\u51c6" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u5ba1\u6838\u8005\uff1a** {{sender_link_md}}\n**\u73af\u5883\uff1a** {{environment}}\n**\u8bc4\u8bba\uff1a** {{comment}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "rejected" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u274c \u90e8\u7f72\u5df2\u62d2\u7edd" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u5ba1\u6838\u8005\uff1a** {{sender_link_md}}\n**\u73af\u5883\uff1a** {{environment}}\n**\u8bc4\u8bba\uff1a** {{comment}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u90e8\u7f72\u5ba1\u6838{{action}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u5ba1\u6838\u8005\uff1a** {{sender_link_md}}\n**\u73af\u5883\uff1a** {{environment}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "requested" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u90e8\u7f72\u5ba1\u67e5 \u5df2\u8bf7\u6c42" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/deployment_status.json b/example-configs/templates/cn/deployment_status.json new file mode 100644 index 0000000..248076f --- /dev/null +++ b/example-configs/templates/cn/deployment_status.json @@ -0,0 +1,33 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udce3 \u90e8\u7f72\u72b6\u6001\uff1a{{deployment_status.state}}" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u90e8\u7f72\uff1a** {{deployment.ref}}\n**\u72b6\u6001\uff1a** {{deployment_status.state}}\n**\u63cf\u8ff0\uff1a** {{deployment_status.description}}\n" + } + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/discussion.json b/example-configs/templates/cn/discussion.json new file mode 100644 index 0000000..adaaccc --- /dev/null +++ b/example-configs/templates/cn/discussion.json @@ -0,0 +1,685 @@ +{ + "payloads": [ + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcac \u65b0\u8ba8\u8bba\u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u6807\u9898\uff1a** {{discussion.title}}\n**\u4f5c\u8005\uff1a** {{sender_link_md}}\n**\u5206\u7c7b\uff1a** {{discussion.category.name}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "{{discussion.body}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u53c2\u4e0e\u8ba8\u8bba" + }, + "url": "{{discussion.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "answered" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2705 \u8ba8\u8bba\u5df2\u88ab\u56de\u7b54" + }, + "template": "purple" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u8ba8\u8bba\uff1a** {{discussion.title}}\n**\u56de\u7b54\u8005\uff1a** {{sender_link_md}}\n**\u5206\u7c7b\uff1a** {{discussion.category.name}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "\u6b64\u8ba8\u8bba\u5df2\u6807\u8bb0\u4e86\u7b54\u6848" + } + ] + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u7b54\u6848" + }, + "url": "{{discussion.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "locked" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd12 \u8ba8\u8bba\u5df2\u9501\u5b9a" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u8ba8\u8bba\uff1a** {{discussion.title}}\n**\u9501\u5b9a\u8005\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "\u6b64\u8ba8\u8bba\u5df2\u88ab\u9501\u5b9a" + } + ] + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8ba8\u8bba" + }, + "url": "{{discussion.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unlocked" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ufffd \u8ba8\u8bba\u5df2\u89e3\u9501" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u8ba8\u8bba\uff1a** {{discussion.title}}\n**\u89e3\u9501\u8005\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "\u6b64\u8ba8\u8bba\u73b0\u5df2\u5f00\u653e\u8bc4\u8bba" + } + ] + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u53c2\u4e0e\u8ba8\u8bba" + }, + "url": "{{discussion.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "closed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udccb \u8ba8\u8bba\u5df2\u5173\u95ed" + }, + "template": "grey" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u8ba8\u8bba\uff1a** {{discussion.title}}\n**\u5173\u95ed\u8005\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8ba8\u8bba" + }, + "url": "{{discussion.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcac \u8ba8\u8bba {{action}}" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u8ba8\u8bba\uff1a** {{discussion.title}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}\n**\u5206\u7c7b\uff1a** {{discussion.category.name}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8ba8\u8bba" + }, + "url": "{{discussion.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 discussion \u5df2\u5220\u9664" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 discussion \u5df2\u7f16\u8f91" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "labeled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 discussion \u5df2\u6dfb\u52a0\u6807\u7b7e" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "pinned" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 discussion \u5df2\u56fa\u5b9a" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "transferred" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 discussion \u5df2\u8f6c\u79fb" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unanswered" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 discussion \u672a\u56de\u7b54" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unlabeled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 discussion \u5df2\u79fb\u9664\u6807\u7b7e" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unpinned" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 discussion \u5df2\u53d6\u6d88\u56fa\u5b9a" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/discussion_comment.json b/example-configs/templates/cn/discussion_comment.json new file mode 100644 index 0000000..6a55775 --- /dev/null +++ b/example-configs/templates/cn/discussion_comment.json @@ -0,0 +1,185 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcac \u8ba8\u8bba\u8bc4\u8bba\uff1a{{discussion.title}}" + }, + "template": "teal" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4f5c\u8005\uff1a** {{sender_link_md | default(sender.login)}}\n**\u8ba8\u8bba\uff1a** {{discussion.title}}\n**\u8bc4\u8bba\uff1a** {{comment.body}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8bc4\u8bba" + }, + "url": "{{comment.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 discussion_comment \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 discussion_comment \u5df2\u5220\u9664" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 discussion_comment \u5df2\u7f16\u8f91" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/fork.json b/example-configs/templates/cn/fork.json new file mode 100644 index 0000000..686b83e --- /dev/null +++ b/example-configs/templates/cn/fork.json @@ -0,0 +1,47 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83c\udf74 Fork\uff1a{{forkee.full_name}}" + }, + "template": "purple" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Fork\u8005\uff1a** {{sender_link_md | default(sender.login)}}\n**\u76ee\u6807\u4ed3\u5e93\uff1a** {{forkee.full_name}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770bFork\u4ed3\u5e93" + }, + "url": "{{forkee.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/github_app_authorization.json b/example-configs/templates/cn/github_app_authorization.json new file mode 100644 index 0000000..bc69134 --- /dev/null +++ b/example-configs/templates/cn/github_app_authorization.json @@ -0,0 +1,50 @@ +{ + "payloads": [ + { + "tags": [ + "revoked" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 github_app_authorization \u5df2\u64a4\u9500" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/gollum.json b/example-configs/templates/cn/gollum.json new file mode 100644 index 0000000..55eb7cc --- /dev/null +++ b/example-configs/templates/cn/gollum.json @@ -0,0 +1,47 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcda Wiki \u66f4\u65b0\uff1a{{repository.full_name}}" + }, + "template": "gray" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u63a8\u9001\u8005\uff1a** {{sender_link_md | default(sender.login)}}\n**\u53d8\u66f4\uff1a** {{pages | length}} \u4e2a\u9875\u9762\u5df2\u66f4\u65b0\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u4ed3\u5e93" + }, + "url": "{{repository.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/installation.json b/example-configs/templates/cn/installation.json new file mode 100644 index 0000000..4568554 --- /dev/null +++ b/example-configs/templates/cn/installation.json @@ -0,0 +1,263 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83e\udd16 GitHub\u5e94\u7528{{action}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u5e94\u7528\uff1a** {{app_name}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u5b89\u88c5\u8005\uff1a** {{sender_link_md}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 installation \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 installation \u5df2\u5220\u9664" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "new_permissions_accepted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 installation \u65b0\u6743\u9650\u5df2\u63a5\u53d7" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "suspend" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 installation \u5df2\u6682\u505c" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unsuspend" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 installation \u5df2\u6062\u590d" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/installation_repositories.json b/example-configs/templates/cn/installation_repositories.json new file mode 100644 index 0000000..a7c2b0d --- /dev/null +++ b/example-configs/templates/cn/installation_repositories.json @@ -0,0 +1,96 @@ +{ + "payloads": [ + { + "tags": [ + "added" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 installation_repositories \u5df2\u6dfb\u52a0" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "removed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 installation_repositories \u5df2\u79fb\u9664" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/installation_target.json b/example-configs/templates/cn/installation_target.json new file mode 100644 index 0000000..04eb586 --- /dev/null +++ b/example-configs/templates/cn/installation_target.json @@ -0,0 +1,50 @@ +{ + "payloads": [ + { + "tags": [ + "renamed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 installation_target \u5df2\u91cd\u547d\u540d" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/issue_comment.json b/example-configs/templates/cn/issue_comment.json new file mode 100644 index 0000000..25d2823 --- /dev/null +++ b/example-configs/templates/cn/issue_comment.json @@ -0,0 +1,369 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcac Issue \u8bc4\u8bba\uff1a#{{issue.number}}" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4f5c\u8005\uff1a** {{sender_link_md | default(sender.login)}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n**\u8bc4\u8bba\uff1a** {{comment.body}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8bc4\u8bba" + }, + "url": "{{comment.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Issue \u8bc4\u8bba \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Issue \u8bc4\u8bba \u5df2\u5220\u9664" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Issue \u8bc4\u8bba \u5df2\u7f16\u8f91" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "pull_request" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcac PR \u8bc4\u8bba\uff1a#{{issue.number}}" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4f5c\u8005\uff1a** {{sender_link_md | default(sender.login)}}\n**Pull Request\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n**\u8bc4\u8bba\uff1a** {{comment.body}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8bc4\u8bba" + }, + "url": "{{comment.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created", + "pull_request" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 PR \u8bc4\u8bba \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted", + "pull_request" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 PR \u8bc4\u8bba \u5df2\u5220\u9664" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited", + "pull_request" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 PR \u8bc4\u8bba \u5df2\u7f16\u8f91" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/issue_dependencies.json b/example-configs/templates/cn/issue_dependencies.json new file mode 100644 index 0000000..2c0b07d --- /dev/null +++ b/example-configs/templates/cn/issue_dependencies.json @@ -0,0 +1,188 @@ +{ + "payloads": [ + { + "tags": [ + "blocked_by_added" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Issue \u4f9d\u8d56 \u88ab\u963b\u6b62\u8005\u5df2\u6dfb\u52a0" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "blocked_by_removed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Issue \u4f9d\u8d56 \u88ab\u963b\u6b62\u8005\u5df2\u79fb\u9664" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "blocking_added" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Issue \u4f9d\u8d56 \u963b\u6b62\u8005\u5df2\u6dfb\u52a0" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "blocking_removed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Issue \u4f9d\u8d56 \u963b\u6b62\u8005\u5df2\u79fb\u9664" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/issues.json b/example-configs/templates/cn/issues.json new file mode 100644 index 0000000..81a1a5f --- /dev/null +++ b/example-configs/templates/cn/issues.json @@ -0,0 +1,1375 @@ +{ + "payloads": [ + { + "tags": [ + "opened", + "type:bug" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udc1b Bug \u62a5\u544a\uff1a{{issue.title}}" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udc1b **\u53d1\u73b0 Bug**\uff0c\u62a5\u544a\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**\u63cf\u8ff0\uff1a** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**\u6807\u7b7e\uff1a** {{issue_labels_joined}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b Bug" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "opened", + "type:feature" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2728 \u65b0\u529f\u80fd\u8bf7\u6c42\uff1a{{issue.title}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\u2728 **\u65b0\u529f\u80fd\u8bf7\u6c42**\uff0c\u521b\u5efa\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**\u63cf\u8ff0\uff1a** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**\u6807\u7b7e\uff1a** {{issue_labels_joined}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u529f\u80fd" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "opened", + "type:task" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udccb \u4efb\u52a1\u521b\u5efa\uff1a{{issue.title}}" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udccb **\u4efb\u52a1\u521b\u5efa**\uff0c\u521b\u5efa\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**\u63cf\u8ff0\uff1a** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**\u6807\u7b7e\uff1a** {{issue_labels_joined}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u4efb\u52a1" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "closed", + "type:bug" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2705 Bug \u5df2\u4fee\u590d\uff1a{{issue.title}}" + }, + "template": "purple" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\u2705 **Bug \u5df2\u4fee\u590d**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n**\u72b6\u6001\uff1a** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**\u6807\u7b7e\uff1a** {{issue_labels_joined}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b Bug" + }, + "url": "{{issue.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "closed", + "type:feature" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2705 \u529f\u80fd\u5df2\u5b8c\u6210\uff1a{{issue.title}}" + }, + "template": "purple" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\u2705 **\u529f\u80fd\u5df2\u5b8c\u6210**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n**\u72b6\u6001\uff1a** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**\u6807\u7b7e\uff1a** {{issue_labels_joined}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u529f\u80fd" + }, + "url": "{{issue.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "closed", + "type:task" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2705 \u4efb\u52a1\u5df2\u5b8c\u6210\uff1a{{issue.title}}" + }, + "template": "purple" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\u2705 **\u4efb\u52a1\u5df2\u5b8c\u6210**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n**\u72b6\u6001\uff1a** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**\u6807\u7b7e\uff1a** {{issue_labels_joined}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u4efb\u52a1" + }, + "url": "{{issue.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reopened", + "type:bug" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd04 Bug \u5df2\u91cd\u65b0\u5f00\u542f\uff1a{{issue.title}}" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udd04 **Bug \u5df2\u91cd\u65b0\u5f00\u542f**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**\u6807\u7b7e\uff1a** {{issue_labels_joined}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b Bug" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reopened", + "type:feature" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd04 \u529f\u80fd\u5df2\u91cd\u65b0\u5f00\u542f\uff1a{{issue.title}}" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udd04 **\u529f\u80fd\u5df2\u91cd\u65b0\u5f00\u542f**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**\u6807\u7b7e\uff1a** {{issue_labels_joined}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u529f\u80fd" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reopened", + "type:task" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd04 \u4efb\u52a1\u5df2\u91cd\u65b0\u5f00\u542f\uff1a{{issue.title}}" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udd04 **\u4efb\u52a1\u5df2\u91cd\u65b0\u5f00\u542f**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**\u6807\u7b7e\uff1a** {{issue_labels_joined}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u4efb\u52a1" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "opened" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcdd Issue \u5df2\u5f00\u542f\uff1a{{issue.title}}" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udcdd **Issue \u5df2\u5f00\u542f**\uff0c\u521b\u5efa\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**\u63cf\u8ff0\uff1a** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**\u6807\u7b7e\uff1a** {{issue_labels_joined}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "closed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2705 Issue \u5df2\u5173\u95ed\uff1a{{issue.title}}" + }, + "template": "purple" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\u2705 **Issue \u5df2\u5173\u95ed**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n**\u72b6\u6001\uff1a** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**\u6807\u7b7e\uff1a** {{issue_labels_joined}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b Issue" + }, + "url": "{{issue.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reopened" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd04 Issue \u5df2\u91cd\u65b0\u5f00\u542f\uff1a{{issue.title}}" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udd04 **Issue \u5df2\u91cd\u65b0\u5f00\u542f**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**\u6807\u7b7e\uff1a** {{issue_labels_joined}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "assigned" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udc64 Issue \u5df2\u5206\u914d\uff1a{{issue.title}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udc64 **Issue \u5df2\u5206\u914d**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if assignee_link_md}}**\u5206\u914d\u7ed9\uff1a** {{assignee_link_md}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unassigned" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udc64 Issue \u5df2\u53d6\u6d88\u5206\u914d\uff1a{{issue.title}}" + }, + "template": "grey" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udc64 **Issue \u5df2\u53d6\u6d88\u5206\u914d**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if assignee_link_md}}**\u79fb\u9664\u5206\u914d\uff1a** {{assignee_link_md}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b Issue" + }, + "url": "{{issue.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u270f\ufe0f Issue \u5df2\u7f16\u8f91\uff1a{{issue.title}}" + }, + "template": "grey" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\u270f\ufe0f **Issue \u5df2\u7f16\u8f91**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if changes_title_from}}**\u6807\u9898\u6539\u81ea\uff1a** {{changes_title_from}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b Issue" + }, + "url": "{{issue.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "milestoned" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83c\udfaf \u91cc\u7a0b\u7891\u5df2\u6dfb\u52a0\uff1a{{issue.title}}" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83c\udfaf **\u91cc\u7a0b\u7891\u5df2\u6dfb\u52a0**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if milestone_title}}**\u91cc\u7a0b\u7891\uff1a** {{milestone_title}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "demilestoned" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83c\udfaf \u91cc\u7a0b\u7891\u5df2\u79fb\u9664\uff1a{{issue.title}}" + }, + "template": "grey" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83c\udfaf **\u91cc\u7a0b\u7891\u5df2\u79fb\u9664**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if milestone_title}}**\u79fb\u9664\u91cc\u7a0b\u7891\uff1a** {{milestone_title}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b Issue" + }, + "url": "{{issue.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "transferred" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udce6 Issue \u5df2\u8f6c\u79fb\uff1a{{issue.title}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udce6 **Issue \u5df2\u8f6c\u79fb**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if changes_new_repository_full_name}}**\u8f6c\u79fb\u5230\u4ed3\u5e93\uff1a** {{changes_new_repository_full_name}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\uddd1\ufe0f Issue \u5df2\u5220\u9664\uff1a{{issue.title}}" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\uddd1\ufe0f **Issue \u5df2\u5220\u9664**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}" + } + } + ] + } + } + }, + { + "tags": [ + "pinned" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udccc Issue \u5df2\u7f6e\u9876\uff1a{{issue.title}}" + }, + "template": "yellow" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udccc **Issue \u5df2\u7f6e\u9876**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unpinned" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udccc Issue \u5df2\u53d6\u6d88\u7f6e\u9876\uff1a{{issue.title}}" + }, + "template": "grey" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udccc **Issue \u5df2\u53d6\u6d88\u7f6e\u9876**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b Issue" + }, + "url": "{{issue.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "locked" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd12 Issue \u5df2\u9501\u5b9a\uff1a{{issue.title}}" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udd12 **Issue \u5df2\u9501\u5b9a**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.active_lock_reason}}**\u539f\u56e0\uff1a** {{issue.active_lock_reason}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b Issue" + }, + "url": "{{issue.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unlocked" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd13 Issue \u5df2\u89e3\u9501\uff1a{{issue.title}}" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udd13 **Issue \u5df2\u89e3\u9501**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "labeled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83c\udff7\ufe0f \u6807\u7b7e\u5df2\u6dfb\u52a0\uff1a{{labeled_label_name}} - {{issue.title}}" + }, + "template": "teal" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u6807\u7b7e\uff1a** {{labeled_label_link_md | default(labeled_label_name)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n**\u64cd\u4f5c\u8005\uff1a** {{sender_link_md | default(sender.login)}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unlabeled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83c\udff7\ufe0f \u6807\u7b7e\u5df2\u79fb\u9664\uff1a{{labeled_label_name}} - {{issue.title}}" + }, + "template": "grey" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u6807\u7b7e\uff1a** {{labeled_label_link_md | default(labeled_label_name)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n**\u64cd\u4f5c\u8005\uff1a** {{sender_link_md | default(sender.login)}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b Issue" + }, + "url": "{{issue.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "typed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u270f\ufe0f Issue \u5df2\u8bbe\u7f6e\u7c7b\u578b\uff1a{{issue.title}}" + }, + "template": "yellow" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\u270f\ufe0f **Issue \u5df2\u8bbe\u7f6e\u7c7b\u578b**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_type}}**\u7c7b\u578b\uff1a** {{issue_type}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "untyped" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u270f\ufe0f Issue \u7c7b\u578b\u5df2\u79fb\u9664\uff1a{{issue.title}}" + }, + "template": "grey" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\u270f\ufe0f **Issue \u7c7b\u578b\u5df2\u79fb\u9664**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b Issue" + }, + "url": "{{issue.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "type:bug" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udc1e Bug\uff1a{{issue.title}}" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udc1b **\u53d1\u73b0 Bug**\uff0c\u62a5\u544a\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "type:feature" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2728 Feature\uff1a{{issue.title}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\u2728 **\u529f\u80fd\u9700\u6c42**\uff0c\u63d0\u51fa\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "type:task" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcdd \u4efb\u52a1\uff1a{{issue.title}}" + }, + "template": "yellow" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udcdd **\u4efb\u52a1**\uff0c\u521b\u5efa\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "type:unknown" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u26a0\ufe0f Issue\uff1a{{issue.title}}" + }, + "template": "yellow" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\u26a0\ufe0f **Issue**\uff0c\u521b\u5efa\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_type_display | default(issue_user_link_md | default(''))}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcdd Issue\uff1a{{issue.title}}" + }, + "template": "gray" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n**\u4f5c\u8005\uff1a** {{sender_link_md | default(sender.login)}}\n**\u72b6\u6001\uff1a** {{issue.state | default('unknown')}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/label.json b/example-configs/templates/cn/label.json new file mode 100644 index 0000000..42d21b0 --- /dev/null +++ b/example-configs/templates/cn/label.json @@ -0,0 +1,171 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83c\udff7\ufe0f \u6807\u7b7e{{action}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u6807\u7b7e\uff1a** {{label_name}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u6807\u7b7e \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u6807\u7b7e \u5df2\u5220\u9664" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u6807\u7b7e \u5df2\u7f16\u8f91" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/marketplace_purchase.json b/example-configs/templates/cn/marketplace_purchase.json new file mode 100644 index 0000000..6c6d5ec --- /dev/null +++ b/example-configs/templates/cn/marketplace_purchase.json @@ -0,0 +1,234 @@ +{ + "payloads": [ + { + "tags": [ + "cancelled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5e02\u573a\u8d2d\u4e70 \u5df2\u53d6\u6d88" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "changed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5e02\u573a\u8d2d\u4e70 \u5df2\u53d8\u66f4" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "pending_change" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5e02\u573a\u8d2d\u4e70 \u5f85\u53d8\u66f4" + }, + "template": "yellow" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "pending_change_cancelled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5e02\u573a\u8d2d\u4e70 \u5f85\u53d8\u66f4\u9879\u76ee\u5df2\u53d6\u6d88" + }, + "template": "yellow" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "purchased" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5e02\u573a\u8d2d\u4e70 \u5df2\u8d2d\u4e70" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/member.json b/example-configs/templates/cn/member.json new file mode 100644 index 0000000..eefb465 --- /dev/null +++ b/example-configs/templates/cn/member.json @@ -0,0 +1,171 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udc64 \u6210\u5458\u4e8b\u4ef6\uff1a{{action}} {{member.login}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u6210\u5458\uff1a** {{member.login}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "added" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u6210\u5458 \u5df2\u6dfb\u52a0" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u6210\u5458 \u5df2\u7f16\u8f91" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "removed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u6210\u5458 \u5df2\u79fb\u9664" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/membership.json b/example-configs/templates/cn/membership.json new file mode 100644 index 0000000..6c972e3 --- /dev/null +++ b/example-configs/templates/cn/membership.json @@ -0,0 +1,125 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2795 \u6210\u5458\u52a0\u5165/\u79fb\u9664\uff1a{{action}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u6210\u5458\uff1a** {{member.user.login}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "added" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u6210\u5458\u8d44\u683c \u5df2\u6dfb\u52a0" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "removed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u6210\u5458\u8d44\u683c \u5df2\u79fb\u9664" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/merge_group.json b/example-configs/templates/cn/merge_group.json new file mode 100644 index 0000000..c3ff1e5 --- /dev/null +++ b/example-configs/templates/cn/merge_group.json @@ -0,0 +1,125 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd00 \u5408\u5e76\u961f\u5217{{action}}" + }, + "template": "purple" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u5934\u90e8SHA\uff1a** {{merge_group_head_sha}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "checks_requested" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5408\u5e76\u7ec4 \u5df2\u8bf7\u6c42\u68c0\u67e5" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "destroyed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5408\u5e76\u7ec4 \u5df2\u9500\u6bc1" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/meta.json b/example-configs/templates/cn/meta.json new file mode 100644 index 0000000..465ce59 --- /dev/null +++ b/example-configs/templates/cn/meta.json @@ -0,0 +1,50 @@ +{ + "payloads": [ + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5143\u6570\u636e \u5df2\u5220\u9664" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/milestone.json b/example-configs/templates/cn/milestone.json new file mode 100644 index 0000000..aff914b --- /dev/null +++ b/example-configs/templates/cn/milestone.json @@ -0,0 +1,263 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83c\udfc1 \u91cc\u7a0b\u7891\uff1a{{action}} {{milestone.title}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u91cc\u7a0b\u7891\uff1a** {{milestone.title}}\n**\u63cf\u8ff0\uff1a** {{milestone.description}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "closed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u91cc\u7a0b\u7891 \u5df2\u5173\u95ed" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u91cc\u7a0b\u7891 \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u91cc\u7a0b\u7891 \u5df2\u5220\u9664" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u91cc\u7a0b\u7891 \u5df2\u7f16\u8f91" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "opened" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u91cc\u7a0b\u7891 \u5df2\u6253\u5f00" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/org_block.json b/example-configs/templates/cn/org_block.json new file mode 100644 index 0000000..4b4e233 --- /dev/null +++ b/example-configs/templates/cn/org_block.json @@ -0,0 +1,96 @@ +{ + "payloads": [ + { + "tags": [ + "blocked" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u7ec4\u7ec7\u5c01\u7981 \u5df2\u5c01\u7981" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unblocked" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u7ec4\u7ec7\u5c01\u7981 \u5df2\u89e3\u9664\u5c01\u7981" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/organization.json b/example-configs/templates/cn/organization.json new file mode 100644 index 0000000..b8f5125 --- /dev/null +++ b/example-configs/templates/cn/organization.json @@ -0,0 +1,171 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83c\udfe2 \u7ec4\u7ec7\u6210\u5458\u53d8\u66f4\uff1a{{action}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u7ec4\u7ec7\uff1a** {{organization.login}}\n**\u6210\u5458\uff1a** {{membership.user.login | default('N/A')}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "member_added" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u7ec4\u7ec7 \u6210\u5458\u5df2\u6dfb\u52a0" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "member_invited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u7ec4\u7ec7 \u6210\u5458\u5df2\u9080\u8bf7" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "member_removed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u7ec4\u7ec7 \u6210\u5458\u5df2\u79fb\u9664" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/package.json b/example-configs/templates/cn/package.json new file mode 100644 index 0000000..c50da9a --- /dev/null +++ b/example-configs/templates/cn/package.json @@ -0,0 +1,125 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udce6 \u5305\u4e8b\u4ef6\uff1a{{action}} {{package.name | default('package')}}" + }, + "template": "purple" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u5305\u540d\uff1a** {{package_link_md | default(package.name)}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7c7b\u578b\uff1a** {{package.package_type | default('')}}\n**\u7248\u672c/Tag\uff1a** {{package.version | default('')}} {{package_tag_name | default(package.tag_name | default(''))}}\n**\u53d1\u5e03\u8005\uff1a** {{sender_link_md | default(pusher_link_md | default(''))}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "published" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 package \u5df2\u53d1\u5e03" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "updated" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 package \u5df2\u66f4\u65b0" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/page_build.json b/example-configs/templates/cn/page_build.json new file mode 100644 index 0000000..713b5b7 --- /dev/null +++ b/example-configs/templates/cn/page_build.json @@ -0,0 +1,33 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcc4 \u9875\u9762\u6784\u5efa\uff1a{{action}}" + }, + "template": "grey" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository.full_name}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + } + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/personal_access_token_request.json b/example-configs/templates/cn/personal_access_token_request.json new file mode 100644 index 0000000..96fae50 --- /dev/null +++ b/example-configs/templates/cn/personal_access_token_request.json @@ -0,0 +1,188 @@ +{ + "payloads": [ + { + "tags": [ + "approved" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4e2a\u4eba\u8bbf\u95ee\u4ee4\u724c\u8bf7\u6c42 \u5df2\u6279\u51c6" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "cancelled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4e2a\u4eba\u8bbf\u95ee\u4ee4\u724c\u8bf7\u6c42 \u5df2\u53d6\u6d88" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4e2a\u4eba\u8bbf\u95ee\u4ee4\u724c\u8bf7\u6c42 \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "denied" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4e2a\u4eba\u8bbf\u95ee\u4ee4\u724c\u8bf7\u6c42 denied" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/ping.json b/example-configs/templates/cn/ping.json new file mode 100644 index 0000000..c173a63 --- /dev/null +++ b/example-configs/templates/cn/ping.json @@ -0,0 +1,33 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2705 GitHub Webhook \u6dfb\u52a0\u6210\u529f" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**GitHub \u5bc4\u8bed\uff1a** {{zen}}\n\n{{#if repository}}**\u4ed3\u5e93\uff1a** [{{repository.full_name}}]({{repository.html_url}})\n{{/if}}{{#if organization}}**\u7ec4\u7ec7\uff1a** [{{organization.login}}](https://github.com/{{organization.login}})\n{{/if}}**Hook ID\uff1a** {{hook_id}}\n**Hook \u7c7b\u578b\uff1a** {{hook_type}}" + } + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/project.json b/example-configs/templates/cn/project.json new file mode 100644 index 0000000..8dfd2ad --- /dev/null +++ b/example-configs/templates/cn/project.json @@ -0,0 +1,263 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udccb \u9879\u76ee\uff1a{{action}} {{project.name}}" + }, + "template": "brown" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u9879\u76ee\uff1a** {{project.name}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "closed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee \u5df2\u5173\u95ed" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee \u5df2\u5220\u9664" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reopened" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee \u5df2\u91cd\u65b0\u6253\u5f00" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "updated" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee \u5df2\u66f4\u65b0" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/project_card.json b/example-configs/templates/cn/project_card.json new file mode 100644 index 0000000..3ed8553 --- /dev/null +++ b/example-configs/templates/cn/project_card.json @@ -0,0 +1,263 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83c\udccf \u9879\u76ee\u5361\u7247\uff1a{{action}}" + }, + "template": "brown" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u5361\u7247\uff1a** {{project_card.note | default('\u65e0\u6ce8\u91ca')}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "converted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee\u5361\u7247 \u5df2\u8f6c\u6362" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee\u5361\u7247 \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee\u5361\u7247 \u5df2\u5220\u9664" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee\u5361\u7247 \u5df2\u7f16\u8f91" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "moved" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee\u5361\u7247 \u5df2\u79fb\u52a8" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/project_column.json b/example-configs/templates/cn/project_column.json new file mode 100644 index 0000000..8fbd67f --- /dev/null +++ b/example-configs/templates/cn/project_column.json @@ -0,0 +1,217 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcd0 \u9879\u76ee\u5217\uff1a{{action}}" + }, + "template": "brown" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u5217\u540d\uff1a** {{project_column.name}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee\u5217 \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee\u5217 \u5df2\u5220\u9664" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "moved" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee\u5217 \u5df2\u79fb\u52a8" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "updated" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee\u5217 \u5df2\u66f4\u65b0" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/projects_v2.json b/example-configs/templates/cn/projects_v2.json new file mode 100644 index 0000000..fbc2aeb --- /dev/null +++ b/example-configs/templates/cn/projects_v2.json @@ -0,0 +1,263 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udccb \u9879\u76ee{{action}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u9879\u76ee\uff1a** {{project_title}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u521b\u5efa\u8005\uff1a** {{sender_link_md}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "closed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee V2 \u5df2\u5173\u95ed" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee V2 \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee V2 \u5df2\u5220\u9664" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee V2 \u5df2\u7f16\u8f91" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reopened" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee V2 \u5df2\u91cd\u65b0\u6253\u5f00" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/projects_v2_item.json b/example-configs/templates/cn/projects_v2_item.json new file mode 100644 index 0000000..2689094 --- /dev/null +++ b/example-configs/templates/cn/projects_v2_item.json @@ -0,0 +1,326 @@ +{ + "payloads": [ + { + "tags": [ + "archived" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee V2 \u6761\u76ee \u5df2\u5f52\u6863" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "converted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee V2 \u6761\u76ee \u5df2\u8f6c\u6362" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee V2 \u6761\u76ee \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee V2 \u6761\u76ee \u5df2\u5220\u9664" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee V2 \u6761\u76ee \u5df2\u7f16\u8f91" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reordered" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee V2 \u6761\u76ee \u5df2\u91cd\u65b0\u6392\u5e8f" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "restored" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee V2 \u6761\u76ee \u5df2\u6062\u590d" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/projects_v2_status_update.json b/example-configs/templates/cn/projects_v2_status_update.json new file mode 100644 index 0000000..ede951a --- /dev/null +++ b/example-configs/templates/cn/projects_v2_status_update.json @@ -0,0 +1,142 @@ +{ + "payloads": [ + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee V2 \u72b6\u6001\u66f4\u65b0 \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee V2 \u72b6\u6001\u66f4\u65b0 \u5df2\u5220\u9664" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u9879\u76ee V2 \u72b6\u6001\u66f4\u65b0 \u5df2\u7f16\u8f91" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/public.json b/example-configs/templates/cn/public.json new file mode 100644 index 0000000..27c709e --- /dev/null +++ b/example-configs/templates/cn/public.json @@ -0,0 +1,33 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83c\udf10 \u4ed3\u5e93\u516c\u5f00\uff1a{{repository.full_name}}" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\u5df2\u516c\u5f00\uff1a** {{repository.full_name}}\n" + } + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/pull_request.json b/example-configs/templates/cn/pull_request.json new file mode 100644 index 0000000..92d0105 --- /dev/null +++ b/example-configs/templates/cn/pull_request.json @@ -0,0 +1,1114 @@ +{ + "payloads": [ + { + "tags": [ + "closed", + "merged" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd2e Pull Request \u5df2\u5408\u5e76" + }, + "template": "purple" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**PR\uff1a** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**\u5408\u5e76\u8005\uff1a** {{sender_link_md}}\n**\u5206\u652f\uff1a** {{pr_head_branch_link_md}} \u2192 {{pr_base_branch_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "{{pr_body}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b PR" + }, + "url": "{{pr_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "closed", + "unmerged" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u274c Pull Request \u5173\u95ed\uff08\u672a\u5408\u5e76\uff09" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**PR\uff1a** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**\u5173\u95ed\u8005\uff1a** {{sender_link_md}}\n**\u5206\u652f\uff1a** {{pr_head_branch_link_md}} \u2192 {{pr_base_branch_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "\u6b64 PR \u672a\u5408\u5e76\u5373\u5173\u95ed" + } + ] + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b PR" + }, + "url": "{{pr_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "opened" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd00 \u65b0 Pull Request \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**PR\uff1a** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**\u4f5c\u8005\uff1a** {{pr_user_link_md}}\n**\u5206\u652f\uff1a** {{pr_head_branch_link_md}} \u2192 {{pr_base_branch_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "{{pr_body}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u5ba1\u67e5 PR" + }, + "url": "{{pr_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reopened" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd04 Pull Request \u5df2\u91cd\u65b0\u6253\u5f00" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**PR\uff1a** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**\u91cd\u65b0\u6253\u5f00\u8005\uff1a** {{sender_link_md}}\n**\u5206\u652f\uff1a** {{pr_head_branch_link_md}} \u2192 {{pr_base_branch_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b PR" + }, + "url": "{{pr_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "synchronize" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd04 Pull Request \u5df2\u66f4\u65b0" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**PR\uff1a** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**\u66f4\u65b0\u8005\uff1a** {{sender_link_md}}\n**\u5206\u652f\uff1a** {{pr_head_branch_link_md}} \u2192 {{pr_base_branch_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "\u65b0\u63d0\u4ea4\u5df2\u63a8\u9001\u5230\u6b64 PR" + } + ] + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u53d8\u66f4" + }, + "url": "{{pr_url}}/files", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "ready_for_review" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2705 Pull Request \u5df2\u51c6\u5907\u597d\u5ba1\u67e5" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**PR\uff1a** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**\u4f5c\u8005\uff1a** {{pr_user_link_md}}\n**\u5206\u652f\uff1a** {{pr_head_branch_link_md}} \u2192 {{pr_base_branch_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "\u6b64 PR \u5df2\u51c6\u5907\u597d\u63a5\u53d7\u5ba1\u67e5" + } + ] + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u7acb\u5373\u5ba1\u67e5" + }, + "url": "{{pr_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "converted_to_draft" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcdd Pull Request \u5df2\u8f6c\u4e3a\u8349\u7a3f" + }, + "template": "grey" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**PR\uff1a** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**\u8f6c\u6362\u8005\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "\u6b64 PR \u73b0\u5728\u5904\u4e8e\u8349\u7a3f\u6a21\u5f0f" + } + ] + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b PR" + }, + "url": "{{pr_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "review_requested" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udc41\ufe0f \u8bf7\u6c42\u5ba1\u67e5" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**PR\uff1a** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**\u8bf7\u6c42\u8005\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u5ba1\u67e5 PR" + }, + "url": "{{pr_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd00 Pull Request {{action}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**PR\uff1a** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b PR" + }, + "url": "{{pr_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "assigned" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 pull_request \u5df2\u5206\u914d" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "auto_merge_disabled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 pull_request auto_merge_disabled" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "auto_merge_enabled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 pull_request auto_merge_enabled" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "demilestoned" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 pull_request \u5df2\u79fb\u9664\u91cc\u7a0b\u7891" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "dequeued" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 pull_request dequeued" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 pull_request \u5df2\u7f16\u8f91" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "enqueued" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 pull_request enqueued" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "labeled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 pull_request \u5df2\u6dfb\u52a0\u6807\u7b7e" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "locked" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 pull_request \u5df2\u9501\u5b9a" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "milestoned" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 pull_request \u5df2\u6dfb\u52a0\u91cc\u7a0b\u7891" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "review_request_removed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 pull_request review_request_removed" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unassigned" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 pull_request \u5df2\u53d6\u6d88\u5206\u914d" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unlabeled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 pull_request \u5df2\u79fb\u9664\u6807\u7b7e" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unlocked" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 pull_request \u5df2\u89e3\u9501" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/pull_request_review.json b/example-configs/templates/cn/pull_request_review.json new file mode 100644 index 0000000..53286a8 --- /dev/null +++ b/example-configs/templates/cn/pull_request_review.json @@ -0,0 +1,185 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcdd PR \u5ba1\u67e5 {{action}}\uff1a#{{pull_request.number}}" + }, + "template": "cyan" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u5ba1\u67e5\u8005\uff1a** {{review_user_link_md | default(review.user.login)}}\n**PR\uff1a** #{{pull_request.number}} {{pull_request.title}}\n**\u7ed3\u679c\uff1a** {{review.state}}\n{{review.body}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u5ba1\u67e5" + }, + "url": "{{review.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "dismissed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 pull_request_review \u5df2\u9a73\u56de" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 pull_request_review \u5df2\u7f16\u8f91" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "submitted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 pull_request_review \u5df2\u63d0\u4ea4" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/pull_request_review_comment.json b/example-configs/templates/cn/pull_request_review_comment.json new file mode 100644 index 0000000..e18521b --- /dev/null +++ b/example-configs/templates/cn/pull_request_review_comment.json @@ -0,0 +1,185 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcac PR \u5ba1\u67e5\u8bc4\u8bba\uff1a#{{pull_request.number}}" + }, + "template": "cyan" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4f5c\u8005\uff1a** {{sender_link_md | default(sender.login)}}\n**PR\uff1a** #{{pull_request.number}}\n**\u8bc4\u8bba\uff1a** {{comment.body}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8bc4\u8bba" + }, + "url": "{{comment.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 pull_request_review_comment \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 pull_request_review_comment \u5df2\u5220\u9664" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 pull_request_review_comment \u5df2\u7f16\u8f91" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/pull_request_review_thread.json b/example-configs/templates/cn/pull_request_review_thread.json new file mode 100644 index 0000000..b8e9d56 --- /dev/null +++ b/example-configs/templates/cn/pull_request_review_thread.json @@ -0,0 +1,125 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcac PR\u5ba1\u6838\u8ba8\u8bba{{action}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**PR\uff1a** #{{pull_request.number}} {{pull_request.title}}\n**\u8ba8\u8bba\uff1a** {{thread_comments | length}} \u6761\u8bc4\u8bba\n**\u64cd\u4f5c\uff1a** {{action}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "resolved" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 pull_request_review_thread \u5df2\u89e3\u51b3" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unresolved" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 pull_request_review_thread unresolved" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/push.json b/example-configs/templates/cn/push.json new file mode 100644 index 0000000..bfc9bcb --- /dev/null +++ b/example-configs/templates/cn/push.json @@ -0,0 +1,90 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcbe \u65b0\u63a8\u9001\uff1a{{repository.full_name}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "{{pusher_link_md | default(pusher.name)}} \u63a8\u9001\u4e86 {{commits | length}} \u4e2a\u63d0\u4ea4\u5230\u5206\u652f **{{branch_name}}** {{branch_link_md | default('')}}\n{{repository_link_md | default('')}} {{branch_link_md | default('')}}\n\n**\u63d0\u4ea4\u4fe1\u606f\uff1a**\n{{commit_messages_joined | default(commit_message | default(pull_request.body | default('\u65e0\u63d0\u4ea4\u4fe1\u606f'))) }}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u63d0\u4ea4\u8be6\u60c5" + }, + "url": "{{compare_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "force" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udea8 \u5f3a\u5236\u63a8\u9001\uff1a{{repository.full_name}}" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u68c0\u6d4b\u5230\u5f3a\u5236\u63a8\u9001**\uff0c\u64cd\u4f5c\u4eba\uff1a{{sender_link_md | default(sender.login)}}\uff0c\u5206\u652f\uff1a**{{branch_name}}** {{branch_link_md | default('')}}\n\u53ef\u80fd\u5df2\u91cd\u5199\u5386\u53f2\u3002\u63d0\u4ea4\u6570\uff1a{{commits | length}}\n{{repository_link_md | default('')}} {{branch_link_md | default('')}}\n\n**\u63d0\u4ea4\u4fe1\u606f\uff1a**\n{{commit_messages_joined | default(commit_message | default('\u65e0\u63d0\u4ea4\u4fe1\u606f')) }}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u63d0\u4ea4\u8be6\u60c5" + }, + "url": "{{compare_url}}", + "type": "primary" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/registry_package.json b/example-configs/templates/cn/registry_package.json new file mode 100644 index 0000000..36d3ebb --- /dev/null +++ b/example-configs/templates/cn/registry_package.json @@ -0,0 +1,96 @@ +{ + "payloads": [ + { + "tags": [ + "published" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ufffd \u6ce8\u518c\u8868\u5305\u5df2\u53d1\u5e03" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u5305\u540d\uff1a** {{package_name}}\n**\u7c7b\u578b\uff1a** {{package_type | upper}}\n**\u7248\u672c\uff1a** {{package_version}}\n**\u53d1\u5e03\u8005\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u5305" + }, + "url": "{{repository.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "updated" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4ed3\u5e93\u5305 \u5df2\u66f4\u65b0" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u5305\u540d\uff1a** {{package_name}}\n**\u7c7b\u578b\uff1a** {{package_type | upper}}\n**\u7248\u672c\uff1a** {{package_version}}\n**\u66f4\u65b0\u8005\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/release.json b/example-configs/templates/cn/release.json new file mode 100644 index 0000000..9864dea --- /dev/null +++ b/example-configs/templates/cn/release.json @@ -0,0 +1,405 @@ +{ + "payloads": [ + { + "tags": [ + "published" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\ude80 \u7248\u672c\u5df2\u53d1\u5e03" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u7248\u672c\uff1a** {{release.tag_name}}\n**\u53d1\u5e03\u540d\u79f0\uff1a** {{release.name}}\n**\u53d1\u5e03\u8005\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "{{release.body}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u53d1\u5e03" + }, + "url": "{{release.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "prereleased" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd36 \u9884\u53d1\u5e03\u7248\u672c\u5df2\u53d1\u5e03" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u7248\u672c\uff1a** {{release.tag_name}}\n**\u53d1\u5e03\u540d\u79f0\uff1a** {{release.name}}\n**\u53d1\u5e03\u8005\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "\u26a0\ufe0f \u8fd9\u662f\u4e00\u4e2a\u9884\u53d1\u5e03\u7248\u672c" + } + ] + }, + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "{{release.body}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u9884\u53d1\u5e03" + }, + "url": "{{release.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcdd \u8349\u7a3f\u53d1\u5e03\u5df2\u521b\u5efa" + }, + "template": "grey" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u7248\u672c\uff1a** {{release.tag_name}}\n**\u53d1\u5e03\u540d\u79f0\uff1a** {{release.name}}\n**\u521b\u5efa\u8005\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "\u8fd9\u662f\u4e00\u4e2a\u8349\u7a3f\u53d1\u5e03\uff08\u5c1a\u672a\u53d1\u5e03\uff09" + } + ] + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8349\u7a3f" + }, + "url": "{{release.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\uddd1\ufe0f \u53d1\u5e03\u5df2\u5220\u9664" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u7248\u672c\uff1a** {{release.tag_name}}\n**\u5220\u9664\u8005\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "\u6b64\u53d1\u5e03\u5df2\u88ab\u5220\u9664" + } + ] + } + ] + } + } + }, + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\ude80 \u53d1\u5e03 {{action}}" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u7248\u672c\uff1a** {{release.tag_name}}\n**\u53d1\u5e03\u540d\u79f0\uff1a** {{release.name}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u53d1\u5e03" + }, + "url": "{{release.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 release \u5df2\u7f16\u8f91" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "released" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 release released" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unpublished" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 release unpublished" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/repository.json b/example-configs/templates/cn/repository.json new file mode 100644 index 0000000..ab97cad --- /dev/null +++ b/example-configs/templates/cn/repository.json @@ -0,0 +1,461 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83c\udff7\ufe0f \u4ed3\u5e93\u53d8\u66f4\uff1a{{repository.full_name}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u64cd\u4f5c\uff1a** {{action}}\n**\u4ed3\u5e93\uff1a** {{repository.full_name}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u4ed3\u5e93" + }, + "url": "{{repository.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "archived" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4ed3\u5e93 \u5df2\u5f52\u6863" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4ed3\u5e93 \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4ed3\u5e93 \u5df2\u5220\u9664" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4ed3\u5e93 \u5df2\u7f16\u8f91" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "privatized" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4ed3\u5e93 \u5df2\u79c1\u6709\u5316" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "publicized" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4ed3\u5e93 \u5df2\u516c\u5f00" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "renamed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4ed3\u5e93 \u5df2\u91cd\u547d\u540d" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "transferred" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4ed3\u5e93 \u5df2\u8f6c\u79fb" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unarchived" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4ed3\u5e93 \u5df2\u53d6\u6d88\u5f52\u6863" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/repository_advisory.json b/example-configs/templates/cn/repository_advisory.json new file mode 100644 index 0000000..77869bb --- /dev/null +++ b/example-configs/templates/cn/repository_advisory.json @@ -0,0 +1,96 @@ +{ + "payloads": [ + { + "tags": [ + "published" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4ed3\u5e93\u516c\u544a \u5df2\u53d1\u5e03" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reported" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4ed3\u5e93\u516c\u544a \u5df2\u62a5\u544a" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/repository_dispatch.json b/example-configs/templates/cn/repository_dispatch.json new file mode 100644 index 0000000..f926bbc --- /dev/null +++ b/example-configs/templates/cn/repository_dispatch.json @@ -0,0 +1,50 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4ed3\u5e93\u8c03\u5ea6" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/repository_import.json b/example-configs/templates/cn/repository_import.json new file mode 100644 index 0000000..51ffa5f --- /dev/null +++ b/example-configs/templates/cn/repository_import.json @@ -0,0 +1,50 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4ed3\u5e93\u5bfc\u5165" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/repository_ruleset.json b/example-configs/templates/cn/repository_ruleset.json new file mode 100644 index 0000000..77af7f6 --- /dev/null +++ b/example-configs/templates/cn/repository_ruleset.json @@ -0,0 +1,142 @@ +{ + "payloads": [ + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4ed3\u5e93\u89c4\u5219\u96c6 \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4ed3\u5e93\u89c4\u5219\u96c6 \u5df2\u5220\u9664" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4ed3\u5e93\u89c4\u5219\u96c6 \u5df2\u7f16\u8f91" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/repository_vulnerability_alert.json b/example-configs/templates/cn/repository_vulnerability_alert.json new file mode 100644 index 0000000..e091f8e --- /dev/null +++ b/example-configs/templates/cn/repository_vulnerability_alert.json @@ -0,0 +1,188 @@ +{ + "payloads": [ + { + "tags": [ + "create" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4ed3\u5e93\u6f0f\u6d1e\u8b66\u62a5 \u521b\u5efa" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "dismiss" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4ed3\u5e93\u6f0f\u6d1e\u8b66\u62a5 \u9a73\u56de" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reopen" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4ed3\u5e93\u6f0f\u6d1e\u8b66\u62a5 \u91cd\u65b0\u6253\u5f00" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "resolve" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u4ed3\u5e93\u6f0f\u6d1e\u8b66\u62a5 \u89e3\u51b3" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/secret_scanning_alert.json b/example-configs/templates/cn/secret_scanning_alert.json new file mode 100644 index 0000000..e0ed33b --- /dev/null +++ b/example-configs/templates/cn/secret_scanning_alert.json @@ -0,0 +1,263 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd10 \u5bc6\u94a5\u626b\u63cf\u8b66\u544a{{action}}" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u5bc6\u94a5\u7c7b\u578b\uff1a** {{alert_secret_type}}\n**\u72b6\u6001\uff1a** {{alert_state}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5bc6\u94a5\u626b\u63cf\u8b66\u62a5 \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "publicly_leaked" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5bc6\u94a5\u626b\u63cf\u8b66\u62a5 \u516c\u5f00\u6cc4\u9732" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reopened" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5bc6\u94a5\u626b\u63cf\u8b66\u62a5 \u5df2\u91cd\u65b0\u6253\u5f00" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "resolved" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5bc6\u94a5\u626b\u63cf\u8b66\u62a5 \u5df2\u89e3\u51b3" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "validated" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5bc6\u94a5\u626b\u63cf\u8b66\u62a5 \u5df2\u9a8c\u8bc1" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/secret_scanning_alert_location.json b/example-configs/templates/cn/secret_scanning_alert_location.json new file mode 100644 index 0000000..686047d --- /dev/null +++ b/example-configs/templates/cn/secret_scanning_alert_location.json @@ -0,0 +1,50 @@ +{ + "payloads": [ + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5bc6\u94a5\u626b\u63cf\u8b66\u62a5\u4f4d\u7f6e \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/secret_scanning_scan.json b/example-configs/templates/cn/secret_scanning_scan.json new file mode 100644 index 0000000..726ba03 --- /dev/null +++ b/example-configs/templates/cn/secret_scanning_scan.json @@ -0,0 +1,50 @@ +{ + "payloads": [ + { + "tags": [ + "completed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5bc6\u94a5\u626b\u63cf \u5df2\u5b8c\u6210" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/security_advisory.json b/example-configs/templates/cn/security_advisory.json new file mode 100644 index 0000000..44ae53b --- /dev/null +++ b/example-configs/templates/cn/security_advisory.json @@ -0,0 +1,171 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd12 \u5b89\u5168\u901a\u544a\uff1a{{action}}" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u901a\u544a\uff1a** {{security_advisory.summary | default('\u8be6\u60c5\u8bf7\u67e5\u770b\u5b89\u5168\u901a\u544a')}}\n**\u4e25\u91cd\u5ea6\uff1a** {{security_advisory.severity | default('N/A')}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "published" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5b89\u5168\u516c\u544a \u5df2\u53d1\u5e03" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "updated" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5b89\u5168\u516c\u544a \u5df2\u66f4\u65b0" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "withdrawn" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5b89\u5168\u516c\u544a \u5df2\u64a4\u56de" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/security_and_analysis.json b/example-configs/templates/cn/security_and_analysis.json new file mode 100644 index 0000000..647eca2 --- /dev/null +++ b/example-configs/templates/cn/security_and_analysis.json @@ -0,0 +1,50 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5b89\u5168\u4e0e\u5206\u6790" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/sponsorship.json b/example-configs/templates/cn/sponsorship.json new file mode 100644 index 0000000..93f89dd --- /dev/null +++ b/example-configs/templates/cn/sponsorship.json @@ -0,0 +1,292 @@ +{ + "payloads": [ + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udc96 \u65b0\u8d5e\u52a9\u8005\uff01" + }, + "template": "pink" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u8d5e\u52a9\u8005\uff1a** {{sponsor_login}}\n**\u7b49\u7ea7\uff1a** {{tier_name}}\n**\u91d1\u989d\uff1a** ${{tier_monthly_price_in_dollars}}/\u6708\n" + } + } + ] + } + } + }, + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udc96 \u8d5e\u52a9{{action}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u8d5e\u52a9\u8005\uff1a** {{sponsor_login}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "cancelled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u8d5e\u52a9 \u5df2\u53d6\u6d88" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u8d5e\u52a9 \u5df2\u7f16\u8f91" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "pending_cancellation" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u8d5e\u52a9 \u5f85\u53d6\u6d88" + }, + "template": "yellow" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "pending_tier_change" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u8d5e\u52a9 \u5f85\u53d8\u66f4\u7b49\u7ea7" + }, + "template": "yellow" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "tier_changed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u8d5e\u52a9 \u7b49\u7ea7\u5df2\u53d8\u66f4" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/star.json b/example-configs/templates/cn/star.json new file mode 100644 index 0000000..021412c --- /dev/null +++ b/example-configs/templates/cn/star.json @@ -0,0 +1,125 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2b50 {{action}} by {{sender_name | default(sender.login)}}" + }, + "template": "yellow" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository.full_name}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u661f\u6807 \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u661f\u6807 \u5df2\u5220\u9664" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/status.json b/example-configs/templates/cn/status.json new file mode 100644 index 0000000..595973d --- /dev/null +++ b/example-configs/templates/cn/status.json @@ -0,0 +1,33 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd01 \u72b6\u6001\u66f4\u65b0\uff1a{{state}}" + }, + "template": "gray" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository.full_name}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + } + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/sub_issues.json b/example-configs/templates/cn/sub_issues.json new file mode 100644 index 0000000..c71f0f9 --- /dev/null +++ b/example-configs/templates/cn/sub_issues.json @@ -0,0 +1,188 @@ +{ + "payloads": [ + { + "tags": [ + "parent_issue_added" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5b50 Issue \u7236 Issue \u5df2\u6dfb\u52a0" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "parent_issue_removed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5b50 Issue \u7236 Issue \u5df2\u79fb\u9664" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "sub_issue_added" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5b50 Issue \u5b50 Issue \u5df2\u6dfb\u52a0" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "sub_issue_removed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5b50 Issue \u5b50 Issue \u5df2\u79fb\u9664" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/team.json b/example-configs/templates/cn/team.json new file mode 100644 index 0000000..158ab55 --- /dev/null +++ b/example-configs/templates/cn/team.json @@ -0,0 +1,263 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udc65 \u56e2\u961f\u4e8b\u4ef6\uff1a{{action}} {{team.name}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u56e2\u961f\uff1a** {{team.name}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "added_to_repository" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u56e2\u961f \u5df2\u6dfb\u52a0\u5230\u4ed3\u5e93" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u56e2\u961f \u5df2\u521b\u5efa" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u56e2\u961f \u5df2\u5220\u9664" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u56e2\u961f \u5df2\u7f16\u8f91" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "removed_from_repository" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u56e2\u961f \u5df2\u4ece\u4ed3\u5e93\u79fb\u9664" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/team_add.json b/example-configs/templates/cn/team_add.json new file mode 100644 index 0000000..0313252 --- /dev/null +++ b/example-configs/templates/cn/team_add.json @@ -0,0 +1,50 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u56e2\u961f\u6dfb\u52a0" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/watch.json b/example-configs/templates/cn/watch.json new file mode 100644 index 0000000..8de7919 --- /dev/null +++ b/example-configs/templates/cn/watch.json @@ -0,0 +1,79 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u6765\u81ea {{sender_name | default(sender.login)}} \u7684\u5173\u6ce8\uff1a{{action}}" + }, + "template": "yellow" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository.full_name}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "started" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5173\u6ce8 \u5df2\u5f00\u59cb" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/workflow_dispatch.json b/example-configs/templates/cn/workflow_dispatch.json new file mode 100644 index 0000000..39f2039 --- /dev/null +++ b/example-configs/templates/cn/workflow_dispatch.json @@ -0,0 +1,50 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5de5\u4f5c\u6d41\u8c03\u5ea6" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/workflow_job.json b/example-configs/templates/cn/workflow_job.json new file mode 100644 index 0000000..e6b6fbd --- /dev/null +++ b/example-configs/templates/cn/workflow_job.json @@ -0,0 +1,259 @@ +{ + "payloads": [ + { + "tags": [ + "completed", + "success" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2705 \u4efb\u52a1\u6210\u529f\uff1a{{job_name}}" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4efb\u52a1\uff1a** {{job_name}}\n**\u5de5\u4f5c\u6d41\uff1a** {{workflow_name}}\n**\u72b6\u6001\uff1a** {{job_status}}\n**\u7ed3\u679c\uff1a** {{job_conclusion}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u4efb\u52a1" + }, + "url": "{{job_html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "completed", + "failure" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u274c \u4efb\u52a1\u5931\u8d25\uff1a{{job_name}}" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4efb\u52a1\uff1a** {{job_name}}\n**\u5de5\u4f5c\u6d41\uff1a** {{workflow_name}}\n**\u72b6\u6001\uff1a** {{job_status}}\n**\u7ed3\u679c\uff1a** {{job_conclusion}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u4efb\u52a1" + }, + "url": "{{job_html_url}}", + "type": "danger" + } + ] + } + ] + } + } + }, + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2699\ufe0f \u4efb\u52a1{{action}}\uff1a{{job_name}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4efb\u52a1\uff1a** {{job_name}}\n**\u5de5\u4f5c\u6d41\uff1a** {{workflow_name}}\n**\u72b6\u6001\uff1a** {{job_status}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "in_progress" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5de5\u4f5c\u6d41\u4f5c\u4e1a \u8fdb\u884c\u4e2d" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "queued" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5de5\u4f5c\u6d41\u4f5c\u4e1a \u5df2\u6392\u961f" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "waiting" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 \u5de5\u4f5c\u6d41\u4f5c\u4e1a \u7b49\u5f85\u4e2d" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/cn/workflow_run.json b/example-configs/templates/cn/workflow_run.json new file mode 100644 index 0000000..e112762 --- /dev/null +++ b/example-configs/templates/cn/workflow_run.json @@ -0,0 +1,319 @@ +{ + "payloads": [ + { + "tags": [ + "completed", + "success" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2705 \u5de5\u4f5c\u6d41\u6267\u884c\u6210\u529f" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u5de5\u4f5c\u6d41\uff1a** {{workflow.name}}\n**\u8fd0\u884c\u7f16\u53f7\uff1a** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**\u5206\u652f\uff1a** {{workflow_run.head_branch}}\n**\u89e6\u53d1\u8005\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "\u2705 \u6240\u6709\u68c0\u67e5\u5df2\u901a\u8fc7" + } + ] + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8fd0\u884c" + }, + "url": "{{workflow_run.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "completed", + "failure" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u274c \u5de5\u4f5c\u6d41\u6267\u884c\u5931\u8d25" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u5de5\u4f5c\u6d41\uff1a** {{workflow.name}}\n**\u8fd0\u884c\u7f16\u53f7\uff1a** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**\u5206\u652f\uff1a** {{workflow_run.head_branch}}\n**\u89e6\u53d1\u8005\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "\u274c \u5de5\u4f5c\u6d41\u6267\u884c\u5931\u8d25" + } + ] + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u65e5\u5fd7" + }, + "url": "{{workflow_run.html_url}}", + "type": "danger" + } + ] + } + ] + } + } + }, + { + "tags": [ + "completed", + "cancelled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u26a0\ufe0f \u5de5\u4f5c\u6d41\u5df2\u53d6\u6d88" + }, + "template": "yellow" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u5de5\u4f5c\u6d41\uff1a** {{workflow.name}}\n**\u8fd0\u884c\u7f16\u53f7\uff1a** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**\u5206\u652f\uff1a** {{workflow_run.head_branch}}\n**\u53d6\u6d88\u8005\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "\u6b64\u5de5\u4f5c\u6d41\u8fd0\u884c\u5df2\u88ab\u53d6\u6d88" + } + ] + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8fd0\u884c" + }, + "url": "{{workflow_run.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "in_progress" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u23f3 \u5de5\u4f5c\u6d41\u8fd0\u884c\u4e2d" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u5de5\u4f5c\u6d41\uff1a** {{workflow.name}}\n**\u8fd0\u884c\u7f16\u53f7\uff1a** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**\u5206\u652f\uff1a** {{workflow_run.head_branch}}\n**\u89e6\u53d1\u8005\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "\u23f3 \u5de5\u4f5c\u6d41\u6b63\u5728\u8fd0\u884c\u4e2d..." + } + ] + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8fdb\u5ea6" + }, + "url": "{{workflow_run.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2699\ufe0f \u5de5\u4f5c\u6d41 {{action}}" + }, + "template": "purple" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u5de5\u4f5c\u6d41\uff1a** {{workflow.name}}\n**\u8fd0\u884c\u7f16\u53f7\uff1a** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**\u72b6\u6001\uff1a** {{workflow_run.conclusion | default(workflow_run.status)}}\n**\u64cd\u4f5c\uff1a** {{action}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8fd0\u884c" + }, + "url": "{{workflow_run.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "requested" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 workflow_run \u5df2\u8bf7\u6c42" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "\u67e5\u770b\u8be6\u60c5" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/branch_protection_configuration.json b/example-configs/templates/default/branch_protection_configuration.json new file mode 100644 index 0000000..c145e10 --- /dev/null +++ b/example-configs/templates/default/branch_protection_configuration.json @@ -0,0 +1,96 @@ +{ + "payloads": [ + { + "tags": [ + "disabled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Branch Protection Configuration Disabled" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "enabled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Branch Protection Configuration Enabled" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/branch_protection_rule.json b/example-configs/templates/default/branch_protection_rule.json new file mode 100644 index 0000000..900983c --- /dev/null +++ b/example-configs/templates/default/branch_protection_rule.json @@ -0,0 +1,171 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udee1\ufe0f Branch Protection {{action}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Rule:** {{rule_name}}\n**Action:** {{action}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Branch Protection Rule Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Branch Protection Rule Deleted" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Branch Protection Rule Edited" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/check_run.json b/example-configs/templates/default/check_run.json new file mode 100644 index 0000000..308d65d --- /dev/null +++ b/example-configs/templates/default/check_run.json @@ -0,0 +1,231 @@ +{ + "payloads": [ + { + "tags": [ + "completed", + "success" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2705 Check Succeeded: {{check_run.name}}" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md | default('')}}\n**Check:** {{check_run.name}}\n**Status:** {{check_run.status}}\n**Conclusion:** {{check_run.conclusion}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "completed", + "failure" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u274c Check Failed: {{check_run.name}}" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "Repository:** {{repository_link_md | default('')}}\n**Check:** {{check_run.name}}\n****Status:** {{check_run.status}}\n**Conclusion:** {{check_run.conclusion}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2705 Check Run: {{check_run.name}} {{check_run.status}}" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "Repository:** {{repository_link_md | default('')}}\n**Check:** {{check_run.name}}\n****Status:** {{check_run.status}}\n**Conclusion:** {{check_run.conclusion}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Check Run Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "requested_action" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Check Run Requested Action" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "rerequested" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Check Run Rerequested" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/check_suite.json b/example-configs/templates/default/check_suite.json new file mode 100644 index 0000000..059f2d5 --- /dev/null +++ b/example-configs/templates/default/check_suite.json @@ -0,0 +1,171 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83e\uddea Check Suite: {{action}}" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md | default('')}}\n**Conclusion:** {{check_suite.conclusion | default('N/A')}}\n**Head SHA:** {{check_suite.head_sha}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "completed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Check Suite Completed" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "requested" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Check Suite Requested" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "rerequested" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Check Suite Rerequested" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/code_scanning_alert.json b/example-configs/templates/default/code_scanning_alert.json new file mode 100644 index 0000000..e1dc56c --- /dev/null +++ b/example-configs/templates/default/code_scanning_alert.json @@ -0,0 +1,309 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd0d Code Scanning Alert {{action}}" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Alert:** {{alert_rule_description}}\n**Severity:** {{alert_rule_severity}}\n**State:** {{alert_state}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "appeared_in_branch" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Code Scanning Alert Appeared In Branch" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "closed_by_user" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Code Scanning Alert Closed By User" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Code Scanning Alert Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "fixed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Code Scanning Alert Fixed" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reopened" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Code Scanning Alert Reopened" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reopened_by_user" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Code Scanning Alert Reopened By User" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/commit_comment.json b/example-configs/templates/default/commit_comment.json new file mode 100644 index 0000000..d271dd0 --- /dev/null +++ b/example-configs/templates/default/commit_comment.json @@ -0,0 +1,93 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcac Commit Comment" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Commit:** {{commit_sha_short}}\n**Author:** {{sender_link_md}}\n**Comment:** {{comment_body}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Comment" + }, + "url": "{{comment_html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Commit Comment Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/create.json b/example-configs/templates/default/create.json new file mode 100644 index 0000000..735092e --- /dev/null +++ b/example-configs/templates/default/create.json @@ -0,0 +1,33 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2728 Created: {{ref_type}} in {{repository.full_name}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Creator:** {{sender_link_md | default(sender.login)}}\n**Type:** {{ref_type}} Name: {{ref}}\n" + } + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/custom_property.json b/example-configs/templates/default/custom_property.json new file mode 100644 index 0000000..e3a3a4c --- /dev/null +++ b/example-configs/templates/default/custom_property.json @@ -0,0 +1,188 @@ +{ + "payloads": [ + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Custom Property Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Custom Property Deleted" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "promote_to_enterprise" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Custom Property Promote To Enterprise" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "updated" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Custom Property Updated" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/custom_property_values.json b/example-configs/templates/default/custom_property_values.json new file mode 100644 index 0000000..2972f5a --- /dev/null +++ b/example-configs/templates/default/custom_property_values.json @@ -0,0 +1,50 @@ +{ + "payloads": [ + { + "tags": [ + "updated" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Custom Property Values Updated" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/delete.json b/example-configs/templates/default/delete.json new file mode 100644 index 0000000..49b256a --- /dev/null +++ b/example-configs/templates/default/delete.json @@ -0,0 +1,33 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\uddd1\ufe0f Deleted: {{ref_type}} in {{repository.full_name}}" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Actor:** {{sender_link_md | default(sender.login)}}\n**Deleted:** {{ref_type}} {{ref}}\n" + } + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/dependabot_alert.json b/example-configs/templates/default/dependabot_alert.json new file mode 100644 index 0000000..a2e58ea --- /dev/null +++ b/example-configs/templates/default/dependabot_alert.json @@ -0,0 +1,355 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83e\udd16 Dependabot Alert {{action}}" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Package:** {{alert_package_name}}\n**Severity:** {{alert_severity}}\n**State:** {{alert_state}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "auto_dismissed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Dependabot Alert Auto Dismissed" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "auto_reopened" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Dependabot Alert Auto Reopened" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Dependabot Alert Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "dismissed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Dependabot Alert Dismissed" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "fixed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Dependabot Alert Fixed" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reintroduced" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Dependabot Alert Reintroduced" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reopened" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Dependabot Alert Reopened" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/deploy_key.json b/example-configs/templates/default/deploy_key.json new file mode 100644 index 0000000..b1cad6b --- /dev/null +++ b/example-configs/templates/default/deploy_key.json @@ -0,0 +1,96 @@ +{ + "payloads": [ + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Deploy Key Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Deploy Key Deleted" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/deployment.json b/example-configs/templates/default/deployment.json new file mode 100644 index 0000000..847aa14 --- /dev/null +++ b/example-configs/templates/default/deployment.json @@ -0,0 +1,33 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udea2 Deployment: {{deployment.environment}}" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Ref:** {{deployment.ref}}\n**Environment:** {{deployment.environment}}\n**Actor:** {{sender_link_md | default(sender.login)}}\n" + } + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/deployment_protection_rule.json b/example-configs/templates/default/deployment_protection_rule.json new file mode 100644 index 0000000..f357a0d --- /dev/null +++ b/example-configs/templates/default/deployment_protection_rule.json @@ -0,0 +1,50 @@ +{ + "payloads": [ + { + "tags": [ + "requested" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Deployment Protection Rule Requested" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/deployment_review.json b/example-configs/templates/default/deployment_review.json new file mode 100644 index 0000000..f3dd7cf --- /dev/null +++ b/example-configs/templates/default/deployment_review.json @@ -0,0 +1,137 @@ +{ + "payloads": [ + { + "tags": [ + "approved" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2705 Deployment Approved" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Reviewer:** {{sender_link_md}}\n**Environment:** {{environment}}\n**Comment:** {{comment}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "rejected" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u274c Deployment Rejected" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Reviewer:** {{sender_link_md}}\n**Environment:** {{environment}}\n**Comment:** {{comment}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Deployment Review {{action}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Reviewer:** {{sender_link_md}}\n**Environment:** {{environment}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "requested" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Deployment Review Requested" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/deployment_status.json b/example-configs/templates/default/deployment_status.json new file mode 100644 index 0000000..43b77d9 --- /dev/null +++ b/example-configs/templates/default/deployment_status.json @@ -0,0 +1,33 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udce3 Deployment status: {{deployment_status.state}}" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Ref:** {{deployment.ref}}\n**State:** {{deployment_status.state}}\n**Description:** {{deployment_status.description}}\n" + } + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/discussion.json b/example-configs/templates/default/discussion.json new file mode 100644 index 0000000..837e933 --- /dev/null +++ b/example-configs/templates/default/discussion.json @@ -0,0 +1,685 @@ +{ + "payloads": [ + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcac New Discussion Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Title:** {{discussion.title}}\n**Author:** {{sender_link_md}}\n**Category:** {{discussion.category.name}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "{{discussion.body}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "Join Discussion" + }, + "url": "{{discussion.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "answered" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2705 Discussion Answered" + }, + "template": "purple" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Discussion:** {{discussion.title}}\n**Answered by:** {{sender_link_md}}\n**Category:** {{discussion.category.name}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "An answer has been marked for this discussion" + } + ] + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Answer" + }, + "url": "{{discussion.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "locked" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd12 Discussion Locked" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Discussion:** {{discussion.title}}\n**Locked by:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "This discussion has been locked" + } + ] + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Discussion" + }, + "url": "{{discussion.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unlocked" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd13 Discussion Unlocked" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Discussion:** {{discussion.title}}\n**Unlocked by:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "This discussion is now open for comments" + } + ] + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "Join Discussion" + }, + "url": "{{discussion.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "closed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udccb Discussion Closed" + }, + "template": "grey" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Discussion:** {{discussion.title}}\n**Closed by:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Discussion" + }, + "url": "{{discussion.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcac Discussion {{action}}" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Discussion:** {{discussion.title}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}\n**Category:** {{discussion.category.name}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Discussion" + }, + "url": "{{discussion.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Discussion Deleted" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Discussion Edited" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "labeled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Discussion Labeled" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "pinned" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Discussion Pinned" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "transferred" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Discussion Transferred" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unanswered" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Discussion Unanswered" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unlabeled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Discussion Unlabeled" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unpinned" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Discussion Unpinned" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/discussion_comment.json b/example-configs/templates/default/discussion_comment.json new file mode 100644 index 0000000..578c40e --- /dev/null +++ b/example-configs/templates/default/discussion_comment.json @@ -0,0 +1,185 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcac Discussion Comment: {{discussion.title}}" + }, + "template": "teal" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Author:** {{sender_link_md | default(sender.login)}}\n**Discussion:** {{discussion.title}}\n**Comment:** {{comment.body}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Comment" + }, + "url": "{{comment.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Discussion Comment Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Discussion Comment Deleted" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Discussion Comment Edited" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/fork.json b/example-configs/templates/default/fork.json new file mode 100644 index 0000000..ef369ef --- /dev/null +++ b/example-configs/templates/default/fork.json @@ -0,0 +1,47 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83c\udf74 Fork: {{forkee.full_name}}" + }, + "template": "purple" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Forked repo to:** {{forkee.full_name}}\n**Forker:** {{sender_link_md | default(sender.login)}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View fork" + }, + "url": "{{forkee.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/github_app_authorization.json b/example-configs/templates/default/github_app_authorization.json new file mode 100644 index 0000000..43085db --- /dev/null +++ b/example-configs/templates/default/github_app_authorization.json @@ -0,0 +1,50 @@ +{ + "payloads": [ + { + "tags": [ + "revoked" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Github App Authorization Revoked" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/gollum.json b/example-configs/templates/default/gollum.json new file mode 100644 index 0000000..8d3511a --- /dev/null +++ b/example-configs/templates/default/gollum.json @@ -0,0 +1,47 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcda Wiki Update: {{repository.full_name}}" + }, + "template": "gray" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Pusher:** {{sender_link_md | default(sender.login)}}\n**Changes:** {{pages | length}} pages updated\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View repo" + }, + "url": "{{repository.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/installation.json b/example-configs/templates/default/installation.json new file mode 100644 index 0000000..afde93b --- /dev/null +++ b/example-configs/templates/default/installation.json @@ -0,0 +1,263 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83e\udd16 GitHub App {{action}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**App:** {{app_name}}\n**Action:** {{action}}\n**Installer:** {{sender_link_md}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Installation Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Installation Deleted" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "new_permissions_accepted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Installation New Permissions Accepted" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "suspend" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Installation Suspend" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unsuspend" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Installation Unsuspend" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/installation_repositories.json b/example-configs/templates/default/installation_repositories.json new file mode 100644 index 0000000..1d2bdb0 --- /dev/null +++ b/example-configs/templates/default/installation_repositories.json @@ -0,0 +1,96 @@ +{ + "payloads": [ + { + "tags": [ + "added" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Installation Repositories Added" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "removed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Installation Repositories Removed" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/installation_target.json b/example-configs/templates/default/installation_target.json new file mode 100644 index 0000000..0811181 --- /dev/null +++ b/example-configs/templates/default/installation_target.json @@ -0,0 +1,50 @@ +{ + "payloads": [ + { + "tags": [ + "renamed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Installation Target Renamed" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/issue_comment.json b/example-configs/templates/default/issue_comment.json new file mode 100644 index 0000000..9390d93 --- /dev/null +++ b/example-configs/templates/default/issue_comment.json @@ -0,0 +1,369 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcac Issue Comment: #{{issue.number}}" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Author:** {{sender_link_md | default(sender.login)}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**Comment:** {{comment.body}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Comment" + }, + "url": "{{comment.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Issue Comment Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Issue Comment Deleted" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Issue Comment Edited" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "pull_request" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcac PR Comment: #{{issue.number}}" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Author:** {{sender_link_md | default(sender.login)}}\n**Pull Request:** {{issue_link_md | default(issue.html_url | default(''))}}\n**Comment:** {{comment.body}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Comment" + }, + "url": "{{comment.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created", + "pull_request" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 PR Comment Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted", + "pull_request" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 PR Comment Deleted" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited", + "pull_request" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 PR Comment Edited" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/issue_dependencies.json b/example-configs/templates/default/issue_dependencies.json new file mode 100644 index 0000000..4438a28 --- /dev/null +++ b/example-configs/templates/default/issue_dependencies.json @@ -0,0 +1,188 @@ +{ + "payloads": [ + { + "tags": [ + "blocked_by_added" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Issue Dependencies Blocked By Added" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "blocked_by_removed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Issue Dependencies Blocked By Removed" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "blocking_added" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Issue Dependencies Blocking Added" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "blocking_removed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Issue Dependencies Blocking Removed" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/issues.json b/example-configs/templates/default/issues.json new file mode 100644 index 0000000..1572857 --- /dev/null +++ b/example-configs/templates/default/issues.json @@ -0,0 +1,1418 @@ +{ + "payloads": [ + { + "tags": [ + "opened", + "type:bug" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udc1b Bug reported: {{issue.title}}" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udc1b **Bug reported** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**Description:** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Bug" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "opened", + "type:feature" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2728 Feature request: {{issue.title}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\u2728 **Feature request** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**Description:** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Feature" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "opened", + "type:task" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udccb Task created: {{issue.title}}" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udccb **Task created** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**Description:** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Task" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "closed", + "type:bug" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2705 Bug fixed: {{issue.title}}" + }, + "template": "purple" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\u2705 **Bug fixed** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**State:** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Bug" + }, + "url": "{{issue.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "closed", + "type:feature" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2705 Feature completed: {{issue.title}}" + }, + "template": "purple" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\u2705 **Feature completed** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**State:** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Feature" + }, + "url": "{{issue.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "closed", + "type:task" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2705 Task completed: {{issue.title}}" + }, + "template": "purple" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\u2705 **Task completed** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**State:** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Task" + }, + "url": "{{issue.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reopened", + "type:bug" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd04 Bug reopened: {{issue.title}}" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udd04 **Bug reopened** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Bug" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reopened", + "type:feature" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd04 Feature reopened: {{issue.title}}" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udd04 **Feature reopened** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Feature" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reopened", + "type:task" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd04 Task reopened: {{issue.title}}" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udd04 **Task reopened** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Task" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "opened" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcdd Issue opened: {{issue.title}}" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udcdd **Issue opened** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**Description:** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "closed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2705 Issue closed: {{issue.title}}" + }, + "template": "purple" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\u2705 **Issue closed** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**State:** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Issue" + }, + "url": "{{issue.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reopened" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd04 Issue reopened: {{issue.title}}" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udd04 **Issue reopened** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "assigned" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udc64 Issue assigned: {{issue.title}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udc64 **Issue assigned** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if assignee_link_md}}**Assignee:** {{assignee_link_md}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unassigned" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udc64 Issue unassigned: {{issue.title}}" + }, + "template": "grey" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udc64 **Issue unassigned** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if assignee_link_md}}**Removed assignee:** {{assignee_link_md}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Issue" + }, + "url": "{{issue.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u270f\ufe0f Issue edited: {{issue.title}}" + }, + "template": "grey" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\u270f\ufe0f **Issue edited** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if changes_title_from}}**Title changed from:** {{changes_title_from}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Issue" + }, + "url": "{{issue.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "milestoned" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83c\udfaf Milestone added: {{issue.title}}" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83c\udfaf **Milestone added** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if milestone_title}}**Milestone:** {{milestone_title}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "demilestoned" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83c\udfaf Milestone removed: {{issue.title}}" + }, + "template": "grey" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83c\udfaf **Milestone removed** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if milestone_title}}**Removed milestone:** {{milestone_title}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Issue" + }, + "url": "{{issue.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "transferred" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udce6 Issue transferred: {{issue.title}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udce6 **Issue transferred** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if changes_new_repository_full_name}}**To repository:** {{changes_new_repository_full_name}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\uddd1\ufe0f Issue deleted: {{issue.title}}" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\uddd1\ufe0f **Issue deleted** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" + } + } + ] + } + } + }, + { + "tags": [ + "pinned" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udccc Issue pinned: {{issue.title}}" + }, + "template": "yellow" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udccc **Issue pinned** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unpinned" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udccc Issue unpinned: {{issue.title}}" + }, + "template": "grey" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udccc **Issue unpinned** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Issue" + }, + "url": "{{issue.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "locked" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd12 Issue locked: {{issue.title}}" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udd12 **Issue locked** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.active_lock_reason}}**Reason:** {{issue.active_lock_reason}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Issue" + }, + "url": "{{issue.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unlocked" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd13 Issue unlocked: {{issue.title}}" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udd13 **Issue unlocked** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "labeled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83c\udff7\ufe0f Label added: {{labeled_label_name}} on {{issue.title}}" + }, + "template": "teal" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Label:** {{labeled_label_link_md | default(labeled_label_name)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**By:** {{sender_link_md | default(sender.login)}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unlabeled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83c\udff7\ufe0f Label removed: {{labeled_label_name}} from {{issue.title}}" + }, + "template": "grey" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Label:** {{labeled_label_link_md | default(labeled_label_name)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**By:** {{sender_link_md | default(sender.login)}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Issue" + }, + "url": "{{issue.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "typed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u270f\ufe0f Issue typed: {{issue.title}}" + }, + "template": "yellow" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\u270f\ufe0f **Issue typed** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_type}}**Type:** {{issue_type}}{{/if}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "untyped" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u270f\ufe0f Issue type removed: {{issue.title}}" + }, + "template": "grey" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\u270f\ufe0f **Issue type removed** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Issue" + }, + "url": "{{issue.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "type:bug" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udc1e Bug: {{issue.title}}" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udc1b **Bug reported** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "type:feature" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2728 Feature: {{issue.title}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\u2728 **Feature request** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "type:task" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcdd Task: {{issue.title}}" + }, + "template": "yellow" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\ud83d\udcdd **Task created** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "type:unknown" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u26a0\ufe0f Issue: {{issue.title}}" + }, + "template": "yellow" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "\u26a0\ufe0f **Issue** by {{sender_link_md | default(sender.login)}} {{issue_type_display | default(issue_user_link_md | default(''))}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "labeled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83c\udff7\ufe0f Label added: {{labeled_label_name}} on {{issue.title}}" + }, + "template": "teal" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**Label:** {{labeled_label_link_md | default(labeled_label_name)}}\n**By:** {{sender_link_md | default(sender.login)}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcdd Issue: {{issue.title}}" + }, + "template": "gray" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**Author:** {{sender_link_md | default(sender.login)}}\n**State:** {{issue.state | default('unknown')}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Issue" + }, + "url": "{{issue.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/label.json b/example-configs/templates/default/label.json new file mode 100644 index 0000000..7cf7ebd --- /dev/null +++ b/example-configs/templates/default/label.json @@ -0,0 +1,171 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83c\udff7\ufe0f Label {{action}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Label:** {{label_name}}\n**Action:** {{action}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Label Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Label Deleted" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Label Edited" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/marketplace_purchase.json b/example-configs/templates/default/marketplace_purchase.json new file mode 100644 index 0000000..bac13f9 --- /dev/null +++ b/example-configs/templates/default/marketplace_purchase.json @@ -0,0 +1,234 @@ +{ + "payloads": [ + { + "tags": [ + "cancelled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Marketplace Purchase Cancelled" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "changed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Marketplace Purchase Changed" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "pending_change" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Marketplace Purchase Pending Change" + }, + "template": "yellow" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "pending_change_cancelled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Marketplace Purchase Pending Change Cancelled" + }, + "template": "yellow" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "purchased" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Marketplace Purchase Purchased" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/member.json b/example-configs/templates/default/member.json new file mode 100644 index 0000000..d544386 --- /dev/null +++ b/example-configs/templates/default/member.json @@ -0,0 +1,171 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udc64 Member event: {{action}} {{member.login}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Member:** {{member.login}}\n**Action:** {{action}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "added" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Member Added" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Member Edited" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "removed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Member Removed" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/membership.json b/example-configs/templates/default/membership.json new file mode 100644 index 0000000..1046ae6 --- /dev/null +++ b/example-configs/templates/default/membership.json @@ -0,0 +1,125 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2795 Membership: {{action}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Member:** {{member.user.login}}\n**Action:** {{action}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "added" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Membership Added" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "removed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Membership Removed" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/merge_group.json b/example-configs/templates/default/merge_group.json new file mode 100644 index 0000000..0bd52de --- /dev/null +++ b/example-configs/templates/default/merge_group.json @@ -0,0 +1,125 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd00 Merge Queue {{action}}" + }, + "template": "purple" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Head SHA:** {{merge_group_head_sha}}\n**Action:** {{action}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "checks_requested" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Merge Group Checks Requested" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "destroyed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Merge Group Destroyed" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/meta.json b/example-configs/templates/default/meta.json new file mode 100644 index 0000000..7629f50 --- /dev/null +++ b/example-configs/templates/default/meta.json @@ -0,0 +1,50 @@ +{ + "payloads": [ + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Meta Deleted" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/milestone.json b/example-configs/templates/default/milestone.json new file mode 100644 index 0000000..272b60c --- /dev/null +++ b/example-configs/templates/default/milestone.json @@ -0,0 +1,263 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83c\udfc1 Milestone: {{action}} {{milestone.title}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Milestone:** {{milestone.title}}\n**Description:** {{milestone.description}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "closed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Milestone Closed" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Milestone Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Milestone Deleted" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Milestone Edited" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "opened" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Milestone Opened" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/org_block.json b/example-configs/templates/default/org_block.json new file mode 100644 index 0000000..062413f --- /dev/null +++ b/example-configs/templates/default/org_block.json @@ -0,0 +1,96 @@ +{ + "payloads": [ + { + "tags": [ + "blocked" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Org Block Blocked" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unblocked" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Org Block Unblocked" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/organization.json b/example-configs/templates/default/organization.json new file mode 100644 index 0000000..95ba86a --- /dev/null +++ b/example-configs/templates/default/organization.json @@ -0,0 +1,171 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83c\udfe2 Organization change: {{action}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Organization:** {{organization.login}}\n**Member:** {{membership.user.login | default('N/A')}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "member_added" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Organization Member Added" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "member_invited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Organization Member Invited" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "member_removed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Organization Member Removed" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/package.json b/example-configs/templates/default/package.json new file mode 100644 index 0000000..bd1bafc --- /dev/null +++ b/example-configs/templates/default/package.json @@ -0,0 +1,125 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udce6 Package: {{action}} {{package.name | default('package')}}" + }, + "template": "purple" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Package:** {{package_link_md | default(package.name)}}\n**Action:** {{action}}\n**Type:** {{package.package_type | default('')}}\n**Version/Tag:** {{package.version | default('')}} {{package_tag_name | default(package.tag_name | default(''))}}\n**Published by:** {{sender_link_md | default(pusher_link_md | default(''))}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "published" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Package Published" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "updated" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Package Updated" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/page_build.json b/example-configs/templates/default/page_build.json new file mode 100644 index 0000000..c0f8c97 --- /dev/null +++ b/example-configs/templates/default/page_build.json @@ -0,0 +1,33 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcc4 Page Build: {{action}}" + }, + "template": "gray" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository.full_name}}\n**Action:** {{action}}\n" + } + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/personal_access_token_request.json b/example-configs/templates/default/personal_access_token_request.json new file mode 100644 index 0000000..5114d52 --- /dev/null +++ b/example-configs/templates/default/personal_access_token_request.json @@ -0,0 +1,188 @@ +{ + "payloads": [ + { + "tags": [ + "approved" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Personal Access Token Request Approved" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "cancelled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Personal Access Token Request Cancelled" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Personal Access Token Request Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "denied" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Personal Access Token Request Denied" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/ping.json b/example-configs/templates/default/ping.json new file mode 100644 index 0000000..32a2f7f --- /dev/null +++ b/example-configs/templates/default/ping.json @@ -0,0 +1,33 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2705 GitHub Webhook Successfully Added" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**GitHub says:** {{zen}}\n\n{{#if repository}}**Repository:** [{{repository.full_name}}]({{repository.html_url}})\n{{/if}}{{#if organization}}**Organization:** [{{organization.login}}](https://github.com/{{organization.login}})\n{{/if}}**Hook ID:** {{hook_id}}\n**Hook Type:** {{hook_type}}" + } + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/project.json b/example-configs/templates/default/project.json new file mode 100644 index 0000000..92db7ca --- /dev/null +++ b/example-configs/templates/default/project.json @@ -0,0 +1,263 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udccb Project: {{action}} {{project.name}}" + }, + "template": "brown" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Project:** {{project.name}}\n**Action:** {{action}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "closed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Project Closed" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Project Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Project Deleted" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reopened" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Project Reopened" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "updated" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Project Updated" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/project_card.json b/example-configs/templates/default/project_card.json new file mode 100644 index 0000000..e6761ea --- /dev/null +++ b/example-configs/templates/default/project_card.json @@ -0,0 +1,263 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83c\udccf Project Card: {{action}}" + }, + "template": "brown" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Card:** {{project_card.note | default('No note')}}\n**Action:** {{action}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "converted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Project Card Converted" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Project Card Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Project Card Deleted" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Project Card Edited" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "moved" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Project Card Moved" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/project_column.json b/example-configs/templates/default/project_column.json new file mode 100644 index 0000000..e9b6ac9 --- /dev/null +++ b/example-configs/templates/default/project_column.json @@ -0,0 +1,217 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcd0 Project Column: {{action}}" + }, + "template": "brown" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Column:** {{project_column.name}}\n**Action:** {{action}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Project Column Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Project Column Deleted" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "moved" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Project Column Moved" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "updated" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Project Column Updated" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/projects_v2.json b/example-configs/templates/default/projects_v2.json new file mode 100644 index 0000000..28c7cfd --- /dev/null +++ b/example-configs/templates/default/projects_v2.json @@ -0,0 +1,263 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udccb Project {{action}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Project:** {{project_title}}\n**Action:** {{action}}\n**Creator:** {{sender_link_md}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "closed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Projects V2 Closed" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Projects V2 Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Projects V2 Deleted" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Projects V2 Edited" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reopened" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Projects V2 Reopened" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/projects_v2_item.json b/example-configs/templates/default/projects_v2_item.json new file mode 100644 index 0000000..1cb6616 --- /dev/null +++ b/example-configs/templates/default/projects_v2_item.json @@ -0,0 +1,326 @@ +{ + "payloads": [ + { + "tags": [ + "archived" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Projects V2 Item Archived" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "converted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Projects V2 Item Converted" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Projects V2 Item Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Projects V2 Item Deleted" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Projects V2 Item Edited" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reordered" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Projects V2 Item Reordered" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "restored" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Projects V2 Item Restored" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/projects_v2_status_update.json b/example-configs/templates/default/projects_v2_status_update.json new file mode 100644 index 0000000..2585fb5 --- /dev/null +++ b/example-configs/templates/default/projects_v2_status_update.json @@ -0,0 +1,142 @@ +{ + "payloads": [ + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Projects V2 Status Update Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Projects V2 Status Update Deleted" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Projects V2 Status Update Edited" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/public.json b/example-configs/templates/default/public.json new file mode 100644 index 0000000..c8362b4 --- /dev/null +++ b/example-configs/templates/default/public.json @@ -0,0 +1,33 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83c\udf10 Repository made public: {{repository.full_name}}" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository.full_name}} is now public\n" + } + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/pull_request.json b/example-configs/templates/default/pull_request.json new file mode 100644 index 0000000..1f279f7 --- /dev/null +++ b/example-configs/templates/default/pull_request.json @@ -0,0 +1,1114 @@ +{ + "payloads": [ + { + "tags": [ + "closed", + "merged" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd2e Pull Request Merged" + }, + "template": "purple" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Merged by:** {{sender_link_md}}\n**Branch:** {{pr_head_branch_link_md}} \u2192 {{pr_base_branch_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "{{pr_body}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View PR" + }, + "url": "{{pr_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "closed", + "unmerged" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u274c Pull Request Closed (Not Merged)" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Closed by:** {{sender_link_md}}\n**Branch:** {{pr_head_branch_link_md}} \u2192 {{pr_base_branch_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "This PR was closed without merging" + } + ] + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View PR" + }, + "url": "{{pr_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "opened" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd00 New Pull Request Opened" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Author:** {{pr_user_link_md}}\n**Branch:** {{pr_head_branch_link_md}} \u2192 {{pr_base_branch_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "{{pr_body}}" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "Review PR" + }, + "url": "{{pr_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reopened" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd04 Pull Request Reopened" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Reopened by:** {{sender_link_md}}\n**Branch:** {{pr_head_branch_link_md}} \u2192 {{pr_base_branch_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View PR" + }, + "url": "{{pr_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "synchronize" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd04 Pull Request Updated" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Updated by:** {{sender_link_md}}\n**Branch:** {{pr_head_branch_link_md}} \u2192 {{pr_base_branch_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "New commits pushed to this PR" + } + ] + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Changes" + }, + "url": "{{pr_url}}/files", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "ready_for_review" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2705 Pull Request Ready for Review" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Author:** {{pr_user_link_md}}\n**Branch:** {{pr_head_branch_link_md}} \u2192 {{pr_base_branch_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "This PR is ready for review" + } + ] + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "Review Now" + }, + "url": "{{pr_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "converted_to_draft" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcdd Pull Request Converted to Draft" + }, + "template": "grey" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Converted by:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "This PR is now in draft mode" + } + ] + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View PR" + }, + "url": "{{pr_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "review_requested" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udc41\ufe0f Review Requested" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Requested by:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "Review PR" + }, + "url": "{{pr_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd00 Pull Request {{action}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View PR" + }, + "url": "{{pr_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "assigned" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Pull Request Assigned" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "auto_merge_disabled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Pull Request Auto Merge Disabled" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "auto_merge_enabled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Pull Request Auto Merge Enabled" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "demilestoned" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Pull Request Demilestoned" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "dequeued" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Pull Request Dequeued" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Pull Request Edited" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "enqueued" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Pull Request Enqueued" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "labeled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Pull Request Labeled" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "locked" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Pull Request Locked" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "milestoned" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Pull Request Milestoned" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "review_request_removed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Pull Request Review Request Removed" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unassigned" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Pull Request Unassigned" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unlabeled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Pull Request Unlabeled" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unlocked" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Pull Request Unlocked" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/pull_request_review.json b/example-configs/templates/default/pull_request_review.json new file mode 100644 index 0000000..d119468 --- /dev/null +++ b/example-configs/templates/default/pull_request_review.json @@ -0,0 +1,185 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcdd PR Review {{action}}: #{{pull_request.number}}" + }, + "template": "cyan" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Reviewer:** {{review_user_link_md | default(review.user.login)}}\n**PR:** #{{pull_request.number}} {{pull_request.title}}\n**Conclusion:** {{review.state}}\n{{review.body}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Review" + }, + "url": "{{review.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "dismissed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Pull Request Review Dismissed" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Pull Request Review Edited" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "submitted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Pull Request Review Submitted" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/pull_request_review_comment.json b/example-configs/templates/default/pull_request_review_comment.json new file mode 100644 index 0000000..df8452c --- /dev/null +++ b/example-configs/templates/default/pull_request_review_comment.json @@ -0,0 +1,185 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcac PR Review Comment: #{{pull_request.number}}" + }, + "template": "cyan" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Author:** {{sender_link_md | default(sender.login)}}\n**PR:** #{{pull_request.number}}\n**Comment:** {{comment.body}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Comment" + }, + "url": "{{comment.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Pull Request Review Comment Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Pull Request Review Comment Deleted" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Pull Request Review Comment Edited" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/pull_request_review_thread.json b/example-configs/templates/default/pull_request_review_thread.json new file mode 100644 index 0000000..e50e9e5 --- /dev/null +++ b/example-configs/templates/default/pull_request_review_thread.json @@ -0,0 +1,125 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcac PR Review Thread {{action}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**PR:** #{{pull_request.number}} {{pull_request.title}}\n**Thread:** {{thread_comments | length}} comments\n**Action:** {{action}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "resolved" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Pull Request Review Thread Resolved" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unresolved" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Pull Request Review Thread Unresolved" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/push.json b/example-configs/templates/default/push.json new file mode 100644 index 0000000..cb5896b --- /dev/null +++ b/example-configs/templates/default/push.json @@ -0,0 +1,90 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcbe New Push: {{repository.full_name}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "{{pusher_link_md | default(pusher.name)}} pushed {{commits | length}} commits to **{{branch_name}}**\n\n**Repository:** {{repository_link_md | default('')}} \u00b7 {{branch_link_md | default('')}}\n\n**Commit messages:**\n{{commit_messages_joined | default(commit_message | default(pull_request.body | default('No commit messages'))) }}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View commits" + }, + "url": "{{compare_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "force" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udea8 Force Push: {{repository.full_name}}" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Force push detected** by {{sender_link_md | default(sender.login)}} on **{{branch_name}}**\nThis may have rewritten history. Commits: {{commits | length}}\n\n**Repository:** {{repository_link_md | default('')}} \u00b7 {{branch_link_md | default('')}}\n\n**Commit messages:**\n{{commit_messages_joined | default(commit_message | default('No commit messages')) }}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View commits" + }, + "url": "{{compare_url}}", + "type": "primary" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/registry_package.json b/example-configs/templates/default/registry_package.json new file mode 100644 index 0000000..791f752 --- /dev/null +++ b/example-configs/templates/default/registry_package.json @@ -0,0 +1,96 @@ +{ + "payloads": [ + { + "tags": [ + "published" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Registry Package Published" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Package:** {{package_name}}\n**Type:** {{package_type | upper}}\n**Version:** {{package_version}}\n**Published by:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Package" + }, + "url": "{{repository.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "updated" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ufffd Registry Package Updated" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Package:** {{package_name}}\n**Type:** {{package_type | upper}}\n**Version:** {{package_version}}\n**Updated by:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Package" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/release.json b/example-configs/templates/default/release.json new file mode 100644 index 0000000..2c969d1 --- /dev/null +++ b/example-configs/templates/default/release.json @@ -0,0 +1,405 @@ +{ + "payloads": [ + { + "tags": [ + "published" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\ude80 Release Published" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Version:** {{release.tag_name}}\n**Release Name:** {{release.name}}\n**Published by:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "{{release.body}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Release" + }, + "url": "{{release.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "prereleased" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd36 Pre-release Published" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Version:** {{release.tag_name}}\n**Release Name:** {{release.name}}\n**Published by:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "\u26a0\ufe0f This is a pre-release version" + } + ] + }, + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "{{release.body}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Pre-release" + }, + "url": "{{release.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udcdd Release Draft Created" + }, + "template": "grey" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Version:** {{release.tag_name}}\n**Release Name:** {{release.name}}\n**Created by:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "This is a draft release (not published yet)" + } + ] + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Draft" + }, + "url": "{{release.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\uddd1\ufe0f Release Deleted" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Version:** {{release.tag_name}}\n**Deleted by:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "This release has been deleted" + } + ] + } + ] + } + } + }, + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\ude80 Release {{action}}" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Version:** {{release.tag_name}}\n**Release Name:** {{release.name}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Release" + }, + "url": "{{release.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Release Edited" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "released" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Release Released" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unpublished" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Release Unpublished" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/repository.json b/example-configs/templates/default/repository.json new file mode 100644 index 0000000..323227e --- /dev/null +++ b/example-configs/templates/default/repository.json @@ -0,0 +1,461 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83c\udff7\ufe0f Repository change: {{repository.full_name}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository.full_name}}\n**Action:** {{action}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View repo" + }, + "url": "{{repository.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "archived" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Repository Archived" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Repository Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Repository Deleted" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Repository Edited" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "privatized" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Repository Privatized" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "publicized" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Repository Publicized" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "renamed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Repository Renamed" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "transferred" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Repository Transferred" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "unarchived" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Repository Unarchived" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/repository_advisory.json b/example-configs/templates/default/repository_advisory.json new file mode 100644 index 0000000..e282e84 --- /dev/null +++ b/example-configs/templates/default/repository_advisory.json @@ -0,0 +1,96 @@ +{ + "payloads": [ + { + "tags": [ + "published" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Repository Advisory Published" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reported" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Repository Advisory Reported" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/repository_dispatch.json b/example-configs/templates/default/repository_dispatch.json new file mode 100644 index 0000000..8f41b43 --- /dev/null +++ b/example-configs/templates/default/repository_dispatch.json @@ -0,0 +1,50 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Repository Dispatch Event" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/repository_import.json b/example-configs/templates/default/repository_import.json new file mode 100644 index 0000000..739b2c0 --- /dev/null +++ b/example-configs/templates/default/repository_import.json @@ -0,0 +1,50 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Repository Import Event" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/repository_ruleset.json b/example-configs/templates/default/repository_ruleset.json new file mode 100644 index 0000000..8557884 --- /dev/null +++ b/example-configs/templates/default/repository_ruleset.json @@ -0,0 +1,142 @@ +{ + "payloads": [ + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Repository Ruleset Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Repository Ruleset Deleted" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Repository Ruleset Edited" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/repository_vulnerability_alert.json b/example-configs/templates/default/repository_vulnerability_alert.json new file mode 100644 index 0000000..648abbd --- /dev/null +++ b/example-configs/templates/default/repository_vulnerability_alert.json @@ -0,0 +1,188 @@ +{ + "payloads": [ + { + "tags": [ + "create" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Repository Vulnerability Alert Create" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "dismiss" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Repository Vulnerability Alert Dismiss" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reopen" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Repository Vulnerability Alert Reopen" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "resolve" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Repository Vulnerability Alert Resolve" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/secret_scanning_alert.json b/example-configs/templates/default/secret_scanning_alert.json new file mode 100644 index 0000000..938527f --- /dev/null +++ b/example-configs/templates/default/secret_scanning_alert.json @@ -0,0 +1,263 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd10 Secret Scanning Alert {{action}}" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Secret Type:** {{alert_secret_type}}\n**State:** {{alert_state}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Secret Scanning Alert Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "publicly_leaked" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Secret Scanning Alert Publicly Leaked" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "reopened" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Secret Scanning Alert Reopened" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "resolved" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Secret Scanning Alert Resolved" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "validated" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Secret Scanning Alert Validated" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/secret_scanning_alert_location.json b/example-configs/templates/default/secret_scanning_alert_location.json new file mode 100644 index 0000000..0cb3a43 --- /dev/null +++ b/example-configs/templates/default/secret_scanning_alert_location.json @@ -0,0 +1,50 @@ +{ + "payloads": [ + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Secret Scanning Alert Location Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/secret_scanning_scan.json b/example-configs/templates/default/secret_scanning_scan.json new file mode 100644 index 0000000..dd1222a --- /dev/null +++ b/example-configs/templates/default/secret_scanning_scan.json @@ -0,0 +1,50 @@ +{ + "payloads": [ + { + "tags": [ + "completed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Secret Scanning Scan Completed" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/security_advisory.json b/example-configs/templates/default/security_advisory.json new file mode 100644 index 0000000..4dd063c --- /dev/null +++ b/example-configs/templates/default/security_advisory.json @@ -0,0 +1,171 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd12 Security Advisory: {{action}}" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Summary:** {{security_advisory.summary | default('See advisory for details')}}\n**Severity:** {{security_advisory.severity | default('N/A')}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "published" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Security Advisory Published" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "updated" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Security Advisory Updated" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "withdrawn" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Security Advisory Withdrawn" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/security_and_analysis.json b/example-configs/templates/default/security_and_analysis.json new file mode 100644 index 0000000..0da5cf3 --- /dev/null +++ b/example-configs/templates/default/security_and_analysis.json @@ -0,0 +1,50 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Security And Analysis Event" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/sponsorship.json b/example-configs/templates/default/sponsorship.json new file mode 100644 index 0000000..17a798a --- /dev/null +++ b/example-configs/templates/default/sponsorship.json @@ -0,0 +1,292 @@ +{ + "payloads": [ + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udc96 New Sponsor!" + }, + "template": "pink" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Sponsor:** {{sponsor_login}}\n**Tier:** {{tier_name}}\n**Amount:** ${{tier_monthly_price_in_dollars}}/month\n" + } + } + ] + } + } + }, + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udc96 Sponsorship {{action}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Sponsor:** {{sponsor_login}}\n**Action:** {{action}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "cancelled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Sponsorship Cancelled" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Sponsorship Edited" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "pending_cancellation" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Sponsorship Pending Cancellation" + }, + "template": "yellow" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "pending_tier_change" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Sponsorship Pending Tier Change" + }, + "template": "yellow" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "tier_changed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Sponsorship Tier Changed" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/star.json b/example-configs/templates/default/star.json new file mode 100644 index 0000000..f45b0ec --- /dev/null +++ b/example-configs/templates/default/star.json @@ -0,0 +1,125 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2b50 {{action}} by {{sender_name | default(sender.login)}}" + }, + "template": "yellow" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository.full_name}}\n**Action:** {{action}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Star Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Star Deleted" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/status.json b/example-configs/templates/default/status.json new file mode 100644 index 0000000..1b6370c --- /dev/null +++ b/example-configs/templates/default/status.json @@ -0,0 +1,33 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd01 Status update: {{state}}" + }, + "template": "gray" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Context:** {{context}}\n**State:** {{state}}\n" + } + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/sub_issues.json b/example-configs/templates/default/sub_issues.json new file mode 100644 index 0000000..90801c4 --- /dev/null +++ b/example-configs/templates/default/sub_issues.json @@ -0,0 +1,188 @@ +{ + "payloads": [ + { + "tags": [ + "parent_issue_added" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Sub Issues Parent Issue Added" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "parent_issue_removed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Sub Issues Parent Issue Removed" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "sub_issue_added" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Sub Issues Sub Issue Added" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "sub_issue_removed" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Sub Issues Sub Issue Removed" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/team.json b/example-configs/templates/default/team.json new file mode 100644 index 0000000..591380e --- /dev/null +++ b/example-configs/templates/default/team.json @@ -0,0 +1,263 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udc65 Team event: {{action}} {{team.name}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Team:** {{team.name}}\n**Action:** {{action}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "added_to_repository" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Team Added To Repository" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "created" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Team Created" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "deleted" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Team Deleted" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "edited" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Team Edited" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "removed_from_repository" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Team Removed From Repository" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/team_add.json b/example-configs/templates/default/team_add.json new file mode 100644 index 0000000..6301eff --- /dev/null +++ b/example-configs/templates/default/team_add.json @@ -0,0 +1,50 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Team Add Event" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/watch.json b/example-configs/templates/default/watch.json new file mode 100644 index 0000000..6c4bbf1 --- /dev/null +++ b/example-configs/templates/default/watch.json @@ -0,0 +1,79 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Watch: {{action}} by {{sender_name | default(sender.login)}}" + }, + "template": "yellow" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository.full_name}}\n**Action:** {{action}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "started" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Watch Started" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/workflow_dispatch.json b/example-configs/templates/default/workflow_dispatch.json new file mode 100644 index 0000000..b6eb829 --- /dev/null +++ b/example-configs/templates/default/workflow_dispatch.json @@ -0,0 +1,50 @@ +{ + "payloads": [ + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Workflow Dispatch Event" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/workflow_job.json b/example-configs/templates/default/workflow_job.json new file mode 100644 index 0000000..072c2fa --- /dev/null +++ b/example-configs/templates/default/workflow_job.json @@ -0,0 +1,259 @@ +{ + "payloads": [ + { + "tags": [ + "completed", + "success" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2705 Job succeeded: {{job_name}}" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Job:** {{job_name}}\n**Workflow:** {{workflow_name}}\n**Status:** {{job_status}}\n**Conclusion:** {{job_conclusion}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Job" + }, + "url": "{{job_html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "completed", + "failure" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u274c Job failed: {{job_name}}" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Job:** {{job_name}}\n**Workflow:** {{workflow_name}}\n**Status:** {{job_status}}\n**Conclusion:** {{job_conclusion}}\n" + } + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Job" + }, + "url": "{{job_html_url}}", + "type": "danger" + } + ] + } + ] + } + } + }, + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2699\ufe0f Job {{action}}: {{job_name}}" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Job:** {{job_name}}\n**Workflow:** {{workflow_name}}\n**Status:** {{job_status}}\n" + } + } + ] + } + } + }, + { + "tags": [ + "in_progress" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Workflow Job In Progress" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "queued" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Workflow Job Queued" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "waiting" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Workflow Job Waiting" + }, + "template": "turquoise" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/example-configs/templates/default/workflow_run.json b/example-configs/templates/default/workflow_run.json new file mode 100644 index 0000000..7db0350 --- /dev/null +++ b/example-configs/templates/default/workflow_run.json @@ -0,0 +1,319 @@ +{ + "payloads": [ + { + "tags": [ + "completed", + "success" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2705 Workflow Succeeded" + }, + "template": "green" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Workflow:** {{workflow.name}}\n**Run #:** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**Branch:** {{workflow_run.head_branch}}\n**Triggered by:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "\u2705 All checks passed" + } + ] + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Run" + }, + "url": "{{workflow_run.html_url}}", + "type": "primary" + } + ] + } + ] + } + } + }, + { + "tags": [ + "completed", + "failure" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u274c Workflow Failed" + }, + "template": "red" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Workflow:** {{workflow.name}}\n**Run #:** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**Branch:** {{workflow_run.head_branch}}\n**Triggered by:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "\u274c Workflow execution failed" + } + ] + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Logs" + }, + "url": "{{workflow_run.html_url}}", + "type": "danger" + } + ] + } + ] + } + } + }, + { + "tags": [ + "completed", + "cancelled" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u26a0\ufe0f Workflow Cancelled" + }, + "template": "yellow" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Workflow:** {{workflow.name}}\n**Run #:** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**Branch:** {{workflow_run.head_branch}}\n**Cancelled by:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "This workflow run was cancelled" + } + ] + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Run" + }, + "url": "{{workflow_run.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "in_progress" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u23f3 Workflow Running" + }, + "template": "blue" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Workflow:** {{workflow.name}}\n**Run #:** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**Branch:** {{workflow_run.head_branch}}\n**Triggered by:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "note", + "elements": [ + { + "tag": "plain_text", + "content": "\u23f3 Workflow is currently running..." + } + ] + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "Watch Progress" + }, + "url": "{{workflow_run.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "default" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\u2699\ufe0f Workflow {{action}}" + }, + "template": "purple" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Workflow:** {{workflow.name}}\n**Run #:** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**Status:** {{workflow_run.conclusion | default(workflow_run.status)}}\n**Action:** {{action}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Run" + }, + "url": "{{workflow_run.html_url}}", + "type": "default" + } + ] + } + ] + } + } + }, + { + "tags": [ + "requested" + ], + "payload": { + "msg_type": "interactive", + "card": { + "config": { + "wide_screen_mode": true + }, + "header": { + "title": { + "tag": "plain_text", + "content": "\ud83d\udd14 Workflow Run Requested" + }, + "template": "orange" + }, + "elements": [ + { + "tag": "div", + "text": { + "tag": "lark_md", + "content": "**Repository:** {{repository_link_md}}\n**Action:** {{action}}\n**User:** {{sender_link_md}}" + } + }, + { + "tag": "hr" + }, + { + "tag": "action", + "actions": [ + { + "tag": "button", + "text": { + "tag": "plain_text", + "content": "View Details" + }, + "url": "{{repository.html_url}}", + "type": "default" + } + ] + } + ] + } + } + } + ] +} diff --git a/internal/config/config.go b/internal/config/config.go index 9860430..3a04c86 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -6,6 +6,7 @@ import ( "os" "path/filepath" "regexp" + "sort" "strings" "gopkg.in/yaml.v3" @@ -17,10 +18,9 @@ type Config struct { Repos ReposConfig Events EventsConfig FeishuBots FeishuBotsConfig - Templates map[string]TemplatesConfig // Key: template name (e.g., "default", "cn") + Templates map[string]TemplatesConfig } -// ServerConfig represents server.yaml type ServerConfig struct { Server struct { Host string `yaml:"host"` @@ -35,18 +35,15 @@ type ServerConfig struct { Panel PanelConfig `yaml:"panel"` } -// PanelConfig represents the optional `panel:` block in server.yaml, used to -// configure the web management panel (admin username/password + JWT secret). type PanelConfig struct { Enabled bool `yaml:"enabled,omitempty"` - Username string `yaml:"username,omitempty"` // admin login username; defaults to "admin" - Password string `yaml:"password,omitempty"` // plaintext password (hashed at runtime); convenient but less secure - PasswordHash string `yaml:"password_hash,omitempty"` // sha256(password) hex (legacy bcrypt also accepted); preferred over Password - Secret string `yaml:"secret,omitempty"` // JWT signing secret; falls back to an ephemeral random secret - PublicURL string `yaml:"public_url,omitempty"` // optional canonical public base URL (scheme+host[:port]) for the dashboard guide + Username string `yaml:"username,omitempty"` + Password string `yaml:"password,omitempty"` + PasswordHash string `yaml:"password_hash,omitempty"` + Secret string `yaml:"secret,omitempty"` + PublicURL string `yaml:"public_url,omitempty"` } -// ReposConfig represents repos.yaml type ReposConfig struct { Repos []RepoPattern `yaml:"repos"` } @@ -55,16 +52,14 @@ type RepoPattern struct { Pattern string `yaml:"pattern"` Events map[string]any `yaml:"events"` NotifyTo []string `yaml:"notify_to"` - Secret string `yaml:"secret,omitempty"` // optional per-rule webhook secret; falls back to server.secret + Secret string `yaml:"secret,omitempty"` } -// EventsConfig represents events.yaml type EventsConfig struct { EventSets map[string]map[string]any `yaml:"event_sets"` Events map[string]any `yaml:"events"` } -// FeishuBotsConfig represents feishu-bots.yaml type FeishuBotsConfig struct { FeishuBots []FeishuBot `yaml:"feishu_bots"` } @@ -72,10 +67,9 @@ type FeishuBotsConfig struct { type FeishuBot struct { Alias string `yaml:"alias"` URL string `yaml:"url"` - Template string `yaml:"template,omitempty"` // Optional: template name (e.g., "cn"), defaults to "default" + Template string `yaml:"template,omitempty"` } -// TemplatesConfig represents templates.jsonc (JSONC) type TemplatesConfig struct { Templates map[string]EventTemplate `yaml:"templates"` } @@ -89,70 +83,223 @@ type PayloadTemplate struct { Payload map[string]any `yaml:"payload"` } -// Load loads all configuration files from the given directory +// Load loads all configuration from configDir, transparently supporting +// both legacy flat files and per-item subdirectories (subdirs checked first). func Load(configDir string) (*Config, error) { - cfg := &Config{ - Templates: make(map[string]TemplatesConfig), - } + cfg := &Config{Templates: make(map[string]TemplatesConfig)} - // Load server.yaml if err := loadConfigFile(filepath.Join(configDir, "server.yaml"), &cfg.Server); err != nil { return nil, fmt.Errorf("failed to load server.yaml: %w", err) } - // Load repos.yaml - if err := loadConfigFile(filepath.Join(configDir, "repos.yaml"), &cfg.Repos); err != nil { - return nil, fmt.Errorf("failed to load repos.yaml: %w", err) + repos, err := loadPatterns(configDir) + if err != nil { + return nil, err + } + cfg.Repos = ReposConfig{Repos: repos} + + bots, err := loadBots(configDir) + if err != nil { + return nil, err + } + cfg.FeishuBots = FeishuBotsConfig{FeishuBots: bots} + + events, err := loadEvents(configDir) + if err != nil { + return nil, err + } + cfg.Events = events + + templates, err := loadTemplates(configDir) + if err != nil { + return nil, err } + cfg.Templates = templates + + return cfg, nil +} + +// ── Per-type merge loaders (subdir-first, flat-file fallback) ── - // Load events.yaml - if err := loadConfigFile(filepath.Join(configDir, "events.yaml"), &cfg.Events); err != nil { - return nil, fmt.Errorf("failed to load events.yaml: %w", err) +func loadPatterns(configDir string) ([]RepoPattern, error) { + subDir := filepath.Join(configDir, "patterns") + entries, err := scanYAMLDir(subDir) + if err == nil && len(entries) > 0 { + var repos []RepoPattern + for _, name := range entries { + var rp RepoPattern + if err := loadConfigFile(filepath.Join(subDir, name), &rp); err != nil { + return nil, fmt.Errorf("failed to load patterns/%s: %w", name, err) + } + repos = append(repos, rp) + } + return repos, nil + } + var rc ReposConfig + if err := loadConfigFile(filepath.Join(configDir, "repos.yaml"), &rc); err != nil { + return nil, fmt.Errorf("failed to load repos.yaml: %w", err) } + return rc.Repos, nil +} - // Load feishu-bots.yaml - if err := loadConfigFile(filepath.Join(configDir, "feishu-bots.yaml"), &cfg.FeishuBots); err != nil { +func loadBots(configDir string) ([]FeishuBot, error) { + subDir := filepath.Join(configDir, "bots") + entries, err := scanYAMLDir(subDir) + if err == nil && len(entries) > 0 { + var bots []FeishuBot + for _, name := range entries { + var bot FeishuBot + if err := loadConfigFile(filepath.Join(subDir, name), &bot); err != nil { + return nil, fmt.Errorf("failed to load bots/%s: %w", name, err) + } + bots = append(bots, bot) + } + return bots, nil + } + var bc FeishuBotsConfig + if err := loadConfigFile(filepath.Join(configDir, "feishu-bots.yaml"), &bc); err != nil { return nil, fmt.Errorf("failed to load feishu-bots.yaml: %w", err) } + return bc.FeishuBots, nil +} + +func loadEvents(configDir string) (EventsConfig, error) { + eventsDir := filepath.Join(configDir, "events") + esDir := filepath.Join(eventsDir, "event_sets") + defDir := filepath.Join(eventsDir, "definitions") + + esEntries, esErr := scanYAMLDir(esDir) + defEntries, defErr := scanYAMLDir(defDir) + + if (esErr == nil && len(esEntries) > 0) || (defErr == nil && len(defEntries) > 0) { + ec := EventsConfig{ + EventSets: make(map[string]map[string]any), + Events: make(map[string]any), + } + for _, name := range esEntries { + setName := strings.TrimSuffix(name, ".yaml") + var body map[string]any + if err := loadConfigFile(filepath.Join(esDir, name), &body); err != nil { + return ec, fmt.Errorf("failed to load events/event_sets/%s: %w", name, err) + } + ec.EventSets[setName] = body + } + for _, name := range defEntries { + evName := strings.TrimSuffix(name, ".yaml") + var body any + if err := loadConfigFile(filepath.Join(defDir, name), &body); err != nil { + return ec, fmt.Errorf("failed to load events/definitions/%s: %w", name, err) + } + ec.Events[evName] = body + } + return ec, nil + } + + var ec EventsConfig + if err := loadConfigFile(filepath.Join(configDir, "events.yaml"), &ec); err != nil { + return EventsConfig{}, fmt.Errorf("failed to load events.yaml: %w", err) + } + if ec.EventSets == nil { + ec.EventSets = make(map[string]map[string]any) + } + if ec.Events == nil { + ec.Events = make(map[string]any) + } + return ec, nil +} + +func loadTemplates(configDir string) (map[string]TemplatesConfig, error) { + templatesDir := filepath.Join(configDir, "templates") + entries, err := os.ReadDir(templatesDir) + if err == nil && len(entries) > 0 { + result := make(map[string]TemplatesConfig) + for _, entry := range entries { + if !entry.IsDir() { + continue + } + locale := entry.Name() + localeDir := filepath.Join(templatesDir, locale) + tc := TemplatesConfig{Templates: make(map[string]EventTemplate)} + + files, ferr := os.ReadDir(localeDir) + if ferr != nil { + continue + } + for _, f := range files { + if f.IsDir() { + continue + } + ext := "" + if strings.HasSuffix(f.Name(), ".json") { + ext = ".json" + } else if strings.HasSuffix(f.Name(), ".jsonc") { + ext = ".jsonc" + } + if ext == "" { + continue + } + eventName := strings.TrimSuffix(f.Name(), ext) + var perEvent struct { + Payloads []PayloadTemplate `json:"payloads"` + } + if err := loadConfigFile(filepath.Join(localeDir, f.Name()), &perEvent); err != nil { + return nil, fmt.Errorf("failed to load templates/%s/%s: %w", locale, f.Name(), err) + } + tc.Templates[eventName] = EventTemplate{Payloads: perEvent.Payloads} + } + result[locale] = tc + } + if len(result) > 0 { + return result, nil + } + } - // Load templates.jsonc as default template (required) - defaultTemplatesPath := filepath.Join(configDir, "templates.jsonc") - var defaultTemplates TemplatesConfig - if err := loadConfigFile(defaultTemplatesPath, &defaultTemplates); err != nil { + // Fallback: legacy flat files + result := make(map[string]TemplatesConfig) + var defaultTmpl TemplatesConfig + if err := loadConfigFile(filepath.Join(configDir, "templates.jsonc"), &defaultTmpl); err != nil { return nil, fmt.Errorf("failed to load templates.jsonc: %w", err) } - cfg.Templates["default"] = defaultTemplates + result["default"] = defaultTmpl - // Load additional template files (templates.*.jsonc) - // Scan for templates.cn.jsonc, templates.en.jsonc, etc. - entries, err := os.ReadDir(configDir) + entries, err = os.ReadDir(configDir) if err != nil { - return nil, fmt.Errorf("failed to read config directory: %w", err) + return result, nil } - - templatePattern := regexp.MustCompile(`^templates\.([a-zA-Z0-9_-]+)\.jsonc$`) + templateRe := regexp.MustCompile(`^templates\.([a-zA-Z0-9_-]+)\.jsonc$`) for _, entry := range entries { if entry.IsDir() { continue } - - matches := templatePattern.FindStringSubmatch(entry.Name()) + matches := templateRe.FindStringSubmatch(entry.Name()) if len(matches) > 1 { - templateName := matches[1] var tmpl TemplatesConfig - templatePath := filepath.Join(configDir, entry.Name()) - if err := loadConfigFile(templatePath, &tmpl); err != nil { + if err := loadConfigFile(filepath.Join(configDir, entry.Name()), &tmpl); err != nil { return nil, fmt.Errorf("failed to load %s: %w", entry.Name(), err) } - cfg.Templates[templateName] = tmpl + result[matches[1]] = tmpl } } + return result, nil +} - return cfg, nil +// ── Helpers ── + +func scanYAMLDir(dir string) ([]string, error) { + entries, err := os.ReadDir(dir) + if err != nil { + return nil, err + } + var files []string + for _, e := range entries { + if !e.IsDir() && strings.HasSuffix(e.Name(), ".yaml") { + files = append(files, e.Name()) + } + } + sort.Strings(files) + return files, nil } -// GetBotTemplate returns the template name for a given bot alias -// Returns "default" if the bot doesn't specify a template or if the bot is not found func (c *Config) GetBotTemplate(botAlias string) string { for _, bot := range c.FeishuBots.FeishuBots { if bot.Alias == botAlias { @@ -165,32 +312,30 @@ func (c *Config) GetBotTemplate(botAlias string) string { return "default" } -// GetTemplateConfig returns the template configuration for a given template name -// Returns the default template if the specified template is not found func (c *Config) GetTemplateConfig(templateName string) TemplatesConfig { if tmpl, exists := c.Templates[templateName]; exists { return tmpl } - // Fallback to default if tmpl, exists := c.Templates["default"]; exists { return tmpl } - // Return empty config if even default is missing (shouldn't happen) return TemplatesConfig{} } -// loadConfigFile loads either YAML or JSONC (JSON with comments) based on file extension +// loadConfigFile loads YAML, JSONC, or JSON based on extension. +// .jsonc: strips // and /* */ comments before JSON parsing. +// .json: parsed directly (no comment stripping — prevents // inside URLs +// from being misinterpreted as comments). +// .*: YAML. func loadConfigFile(path string, out any) error { data, err := os.ReadFile(path) if err != nil { return err } - if strings.HasSuffix(path, ".jsonc") || strings.HasSuffix(path, ".json") { - // strip comments and unmarshal as JSON + if strings.HasSuffix(path, ".jsonc") { cleaned := stripJSONCComments(string(data)) if err := json.Unmarshal([]byte(cleaned), out); err != nil { - // If it's a syntax error, try to compute line/column if serr, ok := err.(*json.SyntaxError); ok { line, col := offsetToLineCol([]byte(cleaned), serr.Offset) return fmt.Errorf("%w at line %d column %d (offset %d)", err, line, col, serr.Offset) @@ -200,11 +345,20 @@ func loadConfigFile(path string, out any) error { return nil } - // default to YAML + if strings.HasSuffix(path, ".json") { + if err := json.Unmarshal(data, out); err != nil { + if serr, ok := err.(*json.SyntaxError); ok { + line, col := offsetToLineCol(data, serr.Offset) + return fmt.Errorf("%w at line %d column %d (offset %d)", err, line, col, serr.Offset) + } + return err + } + return nil + } + return yaml.Unmarshal(data, out) } -// offsetToLineCol converts a 1-based byte offset into line and column numbers (1-based) func offsetToLineCol(b []byte, offset int64) (int, int) { if offset <= 0 { return 1, 1 @@ -223,12 +377,9 @@ func offsetToLineCol(b []byte, offset int64) (int, int) { return line, col } -// stripJSONCComments removes // and /* */ style comments from JSONC input. func stripJSONCComments(s string) string { - // Remove /* ... */ block comments reBlock := regexp.MustCompile(`/\*[\s\S]*?\*/`) s = reBlock.ReplaceAllString(s, "") - // Remove // line comments reLine := regexp.MustCompile(`(?m)//.*$`) s = reLine.ReplaceAllString(s, "") return s diff --git a/internal/config/config_test.go b/internal/config/config_test.go index a607e26..639e009 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -171,99 +171,61 @@ feishu_bots: } } -// TestLoadRealTemplates tests loading the actual templates.jsonc and templates.cn.jsonc files -// This test is skipped by default as the real template files are very large and may have formatting issues +// TestLoadRealTemplates tests loading the actual example-configs directory +// using config.Load (which transparently handles both old flat and new split layouts). func TestLoadRealTemplates(t *testing.T) { - // Use real templates from the project's versioned example-configs directory. - // This test requires the files to exist in the repository root. projectRoot := filepath.Join("..", "..", "example-configs") - // Ensure templates.jsonc exists - templatesPath := filepath.Join(projectRoot, "templates.jsonc") - if _, err := os.Stat(templatesPath); os.IsNotExist(err) { - t.Fatalf("Required file missing: %s", templatesPath) + // Ensure the directory exists + if _, err := os.Stat(projectRoot); os.IsNotExist(err) { + t.Skipf("example-configs not found at %s", projectRoot) } - // Ensure templates.cn.jsonc exists - templatesCnPath := filepath.Join(projectRoot, "templates.cn.jsonc") - if _, err := os.Stat(templatesCnPath); os.IsNotExist(err) { - t.Fatalf("Required file missing: %s", templatesCnPath) + // Use config.Load which handles both layouts + cfg, err := Load(projectRoot) + if err != nil { + t.Fatalf("Failed to load example-configs: %v", err) } - // Test loading templates.jsonc - t.Run("LoadDefaultTemplates", func(t *testing.T) { - var templates TemplatesConfig - err := loadConfigFile(templatesPath, &templates) - if err != nil { - t.Fatalf("Failed to load templates.jsonc: %v", err) - } - - // Check if ping template exists - if _, ok := templates.Templates["ping"]; !ok { - t.Error("Expected ping template in templates.jsonc") + // Test default templates + t.Run("DefaultTemplates", func(t *testing.T) { + defaultTmpl := cfg.GetTemplateConfig("default") + if _, ok := defaultTmpl.Templates["ping"]; !ok { + t.Error("Expected ping template in default") } - - // Check if other common templates exist commonTemplates := []string{"push", "pull_request", "issues", "issue_comment"} for _, tmpl := range commonTemplates { - if _, ok := templates.Templates[tmpl]; !ok { - t.Errorf("Expected %s template in templates.jsonc", tmpl) + if _, ok := defaultTmpl.Templates[tmpl]; !ok { + t.Errorf("Expected %s template in default", tmpl) } } - - t.Logf("Successfully loaded %d templates from templates.jsonc", len(templates.Templates)) + t.Logf("Default: %d templates", len(defaultTmpl.Templates)) }) - // Test loading templates.cn.jsonc if it exists - t.Run("LoadChineseTemplates", func(t *testing.T) { - templatesCnPath := filepath.Join(projectRoot, "templates.cn.jsonc") - if _, err := os.Stat(templatesCnPath); os.IsNotExist(err) { - t.Skip("Skipping test: templates.cn.jsonc not found") + // Test CN templates if present + t.Run("ChineseTemplates", func(t *testing.T) { + if _, ok := cfg.Templates["cn"]; !ok { + t.Skip("cn locale not found") } - - var templates TemplatesConfig - err := loadConfigFile(templatesCnPath, &templates) - if err != nil { - t.Fatalf("Failed to load templates.cn.jsonc: %v", err) - } - - // Check if ping template exists - if _, ok := templates.Templates["ping"]; !ok { - t.Error("Expected ping template in templates.cn.jsonc") - } - - // Check if other common templates exist - commonTemplates := []string{"push", "pull_request", "issues", "issue_comment"} - for _, tmpl := range commonTemplates { - if _, ok := templates.Templates[tmpl]; !ok { - t.Errorf("Expected %s template in templates.cn.jsonc", tmpl) - } + cnTmpl := cfg.GetTemplateConfig("cn") + if _, ok := cnTmpl.Templates["ping"]; !ok { + t.Error("Expected ping template in cn") } - - t.Logf("Successfully loaded %d templates from templates.cn.jsonc", len(templates.Templates)) + t.Logf("CN: %d templates", len(cnTmpl.Templates)) }) - // Test ping template structure + // Validate ping template structure t.Run("ValidatePingTemplate", func(t *testing.T) { - var templates TemplatesConfig - err := loadConfigFile(templatesPath, &templates) - if err != nil { - t.Fatalf("Failed to load templates.jsonc: %v", err) - } - - pingTemplate, ok := templates.Templates["ping"] + defaultTmpl := cfg.GetTemplateConfig("default") + pingTemplate, ok := defaultTmpl.Templates["ping"] if !ok { t.Fatal("ping template not found") } - if len(pingTemplate.Payloads) == 0 { t.Fatal("ping template has no payloads") } - - // Validate first payload firstPayload := pingTemplate.Payloads[0] - if len(firstPayload.Tags) == 0 { t.Error("ping template payload has no tags") } @@ -281,71 +243,14 @@ func TestLoadRealTemplates(t *testing.T) { }) // Test loading complete config with real templates - t.Run("LoadCompleteConfigWithRealTemplates", func(t *testing.T) { - // Create temp dir with minimal config files - tmpDir := t.TempDir() - - serverYAML := ` -server: - host: "127.0.0.1" - port: 4594 - secret: "test_secret" -` - - reposYAML := ` -repos: - - pattern: "test/repo" - events: - push: - notify_to: - - test-bot -` - - eventsYAML := ` -events: - push: -` - - botsYAML := ` -feishu_bots: - - alias: "test-bot" - url: "https://example.com/webhook" -` - // Write minimal configs - files := map[string]string{ - "server.yaml": serverYAML, - "repos.yaml": reposYAML, - "events.yaml": eventsYAML, - "feishu-bots.yaml": botsYAML, - } - - for name, content := range files { - path := filepath.Join(tmpDir, name) - if err := os.WriteFile(path, []byte(content), 0644); err != nil { - t.Fatalf("Failed to write %s: %v", name, err) - } - } - - // Copy real templates - realTemplatesPath := filepath.Join(projectRoot, "templates.jsonc") - templatesData, err := os.ReadFile(realTemplatesPath) - if err != nil { - t.Fatalf("Failed to read real templates.jsonc: %v", err) - } - - tmpTemplatesPath := filepath.Join(tmpDir, "templates.jsonc") - if err := os.WriteFile(tmpTemplatesPath, templatesData, 0644); err != nil { - t.Fatalf("Failed to write templates.jsonc to temp dir: %v", err) - } - - // Load config - cfg, err := Load(tmpDir) + // LoadCompleteConfigWithRealTemplates: just use config.Load on example-configs + t.Run("LoadCompleteConfigWithRealTemplates", func(t *testing.T) { + cfg, err := Load(projectRoot) if err != nil { t.Fatalf("Failed to load config with real templates: %v", err) } - // Validate if _, ok := cfg.Templates["default"]; !ok { t.Error("Expected default template to be loaded") } From 2b97256b7861a11f94b506fa4f5a53bbf0d5ddaf Mon Sep 17 00:00:00 2001 From: Robert He Date: Mon, 27 Jul 2026 13:53:19 +0800 Subject: [PATCH 02/22] fix: bots use single config --- example-configs/bots/dev-team.yaml | 2 -- example-configs/bots/ops-team.yaml | 2 -- example-configs/bots/org-cn-notify.yaml | 3 --- example-configs/bots/org-notify.yaml | 2 -- example-configs/feishu-bots.yaml | 20 ++++++++++++++++++++ internal/config/config.go | 13 ------------- 6 files changed, 20 insertions(+), 22 deletions(-) delete mode 100644 example-configs/bots/dev-team.yaml delete mode 100644 example-configs/bots/ops-team.yaml delete mode 100644 example-configs/bots/org-cn-notify.yaml delete mode 100644 example-configs/bots/org-notify.yaml create mode 100644 example-configs/feishu-bots.yaml diff --git a/example-configs/bots/dev-team.yaml b/example-configs/bots/dev-team.yaml deleted file mode 100644 index 117f1d1..0000000 --- a/example-configs/bots/dev-team.yaml +++ /dev/null @@ -1,2 +0,0 @@ -alias: dev-team -url: https://open.feishu.cn/open-apis/bot/v2/hook/xxxxxxx diff --git a/example-configs/bots/ops-team.yaml b/example-configs/bots/ops-team.yaml deleted file mode 100644 index e98b68d..0000000 --- a/example-configs/bots/ops-team.yaml +++ /dev/null @@ -1,2 +0,0 @@ -alias: ops-team -url: https://open.feishu.cn/open-apis/bot/v2/hook/yyyyyyy diff --git a/example-configs/bots/org-cn-notify.yaml b/example-configs/bots/org-cn-notify.yaml deleted file mode 100644 index fbdd4cb..0000000 --- a/example-configs/bots/org-cn-notify.yaml +++ /dev/null @@ -1,3 +0,0 @@ -alias: org-cn-notify -url: https://open.feishu.cn/open-apis/bot/v2/hook/zzzzzzz -template: cn diff --git a/example-configs/bots/org-notify.yaml b/example-configs/bots/org-notify.yaml deleted file mode 100644 index cdef260..0000000 --- a/example-configs/bots/org-notify.yaml +++ /dev/null @@ -1,2 +0,0 @@ -alias: org-notify -url: https://open.feishu.cn/open-apis/bot/v2/hook/zzzzzzz diff --git a/example-configs/feishu-bots.yaml b/example-configs/feishu-bots.yaml new file mode 100644 index 0000000..3285649 --- /dev/null +++ b/example-configs/feishu-bots.yaml @@ -0,0 +1,20 @@ +# ========================================= +# feishu-bots.yaml +# ----------------------------------------- +# 存放所有飞书机器人的别名和Webhook URL +# 可在 patterns/*.yaml 中通过 alias 引用 +# ========================================= + +feishu_bots: + - alias: "dev-team" + url: "https://open.feishu.cn/open-apis/bot/v2/hook/xxxxxxx" + + - alias: "ops-team" + url: "https://open.feishu.cn/open-apis/bot/v2/hook/yyyyyyy" + + - alias: "org-notify" + url: "https://open.feishu.cn/open-apis/bot/v2/hook/zzzzzzz" + + - alias: "org-cn-notify" + url: "https://open.feishu.cn/open-apis/bot/v2/hook/zzzzzzz" + template: "cn" diff --git a/internal/config/config.go b/internal/config/config.go index 3a04c86..ee004a7 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -143,19 +143,6 @@ func loadPatterns(configDir string) ([]RepoPattern, error) { } func loadBots(configDir string) ([]FeishuBot, error) { - subDir := filepath.Join(configDir, "bots") - entries, err := scanYAMLDir(subDir) - if err == nil && len(entries) > 0 { - var bots []FeishuBot - for _, name := range entries { - var bot FeishuBot - if err := loadConfigFile(filepath.Join(subDir, name), &bot); err != nil { - return nil, fmt.Errorf("failed to load bots/%s: %w", name, err) - } - bots = append(bots, bot) - } - return bots, nil - } var bc FeishuBotsConfig if err := loadConfigFile(filepath.Join(configDir, "feishu-bots.yaml"), &bc); err != nil { return nil, fmt.Errorf("failed to load feishu-bots.yaml: %w", err) From a69a4df0c31ef75892e84335291814ee77c2516a Mon Sep 17 00:00:00 2001 From: Robert He Date: Sat, 1 Aug 2026 02:05:59 +0800 Subject: [PATCH 03/22] feat: implement config migration from legacy flat-file to subdirectory layout --- cmd/feishu-github-tracker/main.go | 6 + go.mod | 2 +- internal/config/migrate.go | 264 ++++++++++++++++++++++++++++++ 3 files changed, 271 insertions(+), 1 deletion(-) create mode 100644 internal/config/migrate.go diff --git a/cmd/feishu-github-tracker/main.go b/cmd/feishu-github-tracker/main.go index 1816741..c71772d 100644 --- a/cmd/feishu-github-tracker/main.go +++ b/cmd/feishu-github-tracker/main.go @@ -45,6 +45,12 @@ func main() { } } + // Auto-migrate legacy flat-file configs to the new per-item subdirectory + // layout. Old files are backed up to legacy/ intact. + if err := config.Migrate(configDir); err != nil { + fmt.Fprintf(os.Stderr, "Config migration warning: %v (continuing)\n", err) + } + // Load configuration cfg, err := config.Load(configDir) if err != nil { diff --git a/go.mod b/go.mod index c32773e..69d87e4 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/hnrobert/feishu-github-tracker -go 1.21 +go 1.23 require ( github.com/gobwas/glob v0.2.3 diff --git a/internal/config/migrate.go b/internal/config/migrate.go new file mode 100644 index 0000000..c460749 --- /dev/null +++ b/internal/config/migrate.go @@ -0,0 +1,264 @@ +package config + +import ( + "encoding/json" + "fmt" + "os" + "path/filepath" + "regexp" + "sort" + "strings" + + "gopkg.in/yaml.v3" +) + +// Migrate detects legacy flat-file configs and migrates them to the new +// per-item subdirectory layout. Old files are moved intact to legacy/ (all +// comments preserved) and split into clean per-item files in the new dirs. +// If the new dirs already exist with content, migration for that type is +// skipped. This is a no-op when no legacy files are found. +func Migrate(configDir string) error { + legacyDir := filepath.Join(configDir, "legacy") + migrated := false + + // repos.yaml → patterns/*.yaml + if fileExists(filepath.Join(configDir, "repos.yaml")) && !dirHasYAML(filepath.Join(configDir, "patterns")) { + if err := ensureDir(legacyDir); err != nil { + return err + } + if err := migrateRepos(configDir, legacyDir); err != nil { + return fmt.Errorf("migrate repos: %w", err) + } + migrated = true + } + + // events.yaml → events/event_sets/*.yaml + events/definitions/*.yaml + if fileExists(filepath.Join(configDir, "events.yaml")) && !dirHasYAML(filepath.Join(configDir, "events")) { + if err := ensureDir(legacyDir); err != nil { + return err + } + if err := migrateEvents(configDir, legacyDir); err != nil { + return fmt.Errorf("migrate events: %w", err) + } + migrated = true + } + + // templates.jsonc + templates.*.jsonc → templates//*.json + if fileExists(filepath.Join(configDir, "templates.jsonc")) && !dirHasContent(filepath.Join(configDir, "templates")) { + if err := ensureDir(legacyDir); err != nil { + return err + } + if err := migrateTemplates(configDir, legacyDir); err != nil { + return fmt.Errorf("migrate templates: %w", err) + } + migrated = true + } + + _ = migrated + return nil +} + +// ── Per-type migrations ── + +func migrateRepos(configDir, legacyDir string) error { + src := filepath.Join(configDir, "repos.yaml") + dstDir := filepath.Join(configDir, "patterns") + + data, err := os.ReadFile(src) + if err != nil { + return err + } + + var rc struct { + Repos []RepoPattern `yaml:"repos"` + } + if err := yaml.Unmarshal(data, &rc); err != nil { + return err + } + + if err := ensureDir(dstDir); err != nil { + return err + } + + for i, rp := range rc.Repos { + name := sanitizeFilename(rp.Pattern) + if name == "" { + name = fmt.Sprintf("rule-%d", i) + } + fname := fmt.Sprintf("%02d-%s.yaml", i, name) + out, _ := yaml.Marshal(rp) + if err := os.WriteFile(filepath.Join(dstDir, fname), out, 0o644); err != nil { + return err + } + } + + // Move original to legacy/ + return os.Rename(src, filepath.Join(legacyDir, "repos.yaml")) +} + +func migrateEvents(configDir, legacyDir string) error { + src := filepath.Join(configDir, "events.yaml") + esDir := filepath.Join(configDir, "events", "event_sets") + defDir := filepath.Join(configDir, "events", "definitions") + + data, err := os.ReadFile(src) + if err != nil { + return err + } + + var ec EventsConfig + if err := yaml.Unmarshal(data, &ec); err != nil { + return err + } + + if err := ensureDir(esDir); err != nil { + return err + } + if err := ensureDir(defDir); err != nil { + return err + } + + // event_sets + for name, body := range ec.EventSets { + fname := sanitizeFilename(name) + ".yaml" + out, _ := yaml.Marshal(body) + if err := os.WriteFile(filepath.Join(esDir, fname), out, 0o644); err != nil { + return err + } + } + + // definitions + for name, body := range ec.Events { + fname := sanitizeFilename(name) + ".yaml" + var out []byte + if body != nil { + out, _ = yaml.Marshal(body) + } else { + out = []byte("null\n") + } + if err := os.WriteFile(filepath.Join(defDir, fname), out, 0o644); err != nil { + return err + } + } + + return os.Rename(src, filepath.Join(legacyDir, "events.yaml")) +} + +func migrateTemplates(configDir, legacyDir string) error { + templatesDir := filepath.Join(configDir, "templates") + + // Find all template files: templates.jsonc + templates.*.jsonc + defaultPath := filepath.Join(configDir, "templates.jsonc") + entries, _ := os.ReadDir(configDir) + templateRe := regexp.MustCompile(`^templates\.([a-zA-Z0-9_-]+)\.jsonc$`) + + type tmplFile struct { + path string + locale string + } + var files []tmplFile + + if fileExists(defaultPath) { + files = append(files, tmplFile{defaultPath, "default"}) + } + for _, e := range entries { + if m := templateRe.FindStringSubmatch(e.Name()); len(m) > 1 { + files = append(files, tmplFile{filepath.Join(configDir, e.Name()), m[1]}) + } + } + + if len(files) == 0 { + return nil + } + + for _, tf := range files { + data, err := os.ReadFile(tf.path) + if err != nil { + return err + } + cleaned := stripJSONCComments(string(data)) + var tc TemplatesConfig + if err := json.Unmarshal([]byte(cleaned), &tc); err != nil { + return fmt.Errorf("parse %s: %w", tf.path, err) + } + + localeDir := filepath.Join(templatesDir, tf.locale) + if err := ensureDir(localeDir); err != nil { + return err + } + + // Sort event names for deterministic output + events := make([]string, 0, len(tc.Templates)) + for k := range tc.Templates { + events = append(events, k) + } + sort.Strings(events) + + for _, event := range events { + payloads := tc.Templates[event].Payloads + out, _ := json.MarshalIndent(map[string]any{"payloads": payloads}, "", " ") + fname := sanitizeFilename(event) + ".json" + if err := os.WriteFile(filepath.Join(localeDir, fname), append(out, '\n'), 0o644); err != nil { + return err + } + } + + // Move original to legacy/ + baseName := filepath.Base(tf.path) + if err := os.Rename(tf.path, filepath.Join(legacyDir, baseName)); err != nil { + return err + } + } + + return nil +} + +// ── Helpers ── + +func fileExists(path string) bool { + _, err := os.Stat(path) + return err == nil +} + +func dirHasYAML(dir string) bool { + files, err := scanYAMLDir(dir) + return err == nil && len(files) > 0 +} + +func dirHasContent(dir string) bool { + entries, err := os.ReadDir(dir) + if err != nil { + return false + } + for _, e := range entries { + if e.IsDir() { + if dirHasContent(filepath.Join(dir, e.Name())) { + return true + } + } else { + return true + } + } + return false +} + +func ensureDir(dir string) error { + return os.MkdirAll(dir, 0o755) +} + +// sanitizeFilename converts a pattern/name to a safe filename component. +func sanitizeFilename(s string) string { + s = strings.ReplaceAll(s, "/", "-") + s = strings.ReplaceAll(s, "*", "all") + s = strings.ReplaceAll(s, "?", "_") + s = strings.ReplaceAll(s, ":", "_") + s = strings.ReplaceAll(s, " ", "_") + // keep only safe chars + var b strings.Builder + for _, r := range s { + if (r >= 'a' && r <= 'z') || (r >= 'A' && r <= 'Z') || (r >= '0' && r <= '9') || r == '-' || r == '_' || r == '.' { + b.WriteRune(r) + } + } + return b.String() +} From fe669d5ec014edb17ee7d6e128ffe61598d820e9 Mon Sep 17 00:00:00 2001 From: Robert He Date: Sat, 1 Aug 2026 02:06:53 +0800 Subject: [PATCH 04/22] refactor: enhance migration logic to preserve comments and improve YAML handling --- internal/config/migrate.go | 172 +++++++++++++++++++++++++++---------- 1 file changed, 129 insertions(+), 43 deletions(-) diff --git a/internal/config/migrate.go b/internal/config/migrate.go index c460749..0fcdc34 100644 --- a/internal/config/migrate.go +++ b/internal/config/migrate.go @@ -14,12 +14,11 @@ import ( // Migrate detects legacy flat-file configs and migrates them to the new // per-item subdirectory layout. Old files are moved intact to legacy/ (all -// comments preserved) and split into clean per-item files in the new dirs. -// If the new dirs already exist with content, migration for that type is -// skipped. This is a no-op when no legacy files are found. +// comments preserved) and split into per-item files that also preserve +// comments via yaml.Node round-trip. This is a no-op when no legacy files +// are found or when the new dirs already have content. func Migrate(configDir string) error { legacyDir := filepath.Join(configDir, "legacy") - migrated := false // repos.yaml → patterns/*.yaml if fileExists(filepath.Join(configDir, "repos.yaml")) && !dirHasYAML(filepath.Join(configDir, "patterns")) { @@ -29,7 +28,6 @@ func Migrate(configDir string) error { if err := migrateRepos(configDir, legacyDir); err != nil { return fmt.Errorf("migrate repos: %w", err) } - migrated = true } // events.yaml → events/event_sets/*.yaml + events/definitions/*.yaml @@ -40,7 +38,6 @@ func Migrate(configDir string) error { if err := migrateEvents(configDir, legacyDir); err != nil { return fmt.Errorf("migrate events: %w", err) } - migrated = true } // templates.jsonc + templates.*.jsonc → templates//*.json @@ -51,14 +48,12 @@ func Migrate(configDir string) error { if err := migrateTemplates(configDir, legacyDir); err != nil { return fmt.Errorf("migrate templates: %w", err) } - migrated = true } - _ = migrated return nil } -// ── Per-type migrations ── +// ── Per-type migrations (using yaml.Node to preserve comments) ── func migrateRepos(configDir, legacyDir string) error { src := filepath.Join(configDir, "repos.yaml") @@ -69,30 +64,42 @@ func migrateRepos(configDir, legacyDir string) error { return err } - var rc struct { - Repos []RepoPattern `yaml:"repos"` - } - if err := yaml.Unmarshal(data, &rc); err != nil { + // Parse into yaml.Node tree — preserves HeadComment/LineComment/FootComment + var root yaml.Node + if err := yaml.Unmarshal(data, &root); err != nil { return err } + // Navigate: document → top mapping → "repos" key → sequence + seqNode := findSequenceByKey(root, "repos") + if seqNode == nil { + // No repos found — just move the file + return os.Rename(src, filepath.Join(legacyDir, "repos.yaml")) + } + if err := ensureDir(dstDir); err != nil { return err } - for i, rp := range rc.Repos { - name := sanitizeFilename(rp.Pattern) + for i, item := range seqNode.Content { + // item is a yaml.Node mapping — its HeadComment carries any comment + // that was above this entry in the original file. + out, err := marshalYAMLNode(item) + if err != nil { + return fmt.Errorf("marshal repo %d: %w", i, err) + } + + // Derive filename from the pattern field if possible + name := nodePattern(item) // returns the "pattern" value or "" if name == "" { name = fmt.Sprintf("rule-%d", i) } - fname := fmt.Sprintf("%02d-%s.yaml", i, name) - out, _ := yaml.Marshal(rp) + fname := fmt.Sprintf("%02d-%s.yaml", i, sanitizeFilename(name)) if err := os.WriteFile(filepath.Join(dstDir, fname), out, 0o644); err != nil { return err } } - // Move original to legacy/ return os.Rename(src, filepath.Join(legacyDir, "repos.yaml")) } @@ -106,8 +113,8 @@ func migrateEvents(configDir, legacyDir string) error { return err } - var ec EventsConfig - if err := yaml.Unmarshal(data, &ec); err != nil { + var root yaml.Node + if err := yaml.Unmarshal(data, &root); err != nil { return err } @@ -118,36 +125,48 @@ func migrateEvents(configDir, legacyDir string) error { return err } - // event_sets - for name, body := range ec.EventSets { - fname := sanitizeFilename(name) + ".yaml" - out, _ := yaml.Marshal(body) - if err := os.WriteFile(filepath.Join(esDir, fname), out, 0o644); err != nil { - return err + // event_sets: top mapping → "event_sets" key → mapping of setName → body + if esMap := findMappingByKey(root, "event_sets"); esMap != nil { + for i := 0; i+1 < len(esMap.Content); i += 2 { + keyNode := esMap.Content[i] + valNode := esMap.Content[i+1] + // The key's HeadComment (or value's HeadComment) carries any + // comment above this entry. + out, err := marshalYAMLNode(valNode) + if err != nil { + continue + } + fname := sanitizeFilename(keyNode.Value) + ".yaml" + if err := os.WriteFile(filepath.Join(esDir, fname), out, 0o644); err != nil { + return err + } } } - // definitions - for name, body := range ec.Events { - fname := sanitizeFilename(name) + ".yaml" - var out []byte - if body != nil { - out, _ = yaml.Marshal(body) - } else { - out = []byte("null\n") - } - if err := os.WriteFile(filepath.Join(defDir, fname), out, 0o644); err != nil { - return err + // events: top mapping → "events" key → mapping of eventName → body + if evMap := findMappingByKey(root, "events"); evMap != nil { + for i := 0; i+1 < len(evMap.Content); i += 2 { + keyNode := evMap.Content[i] + valNode := evMap.Content[i+1] + out, err := marshalYAMLNode(valNode) + if err != nil { + continue + } + fname := sanitizeFilename(keyNode.Value) + ".yaml" + if err := os.WriteFile(filepath.Join(defDir, fname), out, 0o644); err != nil { + return err + } } } return os.Rename(src, filepath.Join(legacyDir, "events.yaml")) } +// Templates are JSON/JSONC — comments cannot be preserved in JSON output. +// Originals are kept intact in legacy/ for reference. func migrateTemplates(configDir, legacyDir string) error { templatesDir := filepath.Join(configDir, "templates") - // Find all template files: templates.jsonc + templates.*.jsonc defaultPath := filepath.Join(configDir, "templates.jsonc") entries, _ := os.ReadDir(configDir) templateRe := regexp.MustCompile(`^templates\.([a-zA-Z0-9_-]+)\.jsonc$`) @@ -187,7 +206,6 @@ func migrateTemplates(configDir, legacyDir string) error { return err } - // Sort event names for deterministic output events := make([]string, 0, len(tc.Templates)) for k := range tc.Templates { events = append(events, k) @@ -203,7 +221,6 @@ func migrateTemplates(configDir, legacyDir string) error { } } - // Move original to legacy/ baseName := filepath.Base(tf.path) if err := os.Rename(tf.path, filepath.Join(legacyDir, baseName)); err != nil { return err @@ -213,7 +230,78 @@ func migrateTemplates(configDir, legacyDir string) error { return nil } -// ── Helpers ── +// ── yaml.Node navigation helpers ── + +// findSequenceByKey drills into a document node → top mapping → key → sequence. +func findSequenceByKey(root yaml.Node, key string) *yaml.Node { + m := topMappingNode(&root) + if m == nil { + return nil + } + for i := 0; i+1 < len(m.Content); i += 2 { + if m.Content[i].Value == key && m.Content[i+1].Kind == yaml.SequenceNode { + return m.Content[i+1] + } + } + return nil +} + +// findMappingByKey drills into a document node → top mapping → key → mapping. +func findMappingByKey(root yaml.Node, key string) *yaml.Node { + m := topMappingNode(&root) + if m == nil { + return nil + } + for i := 0; i+1 < len(m.Content); i += 2 { + if m.Content[i].Value == key && m.Content[i+1].Kind == yaml.MappingNode { + return m.Content[i+1] + } + } + return nil +} + +func topMappingNode(root *yaml.Node) *yaml.Node { + if root == nil { + return nil + } + if root.Kind == yaml.DocumentNode && len(root.Content) > 0 { + root = root.Content[0] + } + if root.Kind == yaml.MappingNode { + return root + } + return nil +} + +// nodePattern extracts the "pattern" value from a repo mapping node. +func nodePattern(n *yaml.Node) string { + if n == nil || n.Kind != yaml.MappingNode { + return "" + } + for i := 0; i+1 < len(n.Content); i += 2 { + if n.Content[i].Value == "pattern" { + return n.Content[i+1].Value + } + } + return "" +} + +// marshalYAMLNode encodes a yaml.Node with 2-space indent, preserving all +// attached comments (HeadComment, LineComment, FootComment). +func marshalYAMLNode(n *yaml.Node) ([]byte, error) { + var buf strings.Builder + enc := yaml.NewEncoder(&buf) + enc.SetIndent(2) + if err := enc.Encode(n); err != nil { + return nil, err + } + if err := enc.Close(); err != nil { + return nil, err + } + return []byte(buf.String()), nil +} + +// ── Generic helpers ── func fileExists(path string) bool { _, err := os.Stat(path) @@ -246,14 +334,12 @@ func ensureDir(dir string) error { return os.MkdirAll(dir, 0o755) } -// sanitizeFilename converts a pattern/name to a safe filename component. func sanitizeFilename(s string) string { s = strings.ReplaceAll(s, "/", "-") s = strings.ReplaceAll(s, "*", "all") s = strings.ReplaceAll(s, "?", "_") s = strings.ReplaceAll(s, ":", "_") s = strings.ReplaceAll(s, " ", "_") - // keep only safe chars var b strings.Builder for _, r := range s { if (r >= 'a' && r <= 'z') || (r >= 'A' && r <= 'Z') || (r >= '0' && r <= '9') || r == '-' || r == '_' || r == '.' { From 420ae804c30a4555fc62ecfe7e6c6ae5d8fca2fb Mon Sep 17 00:00:00 2001 From: Robert He Date: Sat, 1 Aug 2026 02:14:04 +0800 Subject: [PATCH 05/22] chore: redump json --- .../cn/branch_protection_configuration.json | 12 +- .../templates/cn/branch_protection_rule.json | 22 +- example-configs/templates/cn/check_run.json | 30 +-- example-configs/templates/cn/check_suite.json | 22 +- .../templates/cn/code_scanning_alert.json | 40 ++-- .../templates/cn/commit_comment.json | 12 +- example-configs/templates/cn/create.json | 4 +- .../templates/cn/custom_property.json | 24 +-- .../templates/cn/custom_property_values.json | 6 +- example-configs/templates/cn/delete.json | 4 +- .../templates/cn/dependabot_alert.json | 46 ++--- example-configs/templates/cn/deploy_key.json | 12 +- example-configs/templates/cn/deployment.json | 4 +- .../cn/deployment_protection_rule.json | 6 +- .../templates/cn/deployment_review.json | 18 +- .../templates/cn/deployment_status.json | 4 +- example-configs/templates/cn/discussion.json | 90 ++++----- .../templates/cn/discussion_comment.json | 24 +-- example-configs/templates/cn/fork.json | 6 +- .../cn/github_app_authorization.json | 6 +- example-configs/templates/cn/gollum.json | 6 +- .../templates/cn/installation.json | 34 ++-- .../cn/installation_repositories.json | 12 +- .../templates/cn/installation_target.json | 6 +- .../templates/cn/issue_comment.json | 48 ++--- .../templates/cn/issue_dependencies.json | 24 +-- example-configs/templates/cn/issues.json | 190 +++++++++--------- example-configs/templates/cn/label.json | 22 +- .../templates/cn/marketplace_purchase.json | 30 +-- example-configs/templates/cn/member.json | 22 +- example-configs/templates/cn/membership.json | 16 +- example-configs/templates/cn/merge_group.json | 16 +- example-configs/templates/cn/meta.json | 6 +- example-configs/templates/cn/milestone.json | 34 ++-- example-configs/templates/cn/org_block.json | 12 +- .../templates/cn/organization.json | 22 +- example-configs/templates/cn/package.json | 16 +- example-configs/templates/cn/page_build.json | 4 +- .../cn/personal_access_token_request.json | 24 +-- example-configs/templates/cn/ping.json | 4 +- example-configs/templates/cn/project.json | 34 ++-- .../templates/cn/project_card.json | 34 ++-- .../templates/cn/project_column.json | 28 +-- example-configs/templates/cn/projects_v2.json | 34 ++-- .../templates/cn/projects_v2_item.json | 42 ++-- .../cn/projects_v2_status_update.json | 18 +- example-configs/templates/cn/public.json | 4 +- .../templates/cn/pull_request.json | 146 +++++++------- .../templates/cn/pull_request_review.json | 24 +-- .../cn/pull_request_review_comment.json | 24 +-- .../cn/pull_request_review_thread.json | 16 +- example-configs/templates/cn/push.json | 12 +- .../templates/cn/registry_package.json | 12 +- example-configs/templates/cn/release.json | 52 ++--- example-configs/templates/cn/repository.json | 60 +++--- .../templates/cn/repository_advisory.json | 12 +- .../templates/cn/repository_dispatch.json | 6 +- .../templates/cn/repository_import.json | 6 +- .../templates/cn/repository_ruleset.json | 18 +- .../cn/repository_vulnerability_alert.json | 24 +-- .../templates/cn/secret_scanning_alert.json | 34 ++-- .../cn/secret_scanning_alert_location.json | 6 +- .../templates/cn/secret_scanning_scan.json | 6 +- .../templates/cn/security_advisory.json | 22 +- .../templates/cn/security_and_analysis.json | 6 +- example-configs/templates/cn/sponsorship.json | 38 ++-- example-configs/templates/cn/star.json | 16 +- example-configs/templates/cn/status.json | 4 +- example-configs/templates/cn/sub_issues.json | 24 +-- example-configs/templates/cn/team.json | 34 ++-- example-configs/templates/cn/team_add.json | 6 +- example-configs/templates/cn/watch.json | 10 +- .../templates/cn/workflow_dispatch.json | 6 +- .../templates/cn/workflow_job.json | 34 ++-- .../templates/cn/workflow_run.json | 44 ++-- .../branch_protection_configuration.json | 4 +- .../default/branch_protection_rule.json | 8 +- .../templates/default/check_run.json | 12 +- .../templates/default/check_suite.json | 8 +- .../default/code_scanning_alert.json | 14 +- .../templates/default/commit_comment.json | 4 +- example-configs/templates/default/create.json | 2 +- .../templates/default/custom_property.json | 8 +- .../default/custom_property_values.json | 2 +- example-configs/templates/default/delete.json | 2 +- .../templates/default/dependabot_alert.json | 16 +- .../templates/default/deploy_key.json | 4 +- .../templates/default/deployment.json | 2 +- .../default/deployment_protection_rule.json | 2 +- .../templates/default/deployment_review.json | 8 +- .../templates/default/deployment_status.json | 2 +- .../templates/default/discussion.json | 28 +-- .../templates/default/discussion_comment.json | 8 +- example-configs/templates/default/fork.json | 2 +- .../default/github_app_authorization.json | 2 +- example-configs/templates/default/gollum.json | 2 +- .../templates/default/installation.json | 12 +- .../default/installation_repositories.json | 4 +- .../default/installation_target.json | 2 +- .../templates/default/issue_comment.json | 16 +- .../templates/default/issue_dependencies.json | 8 +- example-configs/templates/default/issues.json | 124 ++++++------ example-configs/templates/default/label.json | 8 +- .../default/marketplace_purchase.json | 10 +- example-configs/templates/default/member.json | 8 +- .../templates/default/membership.json | 6 +- .../templates/default/merge_group.json | 6 +- example-configs/templates/default/meta.json | 2 +- .../templates/default/milestone.json | 12 +- .../templates/default/org_block.json | 4 +- .../templates/default/organization.json | 8 +- .../templates/default/package.json | 6 +- .../templates/default/page_build.json | 2 +- .../personal_access_token_request.json | 8 +- example-configs/templates/default/ping.json | 2 +- .../templates/default/project.json | 12 +- .../templates/default/project_card.json | 12 +- .../templates/default/project_column.json | 10 +- .../templates/default/projects_v2.json | 12 +- .../templates/default/projects_v2_item.json | 14 +- .../default/projects_v2_status_update.json | 6 +- example-configs/templates/default/public.json | 2 +- .../templates/default/pull_request.json | 58 +++--- .../default/pull_request_review.json | 8 +- .../default/pull_request_review_comment.json | 8 +- .../default/pull_request_review_thread.json | 6 +- example-configs/templates/default/push.json | 8 +- .../templates/default/registry_package.json | 4 +- .../templates/default/release.json | 18 +- .../templates/default/repository.json | 20 +- .../default/repository_advisory.json | 4 +- .../default/repository_dispatch.json | 2 +- .../templates/default/repository_import.json | 2 +- .../templates/default/repository_ruleset.json | 6 +- .../repository_vulnerability_alert.json | 8 +- .../default/secret_scanning_alert.json | 12 +- .../secret_scanning_alert_location.json | 2 +- .../default/secret_scanning_scan.json | 2 +- .../templates/default/security_advisory.json | 8 +- .../default/security_and_analysis.json | 2 +- .../templates/default/sponsorship.json | 14 +- example-configs/templates/default/star.json | 6 +- example-configs/templates/default/status.json | 2 +- .../templates/default/sub_issues.json | 8 +- example-configs/templates/default/team.json | 12 +- .../templates/default/team_add.json | 2 +- example-configs/templates/default/watch.json | 4 +- .../templates/default/workflow_dispatch.json | 2 +- .../templates/default/workflow_job.json | 12 +- .../templates/default/workflow_run.json | 18 +- 150 files changed, 1275 insertions(+), 1275 deletions(-) diff --git a/example-configs/templates/cn/branch_protection_configuration.json b/example-configs/templates/cn/branch_protection_configuration.json index 71ef4cf..583846a 100644 --- a/example-configs/templates/cn/branch_protection_configuration.json +++ b/example-configs/templates/cn/branch_protection_configuration.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5206\u652f\u4fdd\u62a4\u914d\u7f6e \u5df2\u7981\u7528" + "content": "🔔 分支保护配置 已禁用" }, "template": "turquoise" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -35,7 +35,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5206\u652f\u4fdd\u62a4\u914d\u7f6e \u5df2\u542f\u7528" + "content": "🔔 分支保护配置 已启用" }, "template": "turquoise" }, @@ -68,7 +68,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -81,7 +81,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/branch_protection_rule.json b/example-configs/templates/cn/branch_protection_rule.json index df93309..44ab7b5 100644 --- a/example-configs/templates/cn/branch_protection_rule.json +++ b/example-configs/templates/cn/branch_protection_rule.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udee1\ufe0f \u5206\u652f\u4fdd\u62a4{{action}}" + "content": "🛡️ 分支保护{{action}}" }, "template": "blue" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u89c4\u5219\uff1a** {{rule_name}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + "content": "**仓库:** {{repository_link_md}}\n**规则:** {{rule_name}}\n**操作:** {{action}}\n" } } ] @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5206\u652f\u4fdd\u62a4\u89c4\u5219 \u5df2\u521b\u5efa" + "content": "🔔 分支保护规则 已创建" }, "template": "green" }, @@ -51,7 +51,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -64,7 +64,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5206\u652f\u4fdd\u62a4\u89c4\u5219 \u5df2\u5220\u9664" + "content": "🔔 分支保护规则 已删除" }, "template": "red" }, @@ -97,7 +97,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -110,7 +110,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5206\u652f\u4fdd\u62a4\u89c4\u5219 \u5df2\u7f16\u8f91" + "content": "🔔 分支保护规则 已编辑" }, "template": "blue" }, @@ -143,7 +143,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -156,7 +156,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/check_run.json b/example-configs/templates/cn/check_run.json index 512ebf5..df8fa8e 100644 --- a/example-configs/templates/cn/check_run.json +++ b/example-configs/templates/cn/check_run.json @@ -14,7 +14,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2705 \u68c0\u67e5\u901a\u8fc7\uff1a{{check_run.name}}" + "content": "✅ 检查通过:{{check_run.name}}" }, "template": "green" }, @@ -23,7 +23,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md | default('')}}**\u68c0\u67e5\uff1a** {{check_run.name}}\n\n**\u72b6\u6001\uff1a** {{check_run.status}}\n**\u7ed3\u679c\uff1a** {{check_run.conclusion}}\n" + "content": "**仓库:** {{repository_link_md | default('')}}**检查:** {{check_run.name}}\n\n**状态:** {{check_run.status}}\n**结果:** {{check_run.conclusion}}\n" } } ] @@ -44,7 +44,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u274c \u68c0\u67e5\u5931\u8d25\uff1a{{check_run.name}}" + "content": "❌ 检查失败:{{check_run.name}}" }, "template": "red" }, @@ -53,7 +53,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md | default('')}}\n**\u68c0\u67e5\uff1a** {{check_run.name}}\n**\u72b6\u6001\uff1a** {{check_run.status}}\n**\u7ed3\u679c\uff1a** {{check_run.conclusion}}\n" + "content": "**仓库:** {{repository_link_md | default('')}}\n**检查:** {{check_run.name}}\n**状态:** {{check_run.status}}\n**结果:** {{check_run.conclusion}}\n" } } ] @@ -73,7 +73,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2705 Check Run\uff1a{{check_run.name}} {{check_run.status}}" + "content": "✅ Check Run:{{check_run.name}} {{check_run.status}}" }, "template": "green" }, @@ -82,7 +82,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md | default('')}}\n**\u68c0\u67e5\uff1a** {{check_run.name}}\n**\u72b6\u6001\uff1a** {{check_run.status}}\n**\u7ed3\u679c\uff1a** {{check_run.conclusion}}\n" + "content": "**仓库:** {{repository_link_md | default('')}}\n**检查:** {{check_run.name}}\n**状态:** {{check_run.status}}\n**结果:** {{check_run.conclusion}}\n" } } ] @@ -102,7 +102,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u68c0\u67e5\u8fd0\u884c \u5df2\u521b\u5efa" + "content": "🔔 检查运行 已创建" }, "template": "green" }, @@ -111,7 +111,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -124,7 +124,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -148,7 +148,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u68c0\u67e5\u8fd0\u884c \u5df2\u8bf7\u6c42\u64cd\u4f5c" + "content": "🔔 检查运行 已请求操作" }, "template": "turquoise" }, @@ -157,7 +157,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -170,7 +170,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -194,7 +194,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u68c0\u67e5\u8fd0\u884c \u5df2\u91cd\u65b0\u8bf7\u6c42" + "content": "🔔 检查运行 已重新请求" }, "template": "turquoise" }, @@ -203,7 +203,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -216,7 +216,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/check_suite.json b/example-configs/templates/cn/check_suite.json index 8a28347..1a1bf53 100644 --- a/example-configs/templates/cn/check_suite.json +++ b/example-configs/templates/cn/check_suite.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83e\uddea Check Suite\uff1a{{action}}" + "content": "🧪 Check Suite:{{action}}" }, "template": "green" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md | default('')}}\n**\u7ed3\u679c\uff1a** {{check_suite.conclusion | default('N/A')}}\n**\u63d0\u4ea4\uff1a** {{check_suite.head_sha}}\n" + "content": "**仓库:** {{repository_link_md | default('')}}\n**结果:** {{check_suite.conclusion | default('N/A')}}\n**提交:** {{check_suite.head_sha}}\n" } } ] @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u68c0\u67e5\u5957\u4ef6 \u5df2\u5b8c\u6210" + "content": "🔔 检查套件 已完成" }, "template": "green" }, @@ -51,7 +51,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -64,7 +64,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u68c0\u67e5\u5957\u4ef6 \u5df2\u8bf7\u6c42" + "content": "🔔 检查套件 已请求" }, "template": "orange" }, @@ -97,7 +97,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -110,7 +110,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u68c0\u67e5\u5957\u4ef6 \u5df2\u91cd\u65b0\u8bf7\u6c42" + "content": "🔔 检查套件 已重新请求" }, "template": "turquoise" }, @@ -143,7 +143,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -156,7 +156,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/code_scanning_alert.json b/example-configs/templates/cn/code_scanning_alert.json index c020e05..c4296e1 100644 --- a/example-configs/templates/cn/code_scanning_alert.json +++ b/example-configs/templates/cn/code_scanning_alert.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd0d \u4ee3\u7801\u626b\u63cf\u8b66\u544a{{action}}" + "content": "🔍 代码扫描警告{{action}}" }, "template": "orange" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u8b66\u544a\uff1a** {{alert_rule_description}}\n**\u4e25\u91cd\u5ea6\uff1a** {{alert_rule_severity}}\n**\u72b6\u6001\uff1a** {{alert_state}}\n" + "content": "**仓库:** {{repository_link_md}}\n**警告:** {{alert_rule_description}}\n**严重度:** {{alert_rule_severity}}\n**状态:** {{alert_state}}\n" } } ] @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4ee3\u7801\u626b\u63cf\u8b66\u62a5 \u51fa\u73b0\u5728\u5206\u652f" + "content": "🔔 代码扫描警报 出现在分支" }, "template": "turquoise" }, @@ -51,7 +51,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -64,7 +64,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4ee3\u7801\u626b\u63cf\u8b66\u62a5 \u88ab\u7528\u6237\u5173\u95ed" + "content": "🔔 代码扫描警报 被用户关闭" }, "template": "turquoise" }, @@ -97,7 +97,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -110,7 +110,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4ee3\u7801\u626b\u63cf\u8b66\u62a5 \u5df2\u521b\u5efa" + "content": "🔔 代码扫描警报 已创建" }, "template": "green" }, @@ -143,7 +143,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -156,7 +156,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -180,7 +180,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4ee3\u7801\u626b\u63cf\u8b66\u62a5 \u5df2\u4fee\u590d" + "content": "🔔 代码扫描警报 已修复" }, "template": "green" }, @@ -189,7 +189,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -202,7 +202,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -226,7 +226,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4ee3\u7801\u626b\u63cf\u8b66\u62a5 \u5df2\u91cd\u65b0\u6253\u5f00" + "content": "🔔 代码扫描警报 已重新打开" }, "template": "orange" }, @@ -235,7 +235,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -248,7 +248,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -272,7 +272,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4ee3\u7801\u626b\u63cf\u8b66\u62a5 \u88ab\u7528\u6237\u91cd\u65b0\u6253\u5f00" + "content": "🔔 代码扫描警报 被用户重新打开" }, "template": "turquoise" }, @@ -281,7 +281,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -294,7 +294,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/commit_comment.json b/example-configs/templates/cn/commit_comment.json index 343fe6e..7fd7f4e 100644 --- a/example-configs/templates/cn/commit_comment.json +++ b/example-configs/templates/cn/commit_comment.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcac \u63d0\u4ea4\u8bc4\u8bba" + "content": "💬 提交评论" }, "template": "blue" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u63d0\u4ea4\uff1a** {{commit_sha_short}}\n**\u4f5c\u8005\uff1a** {{sender_link_md}}\n**\u8bc4\u8bba\uff1a** {{comment_body}}\n" + "content": "**提交:** {{commit_sha_short}}\n**作者:** {{sender_link_md}}\n**评论:** {{comment_body}}\n" } }, { @@ -32,7 +32,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8bc4\u8bba" + "content": "查看评论" }, "url": "{{comment_html_url}}", "type": "primary" @@ -56,7 +56,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u63d0\u4ea4\u8bc4\u8bba \u5df2\u521b\u5efa" + "content": "🔔 提交评论 已创建" }, "template": "green" }, @@ -65,7 +65,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -78,7 +78,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/create.json b/example-configs/templates/cn/create.json index 41c7ca9..30d2b79 100644 --- a/example-configs/templates/cn/create.json +++ b/example-configs/templates/cn/create.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2728 \u65b0\u521b\u5efa\uff1a{{ref_type}} \u5728 {{repository.full_name}}" + "content": "✨ 新创建:{{ref_type}} 在 {{repository.full_name}}" }, "template": "blue" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u521b\u5efa\u8005\uff1a** {{sender_link_md | default(sender.login)}}\n**\u7c7b\u578b\uff1a** {{ref_type}} \u540d\u79f0\uff1a {{ref}}\n" + "content": "**创建者:** {{sender_link_md | default(sender.login)}}\n**类型:** {{ref_type}} 名称: {{ref}}\n" } } ] diff --git a/example-configs/templates/cn/custom_property.json b/example-configs/templates/cn/custom_property.json index 38b9dac..485c2c5 100644 --- a/example-configs/templates/cn/custom_property.json +++ b/example-configs/templates/cn/custom_property.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u81ea\u5b9a\u4e49\u5c5e\u6027 \u5df2\u521b\u5efa" + "content": "🔔 自定义属性 已创建" }, "template": "green" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -35,7 +35,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u81ea\u5b9a\u4e49\u5c5e\u6027 \u5df2\u5220\u9664" + "content": "🔔 自定义属性 已删除" }, "template": "red" }, @@ -68,7 +68,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -81,7 +81,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -105,7 +105,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u81ea\u5b9a\u4e49\u5c5e\u6027 \u63d0\u5347\u81f3\u4f01\u4e1a" + "content": "🔔 自定义属性 提升至企业" }, "template": "turquoise" }, @@ -114,7 +114,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -127,7 +127,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -151,7 +151,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u81ea\u5b9a\u4e49\u5c5e\u6027 \u5df2\u66f4\u65b0" + "content": "🔔 自定义属性 已更新" }, "template": "blue" }, @@ -160,7 +160,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -173,7 +173,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/custom_property_values.json b/example-configs/templates/cn/custom_property_values.json index 96c850c..38043e5 100644 --- a/example-configs/templates/cn/custom_property_values.json +++ b/example-configs/templates/cn/custom_property_values.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u81ea\u5b9a\u4e49\u5c5e\u6027\u503c \u5df2\u66f4\u65b0" + "content": "🔔 自定义属性值 已更新" }, "template": "blue" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -35,7 +35,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/delete.json b/example-configs/templates/cn/delete.json index 42b790c..d4906b6 100644 --- a/example-configs/templates/cn/delete.json +++ b/example-configs/templates/cn/delete.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\uddd1\ufe0f \u5220\u9664\uff1a{{ref_type}} \u5728 {{repository.full_name}}" + "content": "🗑️ 删除:{{ref_type}} 在 {{repository.full_name}}" }, "template": "red" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u89e6\u53d1\u8005\uff1a** {{sender_link_md | default(sender.login)}}\n**\u5220\u9664\uff1a** {{ref_type}} {{ref}}\n" + "content": "**触发者:** {{sender_link_md | default(sender.login)}}\n**删除:** {{ref_type}} {{ref}}\n" } } ] diff --git a/example-configs/templates/cn/dependabot_alert.json b/example-configs/templates/cn/dependabot_alert.json index 7f4fddc..cc69620 100644 --- a/example-configs/templates/cn/dependabot_alert.json +++ b/example-configs/templates/cn/dependabot_alert.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83e\udd16 Dependabot\u8b66\u544a{{action}}" + "content": "🤖 Dependabot警告{{action}}" }, "template": "orange" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u5305\uff1a** {{alert_package_name}}\n**\u4e25\u91cd\u5ea6\uff1a** {{alert_severity}}\n**\u72b6\u6001\uff1a** {{alert_state}}\n" + "content": "**仓库:** {{repository_link_md}}\n**包:** {{alert_package_name}}\n**严重度:** {{alert_severity}}\n**状态:** {{alert_state}}\n" } } ] @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Dependabot \u8b66\u62a5 \u81ea\u52a8\u9a73\u56de" + "content": "🔔 Dependabot 警报 自动驳回" }, "template": "turquoise" }, @@ -51,7 +51,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -64,7 +64,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Dependabot \u8b66\u62a5 \u81ea\u52a8\u91cd\u65b0\u6253\u5f00" + "content": "🔔 Dependabot 警报 自动重新打开" }, "template": "turquoise" }, @@ -97,7 +97,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -110,7 +110,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Dependabot \u8b66\u62a5 \u5df2\u521b\u5efa" + "content": "🔔 Dependabot 警报 已创建" }, "template": "green" }, @@ -143,7 +143,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -156,7 +156,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -180,7 +180,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Dependabot \u8b66\u62a5 \u5df2\u9a73\u56de" + "content": "🔔 Dependabot 警报 已驳回" }, "template": "orange" }, @@ -189,7 +189,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -202,7 +202,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -226,7 +226,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Dependabot \u8b66\u62a5 \u5df2\u4fee\u590d" + "content": "🔔 Dependabot 警报 已修复" }, "template": "green" }, @@ -235,7 +235,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -248,7 +248,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -272,7 +272,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Dependabot \u8b66\u62a5 \u91cd\u65b0\u5f15\u5165" + "content": "🔔 Dependabot 警报 重新引入" }, "template": "turquoise" }, @@ -281,7 +281,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -294,7 +294,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -318,7 +318,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Dependabot \u8b66\u62a5 \u5df2\u91cd\u65b0\u6253\u5f00" + "content": "🔔 Dependabot 警报 已重新打开" }, "template": "orange" }, @@ -327,7 +327,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -340,7 +340,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/deploy_key.json b/example-configs/templates/cn/deploy_key.json index 8cc2e81..6052e21 100644 --- a/example-configs/templates/cn/deploy_key.json +++ b/example-configs/templates/cn/deploy_key.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u90e8\u7f72\u5bc6\u94a5 \u5df2\u521b\u5efa" + "content": "🔔 部署密钥 已创建" }, "template": "green" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -35,7 +35,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u90e8\u7f72\u5bc6\u94a5 \u5df2\u5220\u9664" + "content": "🔔 部署密钥 已删除" }, "template": "red" }, @@ -68,7 +68,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -81,7 +81,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/deployment.json b/example-configs/templates/cn/deployment.json index 50ffea9..71255eb 100644 --- a/example-configs/templates/cn/deployment.json +++ b/example-configs/templates/cn/deployment.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udea2 \u90e8\u7f72\uff1a{{deployment.environment}}" + "content": "🚢 部署:{{deployment.environment}}" }, "template": "green" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u5e94\u7528\uff1a** {{deployment.ref}}\n**\u73af\u5883\uff1a** {{deployment.environment}}\n**\u53d1\u8d77\u4eba\uff1a** {{sender_link_md | default(sender.login)}}\n" + "content": "**应用:** {{deployment.ref}}\n**环境:** {{deployment.environment}}\n**发起人:** {{sender_link_md | default(sender.login)}}\n" } } ] diff --git a/example-configs/templates/cn/deployment_protection_rule.json b/example-configs/templates/cn/deployment_protection_rule.json index 978f108..fa4f036 100644 --- a/example-configs/templates/cn/deployment_protection_rule.json +++ b/example-configs/templates/cn/deployment_protection_rule.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u90e8\u7f72\u4fdd\u62a4\u89c4\u5219 \u5df2\u8bf7\u6c42" + "content": "🔔 部署保护规则 已请求" }, "template": "orange" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -35,7 +35,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/deployment_review.json b/example-configs/templates/cn/deployment_review.json index a794ce3..1d8583d 100644 --- a/example-configs/templates/cn/deployment_review.json +++ b/example-configs/templates/cn/deployment_review.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2705 \u90e8\u7f72\u5df2\u6279\u51c6" + "content": "✅ 部署已批准" }, "template": "green" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u5ba1\u6838\u8005\uff1a** {{sender_link_md}}\n**\u73af\u5883\uff1a** {{environment}}\n**\u8bc4\u8bba\uff1a** {{comment}}\n" + "content": "**审核者:** {{sender_link_md}}\n**环境:** {{environment}}\n**评论:** {{comment}}\n" } } ] @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u274c \u90e8\u7f72\u5df2\u62d2\u7edd" + "content": "❌ 部署已拒绝" }, "template": "red" }, @@ -51,7 +51,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u5ba1\u6838\u8005\uff1a** {{sender_link_md}}\n**\u73af\u5883\uff1a** {{environment}}\n**\u8bc4\u8bba\uff1a** {{comment}}\n" + "content": "**审核者:** {{sender_link_md}}\n**环境:** {{environment}}\n**评论:** {{comment}}\n" } } ] @@ -71,7 +71,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u90e8\u7f72\u5ba1\u6838{{action}}" + "content": "🔔 部署审核{{action}}" }, "template": "blue" }, @@ -80,7 +80,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u5ba1\u6838\u8005\uff1a** {{sender_link_md}}\n**\u73af\u5883\uff1a** {{environment}}\n" + "content": "**审核者:** {{sender_link_md}}\n**环境:** {{environment}}\n" } } ] @@ -100,7 +100,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u90e8\u7f72\u5ba1\u67e5 \u5df2\u8bf7\u6c42" + "content": "🔔 部署审查 已请求" }, "template": "orange" }, @@ -109,7 +109,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -122,7 +122,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/deployment_status.json b/example-configs/templates/cn/deployment_status.json index 248076f..66330d9 100644 --- a/example-configs/templates/cn/deployment_status.json +++ b/example-configs/templates/cn/deployment_status.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udce3 \u90e8\u7f72\u72b6\u6001\uff1a{{deployment_status.state}}" + "content": "📣 部署状态:{{deployment_status.state}}" }, "template": "green" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u90e8\u7f72\uff1a** {{deployment.ref}}\n**\u72b6\u6001\uff1a** {{deployment_status.state}}\n**\u63cf\u8ff0\uff1a** {{deployment_status.description}}\n" + "content": "**部署:** {{deployment.ref}}\n**状态:** {{deployment_status.state}}\n**描述:** {{deployment_status.description}}\n" } } ] diff --git a/example-configs/templates/cn/discussion.json b/example-configs/templates/cn/discussion.json index adaaccc..097a7c3 100644 --- a/example-configs/templates/cn/discussion.json +++ b/example-configs/templates/cn/discussion.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcac \u65b0\u8ba8\u8bba\u5df2\u521b\u5efa" + "content": "💬 新讨论已创建" }, "template": "green" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u6807\u9898\uff1a** {{discussion.title}}\n**\u4f5c\u8005\uff1a** {{sender_link_md}}\n**\u5206\u7c7b\uff1a** {{discussion.category.name}}" + "content": "**仓库:** {{repository_link_md}}\n**标题:** {{discussion.title}}\n**作者:** {{sender_link_md}}\n**分类:** {{discussion.category.name}}" } }, { @@ -45,7 +45,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u53c2\u4e0e\u8ba8\u8bba" + "content": "参与讨论" }, "url": "{{discussion.html_url}}", "type": "primary" @@ -69,7 +69,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2705 \u8ba8\u8bba\u5df2\u88ab\u56de\u7b54" + "content": "✅ 讨论已被回答" }, "template": "purple" }, @@ -78,7 +78,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u8ba8\u8bba\uff1a** {{discussion.title}}\n**\u56de\u7b54\u8005\uff1a** {{sender_link_md}}\n**\u5206\u7c7b\uff1a** {{discussion.category.name}}" + "content": "**仓库:** {{repository_link_md}}\n**讨论:** {{discussion.title}}\n**回答者:** {{sender_link_md}}\n**分类:** {{discussion.category.name}}" } }, { @@ -89,7 +89,7 @@ "elements": [ { "tag": "plain_text", - "content": "\u6b64\u8ba8\u8bba\u5df2\u6807\u8bb0\u4e86\u7b54\u6848" + "content": "此讨论已标记了答案" } ] }, @@ -100,7 +100,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u7b54\u6848" + "content": "查看答案" }, "url": "{{discussion.html_url}}", "type": "primary" @@ -124,7 +124,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd12 \u8ba8\u8bba\u5df2\u9501\u5b9a" + "content": "🔒 讨论已锁定" }, "template": "orange" }, @@ -133,7 +133,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u8ba8\u8bba\uff1a** {{discussion.title}}\n**\u9501\u5b9a\u8005\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**讨论:** {{discussion.title}}\n**锁定者:** {{sender_link_md}}" } }, { @@ -144,7 +144,7 @@ "elements": [ { "tag": "plain_text", - "content": "\u6b64\u8ba8\u8bba\u5df2\u88ab\u9501\u5b9a" + "content": "此讨论已被锁定" } ] }, @@ -155,7 +155,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8ba8\u8bba" + "content": "查看讨论" }, "url": "{{discussion.html_url}}", "type": "default" @@ -179,7 +179,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ufffd \u8ba8\u8bba\u5df2\u89e3\u9501" + "content": "� 讨论已解锁" }, "template": "green" }, @@ -188,7 +188,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u8ba8\u8bba\uff1a** {{discussion.title}}\n**\u89e3\u9501\u8005\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**讨论:** {{discussion.title}}\n**解锁者:** {{sender_link_md}}" } }, { @@ -199,7 +199,7 @@ "elements": [ { "tag": "plain_text", - "content": "\u6b64\u8ba8\u8bba\u73b0\u5df2\u5f00\u653e\u8bc4\u8bba" + "content": "此讨论现已开放评论" } ] }, @@ -210,7 +210,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u53c2\u4e0e\u8ba8\u8bba" + "content": "参与讨论" }, "url": "{{discussion.html_url}}", "type": "primary" @@ -234,7 +234,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udccb \u8ba8\u8bba\u5df2\u5173\u95ed" + "content": "📋 讨论已关闭" }, "template": "grey" }, @@ -243,7 +243,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u8ba8\u8bba\uff1a** {{discussion.title}}\n**\u5173\u95ed\u8005\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**讨论:** {{discussion.title}}\n**关闭者:** {{sender_link_md}}" } }, { @@ -256,7 +256,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8ba8\u8bba" + "content": "查看讨论" }, "url": "{{discussion.html_url}}", "type": "default" @@ -280,7 +280,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcac \u8ba8\u8bba {{action}}" + "content": "💬 讨论 {{action}}" }, "template": "turquoise" }, @@ -289,7 +289,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u8ba8\u8bba\uff1a** {{discussion.title}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}\n**\u5206\u7c7b\uff1a** {{discussion.category.name}}" + "content": "**仓库:** {{repository_link_md}}\n**讨论:** {{discussion.title}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}\n**分类:** {{discussion.category.name}}" } }, { @@ -302,7 +302,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8ba8\u8bba" + "content": "查看讨论" }, "url": "{{discussion.html_url}}", "type": "primary" @@ -326,7 +326,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 discussion \u5df2\u5220\u9664" + "content": "🔔 discussion 已删除" }, "template": "red" }, @@ -335,7 +335,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -348,7 +348,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -372,7 +372,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 discussion \u5df2\u7f16\u8f91" + "content": "🔔 discussion 已编辑" }, "template": "blue" }, @@ -381,7 +381,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -394,7 +394,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -418,7 +418,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 discussion \u5df2\u6dfb\u52a0\u6807\u7b7e" + "content": "🔔 discussion 已添加标签" }, "template": "turquoise" }, @@ -427,7 +427,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -440,7 +440,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -464,7 +464,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 discussion \u5df2\u56fa\u5b9a" + "content": "🔔 discussion 已固定" }, "template": "turquoise" }, @@ -473,7 +473,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -486,7 +486,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -510,7 +510,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 discussion \u5df2\u8f6c\u79fb" + "content": "🔔 discussion 已转移" }, "template": "turquoise" }, @@ -519,7 +519,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -532,7 +532,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -556,7 +556,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 discussion \u672a\u56de\u7b54" + "content": "🔔 discussion 未回答" }, "template": "turquoise" }, @@ -565,7 +565,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -578,7 +578,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -602,7 +602,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 discussion \u5df2\u79fb\u9664\u6807\u7b7e" + "content": "🔔 discussion 已移除标签" }, "template": "turquoise" }, @@ -611,7 +611,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -624,7 +624,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -648,7 +648,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 discussion \u5df2\u53d6\u6d88\u56fa\u5b9a" + "content": "🔔 discussion 已取消固定" }, "template": "turquoise" }, @@ -657,7 +657,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -670,7 +670,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/discussion_comment.json b/example-configs/templates/cn/discussion_comment.json index 6a55775..9ec73dd 100644 --- a/example-configs/templates/cn/discussion_comment.json +++ b/example-configs/templates/cn/discussion_comment.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcac \u8ba8\u8bba\u8bc4\u8bba\uff1a{{discussion.title}}" + "content": "💬 讨论评论:{{discussion.title}}" }, "template": "teal" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4f5c\u8005\uff1a** {{sender_link_md | default(sender.login)}}\n**\u8ba8\u8bba\uff1a** {{discussion.title}}\n**\u8bc4\u8bba\uff1a** {{comment.body}}\n" + "content": "**作者:** {{sender_link_md | default(sender.login)}}\n**讨论:** {{discussion.title}}\n**评论:** {{comment.body}}\n" } }, { @@ -32,7 +32,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8bc4\u8bba" + "content": "查看评论" }, "url": "{{comment.html_url}}", "type": "primary" @@ -56,7 +56,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 discussion_comment \u5df2\u521b\u5efa" + "content": "🔔 discussion_comment 已创建" }, "template": "green" }, @@ -65,7 +65,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -78,7 +78,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -102,7 +102,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 discussion_comment \u5df2\u5220\u9664" + "content": "🔔 discussion_comment 已删除" }, "template": "red" }, @@ -111,7 +111,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -124,7 +124,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -148,7 +148,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 discussion_comment \u5df2\u7f16\u8f91" + "content": "🔔 discussion_comment 已编辑" }, "template": "blue" }, @@ -157,7 +157,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -170,7 +170,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/fork.json b/example-configs/templates/cn/fork.json index 686b83e..8020d1b 100644 --- a/example-configs/templates/cn/fork.json +++ b/example-configs/templates/cn/fork.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83c\udf74 Fork\uff1a{{forkee.full_name}}" + "content": "🍴 Fork:{{forkee.full_name}}" }, "template": "purple" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**Fork\u8005\uff1a** {{sender_link_md | default(sender.login)}}\n**\u76ee\u6807\u4ed3\u5e93\uff1a** {{forkee.full_name}}\n" + "content": "**Fork者:** {{sender_link_md | default(sender.login)}}\n**目标仓库:** {{forkee.full_name}}\n" } }, { @@ -32,7 +32,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770bFork\u4ed3\u5e93" + "content": "查看Fork仓库" }, "url": "{{forkee.html_url}}", "type": "primary" diff --git a/example-configs/templates/cn/github_app_authorization.json b/example-configs/templates/cn/github_app_authorization.json index bc69134..d677bf1 100644 --- a/example-configs/templates/cn/github_app_authorization.json +++ b/example-configs/templates/cn/github_app_authorization.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 github_app_authorization \u5df2\u64a4\u9500" + "content": "🔔 github_app_authorization 已撤销" }, "template": "turquoise" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -35,7 +35,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/gollum.json b/example-configs/templates/cn/gollum.json index 55eb7cc..471ceaf 100644 --- a/example-configs/templates/cn/gollum.json +++ b/example-configs/templates/cn/gollum.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcda Wiki \u66f4\u65b0\uff1a{{repository.full_name}}" + "content": "📚 Wiki 更新:{{repository.full_name}}" }, "template": "gray" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u63a8\u9001\u8005\uff1a** {{sender_link_md | default(sender.login)}}\n**\u53d8\u66f4\uff1a** {{pages | length}} \u4e2a\u9875\u9762\u5df2\u66f4\u65b0\n" + "content": "**推送者:** {{sender_link_md | default(sender.login)}}\n**变更:** {{pages | length}} 个页面已更新\n" } }, { @@ -32,7 +32,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u4ed3\u5e93" + "content": "查看仓库" }, "url": "{{repository.html_url}}", "type": "primary" diff --git a/example-configs/templates/cn/installation.json b/example-configs/templates/cn/installation.json index 4568554..a704b42 100644 --- a/example-configs/templates/cn/installation.json +++ b/example-configs/templates/cn/installation.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83e\udd16 GitHub\u5e94\u7528{{action}}" + "content": "🤖 GitHub应用{{action}}" }, "template": "blue" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u5e94\u7528\uff1a** {{app_name}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u5b89\u88c5\u8005\uff1a** {{sender_link_md}}\n" + "content": "**应用:** {{app_name}}\n**操作:** {{action}}\n**安装者:** {{sender_link_md}}\n" } } ] @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 installation \u5df2\u521b\u5efa" + "content": "🔔 installation 已创建" }, "template": "green" }, @@ -51,7 +51,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -64,7 +64,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 installation \u5df2\u5220\u9664" + "content": "🔔 installation 已删除" }, "template": "red" }, @@ -97,7 +97,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -110,7 +110,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 installation \u65b0\u6743\u9650\u5df2\u63a5\u53d7" + "content": "🔔 installation 新权限已接受" }, "template": "turquoise" }, @@ -143,7 +143,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -156,7 +156,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -180,7 +180,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 installation \u5df2\u6682\u505c" + "content": "🔔 installation 已暂停" }, "template": "turquoise" }, @@ -189,7 +189,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -202,7 +202,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -226,7 +226,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 installation \u5df2\u6062\u590d" + "content": "🔔 installation 已恢复" }, "template": "turquoise" }, @@ -235,7 +235,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -248,7 +248,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/installation_repositories.json b/example-configs/templates/cn/installation_repositories.json index a7c2b0d..bc02d9c 100644 --- a/example-configs/templates/cn/installation_repositories.json +++ b/example-configs/templates/cn/installation_repositories.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 installation_repositories \u5df2\u6dfb\u52a0" + "content": "🔔 installation_repositories 已添加" }, "template": "turquoise" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -35,7 +35,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 installation_repositories \u5df2\u79fb\u9664" + "content": "🔔 installation_repositories 已移除" }, "template": "red" }, @@ -68,7 +68,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -81,7 +81,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/installation_target.json b/example-configs/templates/cn/installation_target.json index 04eb586..6ee318e 100644 --- a/example-configs/templates/cn/installation_target.json +++ b/example-configs/templates/cn/installation_target.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 installation_target \u5df2\u91cd\u547d\u540d" + "content": "🔔 installation_target 已重命名" }, "template": "turquoise" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -35,7 +35,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/issue_comment.json b/example-configs/templates/cn/issue_comment.json index 25d2823..11eb789 100644 --- a/example-configs/templates/cn/issue_comment.json +++ b/example-configs/templates/cn/issue_comment.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcac Issue \u8bc4\u8bba\uff1a#{{issue.number}}" + "content": "💬 Issue 评论:#{{issue.number}}" }, "template": "orange" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4f5c\u8005\uff1a** {{sender_link_md | default(sender.login)}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n**\u8bc4\u8bba\uff1a** {{comment.body}}\n" + "content": "**作者:** {{sender_link_md | default(sender.login)}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**评论:** {{comment.body}}\n" } }, { @@ -32,7 +32,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8bc4\u8bba" + "content": "查看评论" }, "url": "{{comment.html_url}}", "type": "primary" @@ -56,7 +56,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Issue \u8bc4\u8bba \u5df2\u521b\u5efa" + "content": "🔔 Issue 评论 已创建" }, "template": "green" }, @@ -65,7 +65,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -78,7 +78,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -102,7 +102,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Issue \u8bc4\u8bba \u5df2\u5220\u9664" + "content": "🔔 Issue 评论 已删除" }, "template": "red" }, @@ -111,7 +111,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -124,7 +124,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -148,7 +148,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Issue \u8bc4\u8bba \u5df2\u7f16\u8f91" + "content": "🔔 Issue 评论 已编辑" }, "template": "blue" }, @@ -157,7 +157,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -170,7 +170,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -194,7 +194,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcac PR \u8bc4\u8bba\uff1a#{{issue.number}}" + "content": "💬 PR 评论:#{{issue.number}}" }, "template": "orange" }, @@ -203,7 +203,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4f5c\u8005\uff1a** {{sender_link_md | default(sender.login)}}\n**Pull Request\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n**\u8bc4\u8bba\uff1a** {{comment.body}}\n" + "content": "**作者:** {{sender_link_md | default(sender.login)}}\n**Pull Request:** {{issue_link_md | default(issue.html_url | default(''))}}\n**评论:** {{comment.body}}\n" } }, { @@ -213,7 +213,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8bc4\u8bba" + "content": "查看评论" }, "url": "{{comment.html_url}}", "type": "primary" @@ -238,7 +238,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 PR \u8bc4\u8bba \u5df2\u521b\u5efa" + "content": "🔔 PR 评论 已创建" }, "template": "green" }, @@ -247,7 +247,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -260,7 +260,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -285,7 +285,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 PR \u8bc4\u8bba \u5df2\u5220\u9664" + "content": "🔔 PR 评论 已删除" }, "template": "red" }, @@ -294,7 +294,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -307,7 +307,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -332,7 +332,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 PR \u8bc4\u8bba \u5df2\u7f16\u8f91" + "content": "🔔 PR 评论 已编辑" }, "template": "blue" }, @@ -341,7 +341,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -354,7 +354,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/issue_dependencies.json b/example-configs/templates/cn/issue_dependencies.json index 2c0b07d..ea99062 100644 --- a/example-configs/templates/cn/issue_dependencies.json +++ b/example-configs/templates/cn/issue_dependencies.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Issue \u4f9d\u8d56 \u88ab\u963b\u6b62\u8005\u5df2\u6dfb\u52a0" + "content": "🔔 Issue 依赖 被阻止者已添加" }, "template": "turquoise" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -35,7 +35,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Issue \u4f9d\u8d56 \u88ab\u963b\u6b62\u8005\u5df2\u79fb\u9664" + "content": "🔔 Issue 依赖 被阻止者已移除" }, "template": "turquoise" }, @@ -68,7 +68,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -81,7 +81,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -105,7 +105,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Issue \u4f9d\u8d56 \u963b\u6b62\u8005\u5df2\u6dfb\u52a0" + "content": "🔔 Issue 依赖 阻止者已添加" }, "template": "turquoise" }, @@ -114,7 +114,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -127,7 +127,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -151,7 +151,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Issue \u4f9d\u8d56 \u963b\u6b62\u8005\u5df2\u79fb\u9664" + "content": "🔔 Issue 依赖 阻止者已移除" }, "template": "turquoise" }, @@ -160,7 +160,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -173,7 +173,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/issues.json b/example-configs/templates/cn/issues.json index 81a1a5f..21e5568 100644 --- a/example-configs/templates/cn/issues.json +++ b/example-configs/templates/cn/issues.json @@ -14,7 +14,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udc1b Bug \u62a5\u544a\uff1a{{issue.title}}" + "content": "🐛 Bug 报告:{{issue.title}}" }, "template": "red" }, @@ -23,7 +23,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udc1b **\u53d1\u73b0 Bug**\uff0c\u62a5\u544a\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**\u63cf\u8ff0\uff1a** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**\u6807\u7b7e\uff1a** {{issue_labels_joined}}{{/if}}" + "content": "🐛 **发现 Bug**,报告者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**描述:** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**标签:** {{issue_labels_joined}}{{/if}}" } }, { @@ -33,7 +33,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b Bug" + "content": "查看 Bug" }, "url": "{{issue.html_url}}", "type": "primary" @@ -58,7 +58,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2728 \u65b0\u529f\u80fd\u8bf7\u6c42\uff1a{{issue.title}}" + "content": "✨ 新功能请求:{{issue.title}}" }, "template": "blue" }, @@ -67,7 +67,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\u2728 **\u65b0\u529f\u80fd\u8bf7\u6c42**\uff0c\u521b\u5efa\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**\u63cf\u8ff0\uff1a** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**\u6807\u7b7e\uff1a** {{issue_labels_joined}}{{/if}}" + "content": "✨ **新功能请求**,创建者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**描述:** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**标签:** {{issue_labels_joined}}{{/if}}" } }, { @@ -77,7 +77,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u529f\u80fd" + "content": "查看功能" }, "url": "{{issue.html_url}}", "type": "primary" @@ -102,7 +102,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udccb \u4efb\u52a1\u521b\u5efa\uff1a{{issue.title}}" + "content": "📋 任务创建:{{issue.title}}" }, "template": "green" }, @@ -111,7 +111,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udccb **\u4efb\u52a1\u521b\u5efa**\uff0c\u521b\u5efa\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**\u63cf\u8ff0\uff1a** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**\u6807\u7b7e\uff1a** {{issue_labels_joined}}{{/if}}" + "content": "📋 **任务创建**,创建者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**描述:** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**标签:** {{issue_labels_joined}}{{/if}}" } }, { @@ -121,7 +121,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u4efb\u52a1" + "content": "查看任务" }, "url": "{{issue.html_url}}", "type": "primary" @@ -146,7 +146,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2705 Bug \u5df2\u4fee\u590d\uff1a{{issue.title}}" + "content": "✅ Bug 已修复:{{issue.title}}" }, "template": "purple" }, @@ -155,7 +155,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\u2705 **Bug \u5df2\u4fee\u590d**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n**\u72b6\u6001\uff1a** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**\u6807\u7b7e\uff1a** {{issue_labels_joined}}{{/if}}" + "content": "✅ **Bug 已修复**,操作者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**状态:** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**标签:** {{issue_labels_joined}}{{/if}}" } }, { @@ -165,7 +165,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b Bug" + "content": "查看 Bug" }, "url": "{{issue.html_url}}", "type": "default" @@ -190,7 +190,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2705 \u529f\u80fd\u5df2\u5b8c\u6210\uff1a{{issue.title}}" + "content": "✅ 功能已完成:{{issue.title}}" }, "template": "purple" }, @@ -199,7 +199,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\u2705 **\u529f\u80fd\u5df2\u5b8c\u6210**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n**\u72b6\u6001\uff1a** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**\u6807\u7b7e\uff1a** {{issue_labels_joined}}{{/if}}" + "content": "✅ **功能已完成**,操作者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**状态:** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**标签:** {{issue_labels_joined}}{{/if}}" } }, { @@ -209,7 +209,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u529f\u80fd" + "content": "查看功能" }, "url": "{{issue.html_url}}", "type": "default" @@ -234,7 +234,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2705 \u4efb\u52a1\u5df2\u5b8c\u6210\uff1a{{issue.title}}" + "content": "✅ 任务已完成:{{issue.title}}" }, "template": "purple" }, @@ -243,7 +243,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\u2705 **\u4efb\u52a1\u5df2\u5b8c\u6210**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n**\u72b6\u6001\uff1a** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**\u6807\u7b7e\uff1a** {{issue_labels_joined}}{{/if}}" + "content": "✅ **任务已完成**,操作者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**状态:** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**标签:** {{issue_labels_joined}}{{/if}}" } }, { @@ -253,7 +253,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u4efb\u52a1" + "content": "查看任务" }, "url": "{{issue.html_url}}", "type": "default" @@ -278,7 +278,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd04 Bug \u5df2\u91cd\u65b0\u5f00\u542f\uff1a{{issue.title}}" + "content": "🔄 Bug 已重新开启:{{issue.title}}" }, "template": "orange" }, @@ -287,7 +287,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udd04 **Bug \u5df2\u91cd\u65b0\u5f00\u542f**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**\u6807\u7b7e\uff1a** {{issue_labels_joined}}{{/if}}" + "content": "🔄 **Bug 已重新开启**,操作者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**标签:** {{issue_labels_joined}}{{/if}}" } }, { @@ -297,7 +297,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b Bug" + "content": "查看 Bug" }, "url": "{{issue.html_url}}", "type": "primary" @@ -322,7 +322,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd04 \u529f\u80fd\u5df2\u91cd\u65b0\u5f00\u542f\uff1a{{issue.title}}" + "content": "🔄 功能已重新开启:{{issue.title}}" }, "template": "orange" }, @@ -331,7 +331,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udd04 **\u529f\u80fd\u5df2\u91cd\u65b0\u5f00\u542f**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**\u6807\u7b7e\uff1a** {{issue_labels_joined}}{{/if}}" + "content": "🔄 **功能已重新开启**,操作者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**标签:** {{issue_labels_joined}}{{/if}}" } }, { @@ -341,7 +341,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u529f\u80fd" + "content": "查看功能" }, "url": "{{issue.html_url}}", "type": "primary" @@ -366,7 +366,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd04 \u4efb\u52a1\u5df2\u91cd\u65b0\u5f00\u542f\uff1a{{issue.title}}" + "content": "🔄 任务已重新开启:{{issue.title}}" }, "template": "orange" }, @@ -375,7 +375,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udd04 **\u4efb\u52a1\u5df2\u91cd\u65b0\u5f00\u542f**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**\u6807\u7b7e\uff1a** {{issue_labels_joined}}{{/if}}" + "content": "🔄 **任务已重新开启**,操作者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**标签:** {{issue_labels_joined}}{{/if}}" } }, { @@ -385,7 +385,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u4efb\u52a1" + "content": "查看任务" }, "url": "{{issue.html_url}}", "type": "primary" @@ -409,7 +409,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcdd Issue \u5df2\u5f00\u542f\uff1a{{issue.title}}" + "content": "📝 Issue 已开启:{{issue.title}}" }, "template": "green" }, @@ -418,7 +418,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udcdd **Issue \u5df2\u5f00\u542f**\uff0c\u521b\u5efa\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**\u63cf\u8ff0\uff1a** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**\u6807\u7b7e\uff1a** {{issue_labels_joined}}{{/if}}" + "content": "📝 **Issue 已开启**,创建者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**描述:** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**标签:** {{issue_labels_joined}}{{/if}}" } }, { @@ -428,7 +428,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b Issue" + "content": "查看 Issue" }, "url": "{{issue.html_url}}", "type": "primary" @@ -452,7 +452,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2705 Issue \u5df2\u5173\u95ed\uff1a{{issue.title}}" + "content": "✅ Issue 已关闭:{{issue.title}}" }, "template": "purple" }, @@ -461,7 +461,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\u2705 **Issue \u5df2\u5173\u95ed**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n**\u72b6\u6001\uff1a** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**\u6807\u7b7e\uff1a** {{issue_labels_joined}}{{/if}}" + "content": "✅ **Issue 已关闭**,操作者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**状态:** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**标签:** {{issue_labels_joined}}{{/if}}" } }, { @@ -471,7 +471,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b Issue" + "content": "查看 Issue" }, "url": "{{issue.html_url}}", "type": "default" @@ -495,7 +495,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd04 Issue \u5df2\u91cd\u65b0\u5f00\u542f\uff1a{{issue.title}}" + "content": "🔄 Issue 已重新开启:{{issue.title}}" }, "template": "orange" }, @@ -504,7 +504,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udd04 **Issue \u5df2\u91cd\u65b0\u5f00\u542f**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**\u6807\u7b7e\uff1a** {{issue_labels_joined}}{{/if}}" + "content": "🔄 **Issue 已重新开启**,操作者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**标签:** {{issue_labels_joined}}{{/if}}" } }, { @@ -514,7 +514,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b Issue" + "content": "查看 Issue" }, "url": "{{issue.html_url}}", "type": "primary" @@ -538,7 +538,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udc64 Issue \u5df2\u5206\u914d\uff1a{{issue.title}}" + "content": "👤 Issue 已分配:{{issue.title}}" }, "template": "blue" }, @@ -547,7 +547,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udc64 **Issue \u5df2\u5206\u914d**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if assignee_link_md}}**\u5206\u914d\u7ed9\uff1a** {{assignee_link_md}}{{/if}}" + "content": "👤 **Issue 已分配**,操作者:{{sender_link_md | default(sender.login)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if assignee_link_md}}**分配给:** {{assignee_link_md}}{{/if}}" } }, { @@ -557,7 +557,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b Issue" + "content": "查看 Issue" }, "url": "{{issue.html_url}}", "type": "primary" @@ -581,7 +581,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udc64 Issue \u5df2\u53d6\u6d88\u5206\u914d\uff1a{{issue.title}}" + "content": "👤 Issue 已取消分配:{{issue.title}}" }, "template": "grey" }, @@ -590,7 +590,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udc64 **Issue \u5df2\u53d6\u6d88\u5206\u914d**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if assignee_link_md}}**\u79fb\u9664\u5206\u914d\uff1a** {{assignee_link_md}}{{/if}}" + "content": "👤 **Issue 已取消分配**,操作者:{{sender_link_md | default(sender.login)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if assignee_link_md}}**移除分配:** {{assignee_link_md}}{{/if}}" } }, { @@ -600,7 +600,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b Issue" + "content": "查看 Issue" }, "url": "{{issue.html_url}}", "type": "default" @@ -624,7 +624,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u270f\ufe0f Issue \u5df2\u7f16\u8f91\uff1a{{issue.title}}" + "content": "✏️ Issue 已编辑:{{issue.title}}" }, "template": "grey" }, @@ -633,7 +633,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\u270f\ufe0f **Issue \u5df2\u7f16\u8f91**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if changes_title_from}}**\u6807\u9898\u6539\u81ea\uff1a** {{changes_title_from}}{{/if}}" + "content": "✏️ **Issue 已编辑**,操作者:{{sender_link_md | default(sender.login)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if changes_title_from}}**标题改自:** {{changes_title_from}}{{/if}}" } }, { @@ -643,7 +643,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b Issue" + "content": "查看 Issue" }, "url": "{{issue.html_url}}", "type": "default" @@ -667,7 +667,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83c\udfaf \u91cc\u7a0b\u7891\u5df2\u6dfb\u52a0\uff1a{{issue.title}}" + "content": "🎯 里程碑已添加:{{issue.title}}" }, "template": "turquoise" }, @@ -676,7 +676,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83c\udfaf **\u91cc\u7a0b\u7891\u5df2\u6dfb\u52a0**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if milestone_title}}**\u91cc\u7a0b\u7891\uff1a** {{milestone_title}}{{/if}}" + "content": "🎯 **里程碑已添加**,操作者:{{sender_link_md | default(sender.login)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if milestone_title}}**里程碑:** {{milestone_title}}{{/if}}" } }, { @@ -686,7 +686,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b Issue" + "content": "查看 Issue" }, "url": "{{issue.html_url}}", "type": "primary" @@ -710,7 +710,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83c\udfaf \u91cc\u7a0b\u7891\u5df2\u79fb\u9664\uff1a{{issue.title}}" + "content": "🎯 里程碑已移除:{{issue.title}}" }, "template": "grey" }, @@ -719,7 +719,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83c\udfaf **\u91cc\u7a0b\u7891\u5df2\u79fb\u9664**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if milestone_title}}**\u79fb\u9664\u91cc\u7a0b\u7891\uff1a** {{milestone_title}}{{/if}}" + "content": "🎯 **里程碑已移除**,操作者:{{sender_link_md | default(sender.login)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if milestone_title}}**移除里程碑:** {{milestone_title}}{{/if}}" } }, { @@ -729,7 +729,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b Issue" + "content": "查看 Issue" }, "url": "{{issue.html_url}}", "type": "default" @@ -753,7 +753,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udce6 Issue \u5df2\u8f6c\u79fb\uff1a{{issue.title}}" + "content": "📦 Issue 已转移:{{issue.title}}" }, "template": "blue" }, @@ -762,7 +762,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udce6 **Issue \u5df2\u8f6c\u79fb**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if changes_new_repository_full_name}}**\u8f6c\u79fb\u5230\u4ed3\u5e93\uff1a** {{changes_new_repository_full_name}}{{/if}}" + "content": "📦 **Issue 已转移**,操作者:{{sender_link_md | default(sender.login)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if changes_new_repository_full_name}}**转移到仓库:** {{changes_new_repository_full_name}}{{/if}}" } }, { @@ -772,7 +772,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b Issue" + "content": "查看 Issue" }, "url": "{{issue.html_url}}", "type": "primary" @@ -796,7 +796,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\uddd1\ufe0f Issue \u5df2\u5220\u9664\uff1a{{issue.title}}" + "content": "🗑️ Issue 已删除:{{issue.title}}" }, "template": "red" }, @@ -805,7 +805,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\uddd1\ufe0f **Issue \u5df2\u5220\u9664**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}" + "content": "🗑️ **Issue 已删除**,操作者:{{sender_link_md | default(sender.login)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" } } ] @@ -825,7 +825,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udccc Issue \u5df2\u7f6e\u9876\uff1a{{issue.title}}" + "content": "📌 Issue 已置顶:{{issue.title}}" }, "template": "yellow" }, @@ -834,7 +834,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udccc **Issue \u5df2\u7f6e\u9876**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}" + "content": "📌 **Issue 已置顶**,操作者:{{sender_link_md | default(sender.login)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" } }, { @@ -844,7 +844,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b Issue" + "content": "查看 Issue" }, "url": "{{issue.html_url}}", "type": "primary" @@ -868,7 +868,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udccc Issue \u5df2\u53d6\u6d88\u7f6e\u9876\uff1a{{issue.title}}" + "content": "📌 Issue 已取消置顶:{{issue.title}}" }, "template": "grey" }, @@ -877,7 +877,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udccc **Issue \u5df2\u53d6\u6d88\u7f6e\u9876**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}" + "content": "📌 **Issue 已取消置顶**,操作者:{{sender_link_md | default(sender.login)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" } }, { @@ -887,7 +887,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b Issue" + "content": "查看 Issue" }, "url": "{{issue.html_url}}", "type": "default" @@ -911,7 +911,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd12 Issue \u5df2\u9501\u5b9a\uff1a{{issue.title}}" + "content": "🔒 Issue 已锁定:{{issue.title}}" }, "template": "red" }, @@ -920,7 +920,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udd12 **Issue \u5df2\u9501\u5b9a**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.active_lock_reason}}**\u539f\u56e0\uff1a** {{issue.active_lock_reason}}{{/if}}" + "content": "🔒 **Issue 已锁定**,操作者:{{sender_link_md | default(sender.login)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.active_lock_reason}}**原因:** {{issue.active_lock_reason}}{{/if}}" } }, { @@ -930,7 +930,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b Issue" + "content": "查看 Issue" }, "url": "{{issue.html_url}}", "type": "default" @@ -954,7 +954,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd13 Issue \u5df2\u89e3\u9501\uff1a{{issue.title}}" + "content": "🔓 Issue 已解锁:{{issue.title}}" }, "template": "green" }, @@ -963,7 +963,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udd13 **Issue \u5df2\u89e3\u9501**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}" + "content": "🔓 **Issue 已解锁**,操作者:{{sender_link_md | default(sender.login)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" } }, { @@ -973,7 +973,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b Issue" + "content": "查看 Issue" }, "url": "{{issue.html_url}}", "type": "primary" @@ -997,7 +997,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83c\udff7\ufe0f \u6807\u7b7e\u5df2\u6dfb\u52a0\uff1a{{labeled_label_name}} - {{issue.title}}" + "content": "🏷️ 标签已添加:{{labeled_label_name}} - {{issue.title}}" }, "template": "teal" }, @@ -1006,7 +1006,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u6807\u7b7e\uff1a** {{labeled_label_link_md | default(labeled_label_name)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n**\u64cd\u4f5c\u8005\uff1a** {{sender_link_md | default(sender.login)}}\n" + "content": "**标签:** {{labeled_label_link_md | default(labeled_label_name)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**操作者:** {{sender_link_md | default(sender.login)}}\n" } }, { @@ -1016,7 +1016,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b Issue" + "content": "查看 Issue" }, "url": "{{issue.html_url}}", "type": "primary" @@ -1040,7 +1040,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83c\udff7\ufe0f \u6807\u7b7e\u5df2\u79fb\u9664\uff1a{{labeled_label_name}} - {{issue.title}}" + "content": "🏷️ 标签已移除:{{labeled_label_name}} - {{issue.title}}" }, "template": "grey" }, @@ -1049,7 +1049,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u6807\u7b7e\uff1a** {{labeled_label_link_md | default(labeled_label_name)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n**\u64cd\u4f5c\u8005\uff1a** {{sender_link_md | default(sender.login)}}\n" + "content": "**标签:** {{labeled_label_link_md | default(labeled_label_name)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**操作者:** {{sender_link_md | default(sender.login)}}\n" } }, { @@ -1059,7 +1059,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b Issue" + "content": "查看 Issue" }, "url": "{{issue.html_url}}", "type": "default" @@ -1083,7 +1083,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u270f\ufe0f Issue \u5df2\u8bbe\u7f6e\u7c7b\u578b\uff1a{{issue.title}}" + "content": "✏️ Issue 已设置类型:{{issue.title}}" }, "template": "yellow" }, @@ -1092,7 +1092,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\u270f\ufe0f **Issue \u5df2\u8bbe\u7f6e\u7c7b\u578b**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_type}}**\u7c7b\u578b\uff1a** {{issue_type}}{{/if}}" + "content": "✏️ **Issue 已设置类型**,操作者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_type}}**类型:** {{issue_type}}{{/if}}" } }, { @@ -1102,7 +1102,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b Issue" + "content": "查看 Issue" }, "url": "{{issue.html_url}}", "type": "primary" @@ -1126,7 +1126,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u270f\ufe0f Issue \u7c7b\u578b\u5df2\u79fb\u9664\uff1a{{issue.title}}" + "content": "✏️ Issue 类型已移除:{{issue.title}}" }, "template": "grey" }, @@ -1135,7 +1135,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\u270f\ufe0f **Issue \u7c7b\u578b\u5df2\u79fb\u9664**\uff0c\u64cd\u4f5c\u8005\uff1a{{sender_link_md | default(sender.login)}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}" + "content": "✏️ **Issue 类型已移除**,操作者:{{sender_link_md | default(sender.login)}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" } }, { @@ -1145,7 +1145,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b Issue" + "content": "查看 Issue" }, "url": "{{issue.html_url}}", "type": "default" @@ -1169,7 +1169,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udc1e Bug\uff1a{{issue.title}}" + "content": "🐞 Bug:{{issue.title}}" }, "template": "red" }, @@ -1178,7 +1178,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udc1b **\u53d1\u73b0 Bug**\uff0c\u62a5\u544a\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n" + "content": "🐛 **发现 Bug**,报告者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n" } }, { @@ -1188,7 +1188,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b Issue" + "content": "查看 Issue" }, "url": "{{issue.html_url}}", "type": "primary" @@ -1212,7 +1212,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2728 Feature\uff1a{{issue.title}}" + "content": "✨ Feature:{{issue.title}}" }, "template": "blue" }, @@ -1221,7 +1221,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\u2728 **\u529f\u80fd\u9700\u6c42**\uff0c\u63d0\u51fa\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n" + "content": "✨ **功能需求**,提出者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n" } }, { @@ -1231,7 +1231,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b Issue" + "content": "查看 Issue" }, "url": "{{issue.html_url}}", "type": "primary" @@ -1255,7 +1255,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcdd \u4efb\u52a1\uff1a{{issue.title}}" + "content": "📝 任务:{{issue.title}}" }, "template": "yellow" }, @@ -1264,7 +1264,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udcdd **\u4efb\u52a1**\uff0c\u521b\u5efa\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n" + "content": "📝 **任务**,创建者:{{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n" } }, { @@ -1274,7 +1274,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b Issue" + "content": "查看 Issue" }, "url": "{{issue.html_url}}", "type": "primary" @@ -1298,7 +1298,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u26a0\ufe0f Issue\uff1a{{issue.title}}" + "content": "⚠️ Issue:{{issue.title}}" }, "template": "yellow" }, @@ -1307,7 +1307,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\u26a0\ufe0f **Issue**\uff0c\u521b\u5efa\u8005\uff1a{{sender_link_md | default(sender.login)}} {{issue_type_display | default(issue_user_link_md | default(''))}}\n**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n" + "content": "⚠️ **Issue**,创建者:{{sender_link_md | default(sender.login)}} {{issue_type_display | default(issue_user_link_md | default(''))}}\n**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n" } }, { @@ -1317,7 +1317,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b Issue" + "content": "查看 Issue" }, "url": "{{issue.html_url}}", "type": "primary" @@ -1341,7 +1341,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcdd Issue\uff1a{{issue.title}}" + "content": "📝 Issue:{{issue.title}}" }, "template": "gray" }, @@ -1350,7 +1350,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**Issue\uff1a** {{issue_link_md | default(issue.html_url | default(''))}}\n**\u4f5c\u8005\uff1a** {{sender_link_md | default(sender.login)}}\n**\u72b6\u6001\uff1a** {{issue.state | default('unknown')}}\n" + "content": "**仓库:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**作者:** {{sender_link_md | default(sender.login)}}\n**状态:** {{issue.state | default('unknown')}}\n" } }, { @@ -1360,7 +1360,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b Issue" + "content": "查看 Issue" }, "url": "{{issue.html_url}}", "type": "primary" diff --git a/example-configs/templates/cn/label.json b/example-configs/templates/cn/label.json index 42d21b0..1edc541 100644 --- a/example-configs/templates/cn/label.json +++ b/example-configs/templates/cn/label.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83c\udff7\ufe0f \u6807\u7b7e{{action}}" + "content": "🏷️ 标签{{action}}" }, "template": "blue" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u6807\u7b7e\uff1a** {{label_name}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + "content": "**仓库:** {{repository_link_md}}\n**标签:** {{label_name}}\n**操作:** {{action}}\n" } } ] @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u6807\u7b7e \u5df2\u521b\u5efa" + "content": "🔔 标签 已创建" }, "template": "green" }, @@ -51,7 +51,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -64,7 +64,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u6807\u7b7e \u5df2\u5220\u9664" + "content": "🔔 标签 已删除" }, "template": "red" }, @@ -97,7 +97,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -110,7 +110,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u6807\u7b7e \u5df2\u7f16\u8f91" + "content": "🔔 标签 已编辑" }, "template": "blue" }, @@ -143,7 +143,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -156,7 +156,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/marketplace_purchase.json b/example-configs/templates/cn/marketplace_purchase.json index 6c6d5ec..d662b06 100644 --- a/example-configs/templates/cn/marketplace_purchase.json +++ b/example-configs/templates/cn/marketplace_purchase.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5e02\u573a\u8d2d\u4e70 \u5df2\u53d6\u6d88" + "content": "🔔 市场购买 已取消" }, "template": "orange" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -35,7 +35,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5e02\u573a\u8d2d\u4e70 \u5df2\u53d8\u66f4" + "content": "🔔 市场购买 已变更" }, "template": "turquoise" }, @@ -68,7 +68,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -81,7 +81,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -105,7 +105,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5e02\u573a\u8d2d\u4e70 \u5f85\u53d8\u66f4" + "content": "🔔 市场购买 待变更" }, "template": "yellow" }, @@ -114,7 +114,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -127,7 +127,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -151,7 +151,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5e02\u573a\u8d2d\u4e70 \u5f85\u53d8\u66f4\u9879\u76ee\u5df2\u53d6\u6d88" + "content": "🔔 市场购买 待变更项目已取消" }, "template": "yellow" }, @@ -160,7 +160,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -173,7 +173,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -197,7 +197,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5e02\u573a\u8d2d\u4e70 \u5df2\u8d2d\u4e70" + "content": "🔔 市场购买 已购买" }, "template": "turquoise" }, @@ -206,7 +206,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -219,7 +219,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/member.json b/example-configs/templates/cn/member.json index eefb465..3e50ad1 100644 --- a/example-configs/templates/cn/member.json +++ b/example-configs/templates/cn/member.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udc64 \u6210\u5458\u4e8b\u4ef6\uff1a{{action}} {{member.login}}" + "content": "👤 成员事件:{{action}} {{member.login}}" }, "template": "blue" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u6210\u5458\uff1a** {{member.login}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + "content": "**成员:** {{member.login}}\n**操作:** {{action}}\n" } } ] @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u6210\u5458 \u5df2\u6dfb\u52a0" + "content": "🔔 成员 已添加" }, "template": "turquoise" }, @@ -51,7 +51,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -64,7 +64,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u6210\u5458 \u5df2\u7f16\u8f91" + "content": "🔔 成员 已编辑" }, "template": "blue" }, @@ -97,7 +97,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -110,7 +110,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u6210\u5458 \u5df2\u79fb\u9664" + "content": "🔔 成员 已移除" }, "template": "red" }, @@ -143,7 +143,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -156,7 +156,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/membership.json b/example-configs/templates/cn/membership.json index 6c972e3..78c4239 100644 --- a/example-configs/templates/cn/membership.json +++ b/example-configs/templates/cn/membership.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2795 \u6210\u5458\u52a0\u5165/\u79fb\u9664\uff1a{{action}}" + "content": "➕ 成员加入/移除:{{action}}" }, "template": "blue" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u6210\u5458\uff1a** {{member.user.login}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + "content": "**成员:** {{member.user.login}}\n**操作:** {{action}}\n" } } ] @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u6210\u5458\u8d44\u683c \u5df2\u6dfb\u52a0" + "content": "🔔 成员资格 已添加" }, "template": "turquoise" }, @@ -51,7 +51,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -64,7 +64,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u6210\u5458\u8d44\u683c \u5df2\u79fb\u9664" + "content": "🔔 成员资格 已移除" }, "template": "red" }, @@ -97,7 +97,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -110,7 +110,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/merge_group.json b/example-configs/templates/cn/merge_group.json index c3ff1e5..f3afef6 100644 --- a/example-configs/templates/cn/merge_group.json +++ b/example-configs/templates/cn/merge_group.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd00 \u5408\u5e76\u961f\u5217{{action}}" + "content": "🔀 合并队列{{action}}" }, "template": "purple" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u5934\u90e8SHA\uff1a** {{merge_group_head_sha}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + "content": "**头部SHA:** {{merge_group_head_sha}}\n**操作:** {{action}}\n" } } ] @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5408\u5e76\u7ec4 \u5df2\u8bf7\u6c42\u68c0\u67e5" + "content": "🔔 合并组 已请求检查" }, "template": "turquoise" }, @@ -51,7 +51,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -64,7 +64,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5408\u5e76\u7ec4 \u5df2\u9500\u6bc1" + "content": "🔔 合并组 已销毁" }, "template": "turquoise" }, @@ -97,7 +97,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -110,7 +110,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/meta.json b/example-configs/templates/cn/meta.json index 465ce59..89c3901 100644 --- a/example-configs/templates/cn/meta.json +++ b/example-configs/templates/cn/meta.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5143\u6570\u636e \u5df2\u5220\u9664" + "content": "🔔 元数据 已删除" }, "template": "red" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -35,7 +35,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/milestone.json b/example-configs/templates/cn/milestone.json index aff914b..b6de4ff 100644 --- a/example-configs/templates/cn/milestone.json +++ b/example-configs/templates/cn/milestone.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83c\udfc1 \u91cc\u7a0b\u7891\uff1a{{action}} {{milestone.title}}" + "content": "🏁 里程碑:{{action}} {{milestone.title}}" }, "template": "blue" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u91cc\u7a0b\u7891\uff1a** {{milestone.title}}\n**\u63cf\u8ff0\uff1a** {{milestone.description}}\n" + "content": "**里程碑:** {{milestone.title}}\n**描述:** {{milestone.description}}\n" } } ] @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u91cc\u7a0b\u7891 \u5df2\u5173\u95ed" + "content": "🔔 里程碑 已关闭" }, "template": "red" }, @@ -51,7 +51,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -64,7 +64,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u91cc\u7a0b\u7891 \u5df2\u521b\u5efa" + "content": "🔔 里程碑 已创建" }, "template": "green" }, @@ -97,7 +97,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -110,7 +110,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u91cc\u7a0b\u7891 \u5df2\u5220\u9664" + "content": "🔔 里程碑 已删除" }, "template": "red" }, @@ -143,7 +143,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -156,7 +156,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -180,7 +180,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u91cc\u7a0b\u7891 \u5df2\u7f16\u8f91" + "content": "🔔 里程碑 已编辑" }, "template": "blue" }, @@ -189,7 +189,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -202,7 +202,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -226,7 +226,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u91cc\u7a0b\u7891 \u5df2\u6253\u5f00" + "content": "🔔 里程碑 已打开" }, "template": "green" }, @@ -235,7 +235,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -248,7 +248,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/org_block.json b/example-configs/templates/cn/org_block.json index 4b4e233..27f45d7 100644 --- a/example-configs/templates/cn/org_block.json +++ b/example-configs/templates/cn/org_block.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u7ec4\u7ec7\u5c01\u7981 \u5df2\u5c01\u7981" + "content": "🔔 组织封禁 已封禁" }, "template": "turquoise" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -35,7 +35,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u7ec4\u7ec7\u5c01\u7981 \u5df2\u89e3\u9664\u5c01\u7981" + "content": "🔔 组织封禁 已解除封禁" }, "template": "turquoise" }, @@ -68,7 +68,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -81,7 +81,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/organization.json b/example-configs/templates/cn/organization.json index b8f5125..fe04e34 100644 --- a/example-configs/templates/cn/organization.json +++ b/example-configs/templates/cn/organization.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83c\udfe2 \u7ec4\u7ec7\u6210\u5458\u53d8\u66f4\uff1a{{action}}" + "content": "🏢 组织成员变更:{{action}}" }, "template": "blue" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u7ec4\u7ec7\uff1a** {{organization.login}}\n**\u6210\u5458\uff1a** {{membership.user.login | default('N/A')}}\n" + "content": "**组织:** {{organization.login}}\n**成员:** {{membership.user.login | default('N/A')}}\n" } } ] @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u7ec4\u7ec7 \u6210\u5458\u5df2\u6dfb\u52a0" + "content": "🔔 组织 成员已添加" }, "template": "turquoise" }, @@ -51,7 +51,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -64,7 +64,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u7ec4\u7ec7 \u6210\u5458\u5df2\u9080\u8bf7" + "content": "🔔 组织 成员已邀请" }, "template": "turquoise" }, @@ -97,7 +97,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -110,7 +110,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u7ec4\u7ec7 \u6210\u5458\u5df2\u79fb\u9664" + "content": "🔔 组织 成员已移除" }, "template": "turquoise" }, @@ -143,7 +143,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -156,7 +156,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/package.json b/example-configs/templates/cn/package.json index c50da9a..c174cee 100644 --- a/example-configs/templates/cn/package.json +++ b/example-configs/templates/cn/package.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udce6 \u5305\u4e8b\u4ef6\uff1a{{action}} {{package.name | default('package')}}" + "content": "📦 包事件:{{action}} {{package.name | default('package')}}" }, "template": "purple" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u5305\u540d\uff1a** {{package_link_md | default(package.name)}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7c7b\u578b\uff1a** {{package.package_type | default('')}}\n**\u7248\u672c/Tag\uff1a** {{package.version | default('')}} {{package_tag_name | default(package.tag_name | default(''))}}\n**\u53d1\u5e03\u8005\uff1a** {{sender_link_md | default(pusher_link_md | default(''))}}\n" + "content": "**包名:** {{package_link_md | default(package.name)}}\n**操作:** {{action}}\n**类型:** {{package.package_type | default('')}}\n**版本/Tag:** {{package.version | default('')}} {{package_tag_name | default(package.tag_name | default(''))}}\n**发布者:** {{sender_link_md | default(pusher_link_md | default(''))}}\n" } } ] @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 package \u5df2\u53d1\u5e03" + "content": "🔔 package 已发布" }, "template": "green" }, @@ -51,7 +51,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -64,7 +64,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 package \u5df2\u66f4\u65b0" + "content": "🔔 package 已更新" }, "template": "blue" }, @@ -97,7 +97,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -110,7 +110,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/page_build.json b/example-configs/templates/cn/page_build.json index 713b5b7..e5d8f82 100644 --- a/example-configs/templates/cn/page_build.json +++ b/example-configs/templates/cn/page_build.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcc4 \u9875\u9762\u6784\u5efa\uff1a{{action}}" + "content": "📄 页面构建:{{action}}" }, "template": "grey" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository.full_name}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + "content": "**仓库:** {{repository.full_name}}\n**操作:** {{action}}\n" } } ] diff --git a/example-configs/templates/cn/personal_access_token_request.json b/example-configs/templates/cn/personal_access_token_request.json index 96fae50..a7de287 100644 --- a/example-configs/templates/cn/personal_access_token_request.json +++ b/example-configs/templates/cn/personal_access_token_request.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4e2a\u4eba\u8bbf\u95ee\u4ee4\u724c\u8bf7\u6c42 \u5df2\u6279\u51c6" + "content": "🔔 个人访问令牌请求 已批准" }, "template": "green" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -35,7 +35,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4e2a\u4eba\u8bbf\u95ee\u4ee4\u724c\u8bf7\u6c42 \u5df2\u53d6\u6d88" + "content": "🔔 个人访问令牌请求 已取消" }, "template": "orange" }, @@ -68,7 +68,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -81,7 +81,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -105,7 +105,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4e2a\u4eba\u8bbf\u95ee\u4ee4\u724c\u8bf7\u6c42 \u5df2\u521b\u5efa" + "content": "🔔 个人访问令牌请求 已创建" }, "template": "green" }, @@ -114,7 +114,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -127,7 +127,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -151,7 +151,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4e2a\u4eba\u8bbf\u95ee\u4ee4\u724c\u8bf7\u6c42 denied" + "content": "🔔 个人访问令牌请求 denied" }, "template": "turquoise" }, @@ -160,7 +160,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -173,7 +173,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/ping.json b/example-configs/templates/cn/ping.json index c173a63..239f9b0 100644 --- a/example-configs/templates/cn/ping.json +++ b/example-configs/templates/cn/ping.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2705 GitHub Webhook \u6dfb\u52a0\u6210\u529f" + "content": "✅ GitHub Webhook 添加成功" }, "template": "green" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**GitHub \u5bc4\u8bed\uff1a** {{zen}}\n\n{{#if repository}}**\u4ed3\u5e93\uff1a** [{{repository.full_name}}]({{repository.html_url}})\n{{/if}}{{#if organization}}**\u7ec4\u7ec7\uff1a** [{{organization.login}}](https://github.com/{{organization.login}})\n{{/if}}**Hook ID\uff1a** {{hook_id}}\n**Hook \u7c7b\u578b\uff1a** {{hook_type}}" + "content": "**GitHub 寄语:** {{zen}}\n\n{{#if repository}}**仓库:** [{{repository.full_name}}]({{repository.html_url}})\n{{/if}}{{#if organization}}**组织:** [{{organization.login}}](https://github.com/{{organization.login}})\n{{/if}}**Hook ID:** {{hook_id}}\n**Hook 类型:** {{hook_type}}" } } ] diff --git a/example-configs/templates/cn/project.json b/example-configs/templates/cn/project.json index 8dfd2ad..9be14ae 100644 --- a/example-configs/templates/cn/project.json +++ b/example-configs/templates/cn/project.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udccb \u9879\u76ee\uff1a{{action}} {{project.name}}" + "content": "📋 项目:{{action}} {{project.name}}" }, "template": "brown" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u9879\u76ee\uff1a** {{project.name}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + "content": "**项目:** {{project.name}}\n**操作:** {{action}}\n" } } ] @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee \u5df2\u5173\u95ed" + "content": "🔔 项目 已关闭" }, "template": "red" }, @@ -51,7 +51,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -64,7 +64,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee \u5df2\u521b\u5efa" + "content": "🔔 项目 已创建" }, "template": "green" }, @@ -97,7 +97,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -110,7 +110,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee \u5df2\u5220\u9664" + "content": "🔔 项目 已删除" }, "template": "red" }, @@ -143,7 +143,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -156,7 +156,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -180,7 +180,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee \u5df2\u91cd\u65b0\u6253\u5f00" + "content": "🔔 项目 已重新打开" }, "template": "orange" }, @@ -189,7 +189,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -202,7 +202,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -226,7 +226,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee \u5df2\u66f4\u65b0" + "content": "🔔 项目 已更新" }, "template": "blue" }, @@ -235,7 +235,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -248,7 +248,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/project_card.json b/example-configs/templates/cn/project_card.json index 3ed8553..43c106f 100644 --- a/example-configs/templates/cn/project_card.json +++ b/example-configs/templates/cn/project_card.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83c\udccf \u9879\u76ee\u5361\u7247\uff1a{{action}}" + "content": "🃏 项目卡片:{{action}}" }, "template": "brown" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u5361\u7247\uff1a** {{project_card.note | default('\u65e0\u6ce8\u91ca')}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + "content": "**卡片:** {{project_card.note | default('无注释')}}\n**操作:** {{action}}\n" } } ] @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee\u5361\u7247 \u5df2\u8f6c\u6362" + "content": "🔔 项目卡片 已转换" }, "template": "turquoise" }, @@ -51,7 +51,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -64,7 +64,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee\u5361\u7247 \u5df2\u521b\u5efa" + "content": "🔔 项目卡片 已创建" }, "template": "green" }, @@ -97,7 +97,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -110,7 +110,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee\u5361\u7247 \u5df2\u5220\u9664" + "content": "🔔 项目卡片 已删除" }, "template": "red" }, @@ -143,7 +143,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -156,7 +156,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -180,7 +180,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee\u5361\u7247 \u5df2\u7f16\u8f91" + "content": "🔔 项目卡片 已编辑" }, "template": "blue" }, @@ -189,7 +189,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -202,7 +202,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -226,7 +226,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee\u5361\u7247 \u5df2\u79fb\u52a8" + "content": "🔔 项目卡片 已移动" }, "template": "turquoise" }, @@ -235,7 +235,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -248,7 +248,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/project_column.json b/example-configs/templates/cn/project_column.json index 8fbd67f..23039e1 100644 --- a/example-configs/templates/cn/project_column.json +++ b/example-configs/templates/cn/project_column.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcd0 \u9879\u76ee\u5217\uff1a{{action}}" + "content": "📐 项目列:{{action}}" }, "template": "brown" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u5217\u540d\uff1a** {{project_column.name}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + "content": "**列名:** {{project_column.name}}\n**操作:** {{action}}\n" } } ] @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee\u5217 \u5df2\u521b\u5efa" + "content": "🔔 项目列 已创建" }, "template": "green" }, @@ -51,7 +51,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -64,7 +64,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee\u5217 \u5df2\u5220\u9664" + "content": "🔔 项目列 已删除" }, "template": "red" }, @@ -97,7 +97,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -110,7 +110,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee\u5217 \u5df2\u79fb\u52a8" + "content": "🔔 项目列 已移动" }, "template": "turquoise" }, @@ -143,7 +143,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -156,7 +156,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -180,7 +180,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee\u5217 \u5df2\u66f4\u65b0" + "content": "🔔 项目列 已更新" }, "template": "blue" }, @@ -189,7 +189,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -202,7 +202,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/projects_v2.json b/example-configs/templates/cn/projects_v2.json index fbc2aeb..a74ea55 100644 --- a/example-configs/templates/cn/projects_v2.json +++ b/example-configs/templates/cn/projects_v2.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udccb \u9879\u76ee{{action}}" + "content": "📋 项目{{action}}" }, "template": "blue" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u9879\u76ee\uff1a** {{project_title}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u521b\u5efa\u8005\uff1a** {{sender_link_md}}\n" + "content": "**项目:** {{project_title}}\n**操作:** {{action}}\n**创建者:** {{sender_link_md}}\n" } } ] @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee V2 \u5df2\u5173\u95ed" + "content": "🔔 项目 V2 已关闭" }, "template": "red" }, @@ -51,7 +51,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -64,7 +64,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee V2 \u5df2\u521b\u5efa" + "content": "🔔 项目 V2 已创建" }, "template": "green" }, @@ -97,7 +97,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -110,7 +110,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee V2 \u5df2\u5220\u9664" + "content": "🔔 项目 V2 已删除" }, "template": "red" }, @@ -143,7 +143,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -156,7 +156,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -180,7 +180,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee V2 \u5df2\u7f16\u8f91" + "content": "🔔 项目 V2 已编辑" }, "template": "blue" }, @@ -189,7 +189,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -202,7 +202,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -226,7 +226,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee V2 \u5df2\u91cd\u65b0\u6253\u5f00" + "content": "🔔 项目 V2 已重新打开" }, "template": "orange" }, @@ -235,7 +235,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -248,7 +248,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/projects_v2_item.json b/example-configs/templates/cn/projects_v2_item.json index 2689094..05d41b9 100644 --- a/example-configs/templates/cn/projects_v2_item.json +++ b/example-configs/templates/cn/projects_v2_item.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee V2 \u6761\u76ee \u5df2\u5f52\u6863" + "content": "🔔 项目 V2 条目 已归档" }, "template": "turquoise" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -35,7 +35,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee V2 \u6761\u76ee \u5df2\u8f6c\u6362" + "content": "🔔 项目 V2 条目 已转换" }, "template": "turquoise" }, @@ -68,7 +68,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -81,7 +81,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -105,7 +105,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee V2 \u6761\u76ee \u5df2\u521b\u5efa" + "content": "🔔 项目 V2 条目 已创建" }, "template": "green" }, @@ -114,7 +114,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -127,7 +127,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -151,7 +151,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee V2 \u6761\u76ee \u5df2\u5220\u9664" + "content": "🔔 项目 V2 条目 已删除" }, "template": "red" }, @@ -160,7 +160,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -173,7 +173,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -197,7 +197,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee V2 \u6761\u76ee \u5df2\u7f16\u8f91" + "content": "🔔 项目 V2 条目 已编辑" }, "template": "blue" }, @@ -206,7 +206,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -219,7 +219,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -243,7 +243,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee V2 \u6761\u76ee \u5df2\u91cd\u65b0\u6392\u5e8f" + "content": "🔔 项目 V2 条目 已重新排序" }, "template": "turquoise" }, @@ -252,7 +252,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -265,7 +265,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -289,7 +289,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee V2 \u6761\u76ee \u5df2\u6062\u590d" + "content": "🔔 项目 V2 条目 已恢复" }, "template": "turquoise" }, @@ -298,7 +298,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -311,7 +311,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/projects_v2_status_update.json b/example-configs/templates/cn/projects_v2_status_update.json index ede951a..62e8730 100644 --- a/example-configs/templates/cn/projects_v2_status_update.json +++ b/example-configs/templates/cn/projects_v2_status_update.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee V2 \u72b6\u6001\u66f4\u65b0 \u5df2\u521b\u5efa" + "content": "🔔 项目 V2 状态更新 已创建" }, "template": "green" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -35,7 +35,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee V2 \u72b6\u6001\u66f4\u65b0 \u5df2\u5220\u9664" + "content": "🔔 项目 V2 状态更新 已删除" }, "template": "red" }, @@ -68,7 +68,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -81,7 +81,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -105,7 +105,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u9879\u76ee V2 \u72b6\u6001\u66f4\u65b0 \u5df2\u7f16\u8f91" + "content": "🔔 项目 V2 状态更新 已编辑" }, "template": "blue" }, @@ -114,7 +114,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -127,7 +127,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/public.json b/example-configs/templates/cn/public.json index 27c709e..626b970 100644 --- a/example-configs/templates/cn/public.json +++ b/example-configs/templates/cn/public.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83c\udf10 \u4ed3\u5e93\u516c\u5f00\uff1a{{repository.full_name}}" + "content": "🌐 仓库公开:{{repository.full_name}}" }, "template": "green" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\u5df2\u516c\u5f00\uff1a** {{repository.full_name}}\n" + "content": "**仓库已公开:** {{repository.full_name}}\n" } } ] diff --git a/example-configs/templates/cn/pull_request.json b/example-configs/templates/cn/pull_request.json index 92d0105..3e16926 100644 --- a/example-configs/templates/cn/pull_request.json +++ b/example-configs/templates/cn/pull_request.json @@ -14,7 +14,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd2e Pull Request \u5df2\u5408\u5e76" + "content": "🔮 Pull Request 已合并" }, "template": "purple" }, @@ -23,7 +23,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**PR\uff1a** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**\u5408\u5e76\u8005\uff1a** {{sender_link_md}}\n**\u5206\u652f\uff1a** {{pr_head_branch_link_md}} \u2192 {{pr_base_branch_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**合并者:** {{sender_link_md}}\n**分支:** {{pr_head_branch_link_md}} → {{pr_base_branch_link_md}}" } }, { @@ -43,7 +43,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b PR" + "content": "查看 PR" }, "url": "{{pr_url}}", "type": "primary" @@ -68,7 +68,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u274c Pull Request \u5173\u95ed\uff08\u672a\u5408\u5e76\uff09" + "content": "❌ Pull Request 关闭(未合并)" }, "template": "red" }, @@ -77,7 +77,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**PR\uff1a** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**\u5173\u95ed\u8005\uff1a** {{sender_link_md}}\n**\u5206\u652f\uff1a** {{pr_head_branch_link_md}} \u2192 {{pr_base_branch_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**关闭者:** {{sender_link_md}}\n**分支:** {{pr_head_branch_link_md}} → {{pr_base_branch_link_md}}" } }, { @@ -88,7 +88,7 @@ "elements": [ { "tag": "plain_text", - "content": "\u6b64 PR \u672a\u5408\u5e76\u5373\u5173\u95ed" + "content": "此 PR 未合并即关闭" } ] }, @@ -99,7 +99,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b PR" + "content": "查看 PR" }, "url": "{{pr_url}}", "type": "default" @@ -123,7 +123,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd00 \u65b0 Pull Request \u5df2\u521b\u5efa" + "content": "🔀 新 Pull Request 已创建" }, "template": "green" }, @@ -132,7 +132,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**PR\uff1a** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**\u4f5c\u8005\uff1a** {{pr_user_link_md}}\n**\u5206\u652f\uff1a** {{pr_head_branch_link_md}} \u2192 {{pr_base_branch_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**作者:** {{pr_user_link_md}}\n**分支:** {{pr_head_branch_link_md}} → {{pr_base_branch_link_md}}" } }, { @@ -152,7 +152,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u5ba1\u67e5 PR" + "content": "审查 PR" }, "url": "{{pr_url}}", "type": "primary" @@ -176,7 +176,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd04 Pull Request \u5df2\u91cd\u65b0\u6253\u5f00" + "content": "🔄 Pull Request 已重新打开" }, "template": "green" }, @@ -185,7 +185,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**PR\uff1a** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**\u91cd\u65b0\u6253\u5f00\u8005\uff1a** {{sender_link_md}}\n**\u5206\u652f\uff1a** {{pr_head_branch_link_md}} \u2192 {{pr_base_branch_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**重新打开者:** {{sender_link_md}}\n**分支:** {{pr_head_branch_link_md}} → {{pr_base_branch_link_md}}" } }, { @@ -198,7 +198,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b PR" + "content": "查看 PR" }, "url": "{{pr_url}}", "type": "primary" @@ -222,7 +222,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd04 Pull Request \u5df2\u66f4\u65b0" + "content": "🔄 Pull Request 已更新" }, "template": "blue" }, @@ -231,7 +231,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**PR\uff1a** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**\u66f4\u65b0\u8005\uff1a** {{sender_link_md}}\n**\u5206\u652f\uff1a** {{pr_head_branch_link_md}} \u2192 {{pr_base_branch_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**更新者:** {{sender_link_md}}\n**分支:** {{pr_head_branch_link_md}} → {{pr_base_branch_link_md}}" } }, { @@ -242,7 +242,7 @@ "elements": [ { "tag": "plain_text", - "content": "\u65b0\u63d0\u4ea4\u5df2\u63a8\u9001\u5230\u6b64 PR" + "content": "新提交已推送到此 PR" } ] }, @@ -253,7 +253,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u53d8\u66f4" + "content": "查看变更" }, "url": "{{pr_url}}/files", "type": "default" @@ -277,7 +277,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2705 Pull Request \u5df2\u51c6\u5907\u597d\u5ba1\u67e5" + "content": "✅ Pull Request 已准备好审查" }, "template": "green" }, @@ -286,7 +286,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**PR\uff1a** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**\u4f5c\u8005\uff1a** {{pr_user_link_md}}\n**\u5206\u652f\uff1a** {{pr_head_branch_link_md}} \u2192 {{pr_base_branch_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**作者:** {{pr_user_link_md}}\n**分支:** {{pr_head_branch_link_md}} → {{pr_base_branch_link_md}}" } }, { @@ -297,7 +297,7 @@ "elements": [ { "tag": "plain_text", - "content": "\u6b64 PR \u5df2\u51c6\u5907\u597d\u63a5\u53d7\u5ba1\u67e5" + "content": "此 PR 已准备好接受审查" } ] }, @@ -308,7 +308,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u7acb\u5373\u5ba1\u67e5" + "content": "立即审查" }, "url": "{{pr_url}}", "type": "primary" @@ -332,7 +332,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcdd Pull Request \u5df2\u8f6c\u4e3a\u8349\u7a3f" + "content": "📝 Pull Request 已转为草稿" }, "template": "grey" }, @@ -341,7 +341,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**PR\uff1a** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**\u8f6c\u6362\u8005\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**转换者:** {{sender_link_md}}" } }, { @@ -352,7 +352,7 @@ "elements": [ { "tag": "plain_text", - "content": "\u6b64 PR \u73b0\u5728\u5904\u4e8e\u8349\u7a3f\u6a21\u5f0f" + "content": "此 PR 现在处于草稿模式" } ] }, @@ -363,7 +363,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b PR" + "content": "查看 PR" }, "url": "{{pr_url}}", "type": "default" @@ -387,7 +387,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udc41\ufe0f \u8bf7\u6c42\u5ba1\u67e5" + "content": "👁️ 请求审查" }, "template": "orange" }, @@ -396,7 +396,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**PR\uff1a** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**\u8bf7\u6c42\u8005\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**请求者:** {{sender_link_md}}" } }, { @@ -409,7 +409,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u5ba1\u67e5 PR" + "content": "审查 PR" }, "url": "{{pr_url}}", "type": "primary" @@ -433,7 +433,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd00 Pull Request {{action}}" + "content": "🔀 Pull Request {{action}}" }, "template": "blue" }, @@ -442,7 +442,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**PR\uff1a** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -455,7 +455,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b PR" + "content": "查看 PR" }, "url": "{{pr_url}}", "type": "default" @@ -479,7 +479,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 pull_request \u5df2\u5206\u914d" + "content": "🔔 pull_request 已分配" }, "template": "turquoise" }, @@ -488,7 +488,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -501,7 +501,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -525,7 +525,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 pull_request auto_merge_disabled" + "content": "🔔 pull_request auto_merge_disabled" }, "template": "turquoise" }, @@ -534,7 +534,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -547,7 +547,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -571,7 +571,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 pull_request auto_merge_enabled" + "content": "🔔 pull_request auto_merge_enabled" }, "template": "turquoise" }, @@ -580,7 +580,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -593,7 +593,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -617,7 +617,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 pull_request \u5df2\u79fb\u9664\u91cc\u7a0b\u7891" + "content": "🔔 pull_request 已移除里程碑" }, "template": "turquoise" }, @@ -626,7 +626,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -639,7 +639,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -663,7 +663,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 pull_request dequeued" + "content": "🔔 pull_request dequeued" }, "template": "turquoise" }, @@ -672,7 +672,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -685,7 +685,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -709,7 +709,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 pull_request \u5df2\u7f16\u8f91" + "content": "🔔 pull_request 已编辑" }, "template": "blue" }, @@ -718,7 +718,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -731,7 +731,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -755,7 +755,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 pull_request enqueued" + "content": "🔔 pull_request enqueued" }, "template": "turquoise" }, @@ -764,7 +764,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -777,7 +777,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -801,7 +801,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 pull_request \u5df2\u6dfb\u52a0\u6807\u7b7e" + "content": "🔔 pull_request 已添加标签" }, "template": "turquoise" }, @@ -810,7 +810,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -823,7 +823,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -847,7 +847,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 pull_request \u5df2\u9501\u5b9a" + "content": "🔔 pull_request 已锁定" }, "template": "orange" }, @@ -856,7 +856,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -869,7 +869,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -893,7 +893,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 pull_request \u5df2\u6dfb\u52a0\u91cc\u7a0b\u7891" + "content": "🔔 pull_request 已添加里程碑" }, "template": "turquoise" }, @@ -902,7 +902,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -915,7 +915,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -939,7 +939,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 pull_request review_request_removed" + "content": "🔔 pull_request review_request_removed" }, "template": "turquoise" }, @@ -948,7 +948,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -961,7 +961,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -985,7 +985,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 pull_request \u5df2\u53d6\u6d88\u5206\u914d" + "content": "🔔 pull_request 已取消分配" }, "template": "turquoise" }, @@ -994,7 +994,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -1007,7 +1007,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -1031,7 +1031,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 pull_request \u5df2\u79fb\u9664\u6807\u7b7e" + "content": "🔔 pull_request 已移除标签" }, "template": "turquoise" }, @@ -1040,7 +1040,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -1053,7 +1053,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -1077,7 +1077,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 pull_request \u5df2\u89e3\u9501" + "content": "🔔 pull_request 已解锁" }, "template": "green" }, @@ -1086,7 +1086,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -1099,7 +1099,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/pull_request_review.json b/example-configs/templates/cn/pull_request_review.json index 53286a8..9bcd464 100644 --- a/example-configs/templates/cn/pull_request_review.json +++ b/example-configs/templates/cn/pull_request_review.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcdd PR \u5ba1\u67e5 {{action}}\uff1a#{{pull_request.number}}" + "content": "📝 PR 审查 {{action}}:#{{pull_request.number}}" }, "template": "cyan" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u5ba1\u67e5\u8005\uff1a** {{review_user_link_md | default(review.user.login)}}\n**PR\uff1a** #{{pull_request.number}} {{pull_request.title}}\n**\u7ed3\u679c\uff1a** {{review.state}}\n{{review.body}}\n" + "content": "**审查者:** {{review_user_link_md | default(review.user.login)}}\n**PR:** #{{pull_request.number}} {{pull_request.title}}\n**结果:** {{review.state}}\n{{review.body}}\n" } }, { @@ -32,7 +32,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u5ba1\u67e5" + "content": "查看审查" }, "url": "{{review.html_url}}", "type": "primary" @@ -56,7 +56,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 pull_request_review \u5df2\u9a73\u56de" + "content": "🔔 pull_request_review 已驳回" }, "template": "orange" }, @@ -65,7 +65,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -78,7 +78,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -102,7 +102,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 pull_request_review \u5df2\u7f16\u8f91" + "content": "🔔 pull_request_review 已编辑" }, "template": "blue" }, @@ -111,7 +111,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -124,7 +124,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -148,7 +148,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 pull_request_review \u5df2\u63d0\u4ea4" + "content": "🔔 pull_request_review 已提交" }, "template": "turquoise" }, @@ -157,7 +157,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -170,7 +170,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/pull_request_review_comment.json b/example-configs/templates/cn/pull_request_review_comment.json index e18521b..3be5598 100644 --- a/example-configs/templates/cn/pull_request_review_comment.json +++ b/example-configs/templates/cn/pull_request_review_comment.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcac PR \u5ba1\u67e5\u8bc4\u8bba\uff1a#{{pull_request.number}}" + "content": "💬 PR 审查评论:#{{pull_request.number}}" }, "template": "cyan" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4f5c\u8005\uff1a** {{sender_link_md | default(sender.login)}}\n**PR\uff1a** #{{pull_request.number}}\n**\u8bc4\u8bba\uff1a** {{comment.body}}\n" + "content": "**作者:** {{sender_link_md | default(sender.login)}}\n**PR:** #{{pull_request.number}}\n**评论:** {{comment.body}}\n" } }, { @@ -32,7 +32,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8bc4\u8bba" + "content": "查看评论" }, "url": "{{comment.html_url}}", "type": "primary" @@ -56,7 +56,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 pull_request_review_comment \u5df2\u521b\u5efa" + "content": "🔔 pull_request_review_comment 已创建" }, "template": "green" }, @@ -65,7 +65,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -78,7 +78,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -102,7 +102,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 pull_request_review_comment \u5df2\u5220\u9664" + "content": "🔔 pull_request_review_comment 已删除" }, "template": "red" }, @@ -111,7 +111,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -124,7 +124,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -148,7 +148,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 pull_request_review_comment \u5df2\u7f16\u8f91" + "content": "🔔 pull_request_review_comment 已编辑" }, "template": "blue" }, @@ -157,7 +157,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -170,7 +170,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/pull_request_review_thread.json b/example-configs/templates/cn/pull_request_review_thread.json index b8e9d56..b5f1a37 100644 --- a/example-configs/templates/cn/pull_request_review_thread.json +++ b/example-configs/templates/cn/pull_request_review_thread.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcac PR\u5ba1\u6838\u8ba8\u8bba{{action}}" + "content": "💬 PR审核讨论{{action}}" }, "template": "blue" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**PR\uff1a** #{{pull_request.number}} {{pull_request.title}}\n**\u8ba8\u8bba\uff1a** {{thread_comments | length}} \u6761\u8bc4\u8bba\n**\u64cd\u4f5c\uff1a** {{action}}\n" + "content": "**PR:** #{{pull_request.number}} {{pull_request.title}}\n**讨论:** {{thread_comments | length}} 条评论\n**操作:** {{action}}\n" } } ] @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 pull_request_review_thread \u5df2\u89e3\u51b3" + "content": "🔔 pull_request_review_thread 已解决" }, "template": "green" }, @@ -51,7 +51,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -64,7 +64,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 pull_request_review_thread unresolved" + "content": "🔔 pull_request_review_thread unresolved" }, "template": "turquoise" }, @@ -97,7 +97,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -110,7 +110,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/push.json b/example-configs/templates/cn/push.json index bfc9bcb..ae21c84 100644 --- a/example-configs/templates/cn/push.json +++ b/example-configs/templates/cn/push.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcbe \u65b0\u63a8\u9001\uff1a{{repository.full_name}}" + "content": "💾 新推送:{{repository.full_name}}" }, "template": "blue" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "{{pusher_link_md | default(pusher.name)}} \u63a8\u9001\u4e86 {{commits | length}} \u4e2a\u63d0\u4ea4\u5230\u5206\u652f **{{branch_name}}** {{branch_link_md | default('')}}\n{{repository_link_md | default('')}} {{branch_link_md | default('')}}\n\n**\u63d0\u4ea4\u4fe1\u606f\uff1a**\n{{commit_messages_joined | default(commit_message | default(pull_request.body | default('\u65e0\u63d0\u4ea4\u4fe1\u606f'))) }}\n" + "content": "{{pusher_link_md | default(pusher.name)}} 推送了 {{commits | length}} 个提交到分支 **{{branch_name}}** {{branch_link_md | default('')}}\n{{repository_link_md | default('')}} {{branch_link_md | default('')}}\n\n**提交信息:**\n{{commit_messages_joined | default(commit_message | default(pull_request.body | default('无提交信息'))) }}\n" } }, { @@ -32,7 +32,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u63d0\u4ea4\u8be6\u60c5" + "content": "查看提交详情" }, "url": "{{compare_url}}", "type": "primary" @@ -56,7 +56,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udea8 \u5f3a\u5236\u63a8\u9001\uff1a{{repository.full_name}}" + "content": "🚨 强制推送:{{repository.full_name}}" }, "template": "red" }, @@ -65,7 +65,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u68c0\u6d4b\u5230\u5f3a\u5236\u63a8\u9001**\uff0c\u64cd\u4f5c\u4eba\uff1a{{sender_link_md | default(sender.login)}}\uff0c\u5206\u652f\uff1a**{{branch_name}}** {{branch_link_md | default('')}}\n\u53ef\u80fd\u5df2\u91cd\u5199\u5386\u53f2\u3002\u63d0\u4ea4\u6570\uff1a{{commits | length}}\n{{repository_link_md | default('')}} {{branch_link_md | default('')}}\n\n**\u63d0\u4ea4\u4fe1\u606f\uff1a**\n{{commit_messages_joined | default(commit_message | default('\u65e0\u63d0\u4ea4\u4fe1\u606f')) }}\n" + "content": "**检测到强制推送**,操作人:{{sender_link_md | default(sender.login)}},分支:**{{branch_name}}** {{branch_link_md | default('')}}\n可能已重写历史。提交数:{{commits | length}}\n{{repository_link_md | default('')}} {{branch_link_md | default('')}}\n\n**提交信息:**\n{{commit_messages_joined | default(commit_message | default('无提交信息')) }}\n" } }, { @@ -75,7 +75,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u63d0\u4ea4\u8be6\u60c5" + "content": "查看提交详情" }, "url": "{{compare_url}}", "type": "primary" diff --git a/example-configs/templates/cn/registry_package.json b/example-configs/templates/cn/registry_package.json index 36d3ebb..47f003b 100644 --- a/example-configs/templates/cn/registry_package.json +++ b/example-configs/templates/cn/registry_package.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ufffd \u6ce8\u518c\u8868\u5305\u5df2\u53d1\u5e03" + "content": "� 注册表包已发布" }, "template": "green" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u5305\u540d\uff1a** {{package_name}}\n**\u7c7b\u578b\uff1a** {{package_type | upper}}\n**\u7248\u672c\uff1a** {{package_version}}\n**\u53d1\u5e03\u8005\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**包名:** {{package_name}}\n**类型:** {{package_type | upper}}\n**版本:** {{package_version}}\n**发布者:** {{sender_link_md}}" } }, { @@ -35,7 +35,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u5305" + "content": "查看包" }, "url": "{{repository.html_url}}", "type": "primary" @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4ed3\u5e93\u5305 \u5df2\u66f4\u65b0" + "content": "🔔 仓库包 已更新" }, "template": "blue" }, @@ -68,7 +68,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u5305\u540d\uff1a** {{package_name}}\n**\u7c7b\u578b\uff1a** {{package_type | upper}}\n**\u7248\u672c\uff1a** {{package_version}}\n**\u66f4\u65b0\u8005\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**包名:** {{package_name}}\n**类型:** {{package_type | upper}}\n**版本:** {{package_version}}\n**更新者:** {{sender_link_md}}" } }, { @@ -81,7 +81,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/release.json b/example-configs/templates/cn/release.json index 9864dea..a88b29f 100644 --- a/example-configs/templates/cn/release.json +++ b/example-configs/templates/cn/release.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\ude80 \u7248\u672c\u5df2\u53d1\u5e03" + "content": "🚀 版本已发布" }, "template": "green" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u7248\u672c\uff1a** {{release.tag_name}}\n**\u53d1\u5e03\u540d\u79f0\uff1a** {{release.name}}\n**\u53d1\u5e03\u8005\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**版本:** {{release.tag_name}}\n**发布名称:** {{release.name}}\n**发布者:** {{sender_link_md}}" } }, { @@ -45,7 +45,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u53d1\u5e03" + "content": "查看发布" }, "url": "{{release.html_url}}", "type": "primary" @@ -69,7 +69,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd36 \u9884\u53d1\u5e03\u7248\u672c\u5df2\u53d1\u5e03" + "content": "🔶 预发布版本已发布" }, "template": "orange" }, @@ -78,7 +78,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u7248\u672c\uff1a** {{release.tag_name}}\n**\u53d1\u5e03\u540d\u79f0\uff1a** {{release.name}}\n**\u53d1\u5e03\u8005\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**版本:** {{release.tag_name}}\n**发布名称:** {{release.name}}\n**发布者:** {{sender_link_md}}" } }, { @@ -89,7 +89,7 @@ "elements": [ { "tag": "plain_text", - "content": "\u26a0\ufe0f \u8fd9\u662f\u4e00\u4e2a\u9884\u53d1\u5e03\u7248\u672c" + "content": "⚠️ 这是一个预发布版本" } ] }, @@ -110,7 +110,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u9884\u53d1\u5e03" + "content": "查看预发布" }, "url": "{{release.html_url}}", "type": "default" @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcdd \u8349\u7a3f\u53d1\u5e03\u5df2\u521b\u5efa" + "content": "📝 草稿发布已创建" }, "template": "grey" }, @@ -143,7 +143,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u7248\u672c\uff1a** {{release.tag_name}}\n**\u53d1\u5e03\u540d\u79f0\uff1a** {{release.name}}\n**\u521b\u5efa\u8005\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**版本:** {{release.tag_name}}\n**发布名称:** {{release.name}}\n**创建者:** {{sender_link_md}}" } }, { @@ -154,7 +154,7 @@ "elements": [ { "tag": "plain_text", - "content": "\u8fd9\u662f\u4e00\u4e2a\u8349\u7a3f\u53d1\u5e03\uff08\u5c1a\u672a\u53d1\u5e03\uff09" + "content": "这是一个草稿发布(尚未发布)" } ] }, @@ -165,7 +165,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8349\u7a3f" + "content": "查看草稿" }, "url": "{{release.html_url}}", "type": "default" @@ -189,7 +189,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\uddd1\ufe0f \u53d1\u5e03\u5df2\u5220\u9664" + "content": "🗑️ 发布已删除" }, "template": "red" }, @@ -198,7 +198,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u7248\u672c\uff1a** {{release.tag_name}}\n**\u5220\u9664\u8005\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**版本:** {{release.tag_name}}\n**删除者:** {{sender_link_md}}" } }, { @@ -209,7 +209,7 @@ "elements": [ { "tag": "plain_text", - "content": "\u6b64\u53d1\u5e03\u5df2\u88ab\u5220\u9664" + "content": "此发布已被删除" } ] } @@ -230,7 +230,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\ude80 \u53d1\u5e03 {{action}}" + "content": "🚀 发布 {{action}}" }, "template": "green" }, @@ -239,7 +239,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u7248\u672c\uff1a** {{release.tag_name}}\n**\u53d1\u5e03\u540d\u79f0\uff1a** {{release.name}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**版本:** {{release.tag_name}}\n**发布名称:** {{release.name}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -252,7 +252,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u53d1\u5e03" + "content": "查看发布" }, "url": "{{release.html_url}}", "type": "primary" @@ -276,7 +276,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 release \u5df2\u7f16\u8f91" + "content": "🔔 release 已编辑" }, "template": "blue" }, @@ -285,7 +285,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -298,7 +298,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -322,7 +322,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 release released" + "content": "🔔 release released" }, "template": "turquoise" }, @@ -331,7 +331,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -344,7 +344,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -368,7 +368,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 release unpublished" + "content": "🔔 release unpublished" }, "template": "turquoise" }, @@ -377,7 +377,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -390,7 +390,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/repository.json b/example-configs/templates/cn/repository.json index ab97cad..fb56bb3 100644 --- a/example-configs/templates/cn/repository.json +++ b/example-configs/templates/cn/repository.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83c\udff7\ufe0f \u4ed3\u5e93\u53d8\u66f4\uff1a{{repository.full_name}}" + "content": "🏷️ 仓库变更:{{repository.full_name}}" }, "template": "blue" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u64cd\u4f5c\uff1a** {{action}}\n**\u4ed3\u5e93\uff1a** {{repository.full_name}}\n" + "content": "**操作:** {{action}}\n**仓库:** {{repository.full_name}}\n" } }, { @@ -32,7 +32,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u4ed3\u5e93" + "content": "查看仓库" }, "url": "{{repository.html_url}}", "type": "primary" @@ -56,7 +56,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4ed3\u5e93 \u5df2\u5f52\u6863" + "content": "🔔 仓库 已归档" }, "template": "turquoise" }, @@ -65,7 +65,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -78,7 +78,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -102,7 +102,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4ed3\u5e93 \u5df2\u521b\u5efa" + "content": "🔔 仓库 已创建" }, "template": "green" }, @@ -111,7 +111,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -124,7 +124,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -148,7 +148,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4ed3\u5e93 \u5df2\u5220\u9664" + "content": "🔔 仓库 已删除" }, "template": "red" }, @@ -157,7 +157,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -170,7 +170,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -194,7 +194,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4ed3\u5e93 \u5df2\u7f16\u8f91" + "content": "🔔 仓库 已编辑" }, "template": "blue" }, @@ -203,7 +203,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -216,7 +216,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -240,7 +240,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4ed3\u5e93 \u5df2\u79c1\u6709\u5316" + "content": "🔔 仓库 已私有化" }, "template": "turquoise" }, @@ -249,7 +249,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -262,7 +262,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -286,7 +286,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4ed3\u5e93 \u5df2\u516c\u5f00" + "content": "🔔 仓库 已公开" }, "template": "turquoise" }, @@ -295,7 +295,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -308,7 +308,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -332,7 +332,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4ed3\u5e93 \u5df2\u91cd\u547d\u540d" + "content": "🔔 仓库 已重命名" }, "template": "turquoise" }, @@ -341,7 +341,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -354,7 +354,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -378,7 +378,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4ed3\u5e93 \u5df2\u8f6c\u79fb" + "content": "🔔 仓库 已转移" }, "template": "turquoise" }, @@ -387,7 +387,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -400,7 +400,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -424,7 +424,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4ed3\u5e93 \u5df2\u53d6\u6d88\u5f52\u6863" + "content": "🔔 仓库 已取消归档" }, "template": "turquoise" }, @@ -433,7 +433,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -446,7 +446,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/repository_advisory.json b/example-configs/templates/cn/repository_advisory.json index 77869bb..f3c5134 100644 --- a/example-configs/templates/cn/repository_advisory.json +++ b/example-configs/templates/cn/repository_advisory.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4ed3\u5e93\u516c\u544a \u5df2\u53d1\u5e03" + "content": "🔔 仓库公告 已发布" }, "template": "green" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -35,7 +35,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4ed3\u5e93\u516c\u544a \u5df2\u62a5\u544a" + "content": "🔔 仓库公告 已报告" }, "template": "turquoise" }, @@ -68,7 +68,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -81,7 +81,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/repository_dispatch.json b/example-configs/templates/cn/repository_dispatch.json index f926bbc..6c42fba 100644 --- a/example-configs/templates/cn/repository_dispatch.json +++ b/example-configs/templates/cn/repository_dispatch.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4ed3\u5e93\u8c03\u5ea6" + "content": "🔔 仓库调度" }, "template": "turquoise" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -35,7 +35,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/repository_import.json b/example-configs/templates/cn/repository_import.json index 51ffa5f..771a7d2 100644 --- a/example-configs/templates/cn/repository_import.json +++ b/example-configs/templates/cn/repository_import.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4ed3\u5e93\u5bfc\u5165" + "content": "🔔 仓库导入" }, "template": "turquoise" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -35,7 +35,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/repository_ruleset.json b/example-configs/templates/cn/repository_ruleset.json index 77af7f6..91c74dd 100644 --- a/example-configs/templates/cn/repository_ruleset.json +++ b/example-configs/templates/cn/repository_ruleset.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4ed3\u5e93\u89c4\u5219\u96c6 \u5df2\u521b\u5efa" + "content": "🔔 仓库规则集 已创建" }, "template": "green" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -35,7 +35,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4ed3\u5e93\u89c4\u5219\u96c6 \u5df2\u5220\u9664" + "content": "🔔 仓库规则集 已删除" }, "template": "red" }, @@ -68,7 +68,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -81,7 +81,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -105,7 +105,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4ed3\u5e93\u89c4\u5219\u96c6 \u5df2\u7f16\u8f91" + "content": "🔔 仓库规则集 已编辑" }, "template": "blue" }, @@ -114,7 +114,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -127,7 +127,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/repository_vulnerability_alert.json b/example-configs/templates/cn/repository_vulnerability_alert.json index e091f8e..7a7c3da 100644 --- a/example-configs/templates/cn/repository_vulnerability_alert.json +++ b/example-configs/templates/cn/repository_vulnerability_alert.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4ed3\u5e93\u6f0f\u6d1e\u8b66\u62a5 \u521b\u5efa" + "content": "🔔 仓库漏洞警报 创建" }, "template": "turquoise" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -35,7 +35,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4ed3\u5e93\u6f0f\u6d1e\u8b66\u62a5 \u9a73\u56de" + "content": "🔔 仓库漏洞警报 驳回" }, "template": "turquoise" }, @@ -68,7 +68,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -81,7 +81,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -105,7 +105,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4ed3\u5e93\u6f0f\u6d1e\u8b66\u62a5 \u91cd\u65b0\u6253\u5f00" + "content": "🔔 仓库漏洞警报 重新打开" }, "template": "turquoise" }, @@ -114,7 +114,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -127,7 +127,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -151,7 +151,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u4ed3\u5e93\u6f0f\u6d1e\u8b66\u62a5 \u89e3\u51b3" + "content": "🔔 仓库漏洞警报 解决" }, "template": "turquoise" }, @@ -160,7 +160,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -173,7 +173,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/secret_scanning_alert.json b/example-configs/templates/cn/secret_scanning_alert.json index e0ed33b..b1d82ae 100644 --- a/example-configs/templates/cn/secret_scanning_alert.json +++ b/example-configs/templates/cn/secret_scanning_alert.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd10 \u5bc6\u94a5\u626b\u63cf\u8b66\u544a{{action}}" + "content": "🔐 密钥扫描警告{{action}}" }, "template": "red" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u5bc6\u94a5\u7c7b\u578b\uff1a** {{alert_secret_type}}\n**\u72b6\u6001\uff1a** {{alert_state}}\n" + "content": "**仓库:** {{repository_link_md}}\n**密钥类型:** {{alert_secret_type}}\n**状态:** {{alert_state}}\n" } } ] @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5bc6\u94a5\u626b\u63cf\u8b66\u62a5 \u5df2\u521b\u5efa" + "content": "🔔 密钥扫描警报 已创建" }, "template": "green" }, @@ -51,7 +51,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -64,7 +64,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5bc6\u94a5\u626b\u63cf\u8b66\u62a5 \u516c\u5f00\u6cc4\u9732" + "content": "🔔 密钥扫描警报 公开泄露" }, "template": "turquoise" }, @@ -97,7 +97,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -110,7 +110,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5bc6\u94a5\u626b\u63cf\u8b66\u62a5 \u5df2\u91cd\u65b0\u6253\u5f00" + "content": "🔔 密钥扫描警报 已重新打开" }, "template": "orange" }, @@ -143,7 +143,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -156,7 +156,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -180,7 +180,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5bc6\u94a5\u626b\u63cf\u8b66\u62a5 \u5df2\u89e3\u51b3" + "content": "🔔 密钥扫描警报 已解决" }, "template": "green" }, @@ -189,7 +189,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -202,7 +202,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -226,7 +226,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5bc6\u94a5\u626b\u63cf\u8b66\u62a5 \u5df2\u9a8c\u8bc1" + "content": "🔔 密钥扫描警报 已验证" }, "template": "turquoise" }, @@ -235,7 +235,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -248,7 +248,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/secret_scanning_alert_location.json b/example-configs/templates/cn/secret_scanning_alert_location.json index 686047d..635dd96 100644 --- a/example-configs/templates/cn/secret_scanning_alert_location.json +++ b/example-configs/templates/cn/secret_scanning_alert_location.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5bc6\u94a5\u626b\u63cf\u8b66\u62a5\u4f4d\u7f6e \u5df2\u521b\u5efa" + "content": "🔔 密钥扫描警报位置 已创建" }, "template": "green" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -35,7 +35,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/secret_scanning_scan.json b/example-configs/templates/cn/secret_scanning_scan.json index 726ba03..1c2da3d 100644 --- a/example-configs/templates/cn/secret_scanning_scan.json +++ b/example-configs/templates/cn/secret_scanning_scan.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5bc6\u94a5\u626b\u63cf \u5df2\u5b8c\u6210" + "content": "🔔 密钥扫描 已完成" }, "template": "green" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -35,7 +35,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/security_advisory.json b/example-configs/templates/cn/security_advisory.json index 44ae53b..39e41a8 100644 --- a/example-configs/templates/cn/security_advisory.json +++ b/example-configs/templates/cn/security_advisory.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd12 \u5b89\u5168\u901a\u544a\uff1a{{action}}" + "content": "🔒 安全通告:{{action}}" }, "template": "red" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u901a\u544a\uff1a** {{security_advisory.summary | default('\u8be6\u60c5\u8bf7\u67e5\u770b\u5b89\u5168\u901a\u544a')}}\n**\u4e25\u91cd\u5ea6\uff1a** {{security_advisory.severity | default('N/A')}}\n" + "content": "**通告:** {{security_advisory.summary | default('详情请查看安全通告')}}\n**严重度:** {{security_advisory.severity | default('N/A')}}\n" } } ] @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5b89\u5168\u516c\u544a \u5df2\u53d1\u5e03" + "content": "🔔 安全公告 已发布" }, "template": "green" }, @@ -51,7 +51,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -64,7 +64,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5b89\u5168\u516c\u544a \u5df2\u66f4\u65b0" + "content": "🔔 安全公告 已更新" }, "template": "blue" }, @@ -97,7 +97,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -110,7 +110,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5b89\u5168\u516c\u544a \u5df2\u64a4\u56de" + "content": "🔔 安全公告 已撤回" }, "template": "turquoise" }, @@ -143,7 +143,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -156,7 +156,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/security_and_analysis.json b/example-configs/templates/cn/security_and_analysis.json index 647eca2..1e4d479 100644 --- a/example-configs/templates/cn/security_and_analysis.json +++ b/example-configs/templates/cn/security_and_analysis.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5b89\u5168\u4e0e\u5206\u6790" + "content": "🔔 安全与分析" }, "template": "turquoise" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -35,7 +35,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/sponsorship.json b/example-configs/templates/cn/sponsorship.json index 93f89dd..674835b 100644 --- a/example-configs/templates/cn/sponsorship.json +++ b/example-configs/templates/cn/sponsorship.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udc96 \u65b0\u8d5e\u52a9\u8005\uff01" + "content": "💖 新赞助者!" }, "template": "pink" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u8d5e\u52a9\u8005\uff1a** {{sponsor_login}}\n**\u7b49\u7ea7\uff1a** {{tier_name}}\n**\u91d1\u989d\uff1a** ${{tier_monthly_price_in_dollars}}/\u6708\n" + "content": "**赞助者:** {{sponsor_login}}\n**等级:** {{tier_name}}\n**金额:** ${{tier_monthly_price_in_dollars}}/月\n" } } ] @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udc96 \u8d5e\u52a9{{action}}" + "content": "💖 赞助{{action}}" }, "template": "blue" }, @@ -51,7 +51,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u8d5e\u52a9\u8005\uff1a** {{sponsor_login}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + "content": "**赞助者:** {{sponsor_login}}\n**操作:** {{action}}\n" } } ] @@ -71,7 +71,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u8d5e\u52a9 \u5df2\u53d6\u6d88" + "content": "🔔 赞助 已取消" }, "template": "orange" }, @@ -80,7 +80,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -93,7 +93,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -117,7 +117,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u8d5e\u52a9 \u5df2\u7f16\u8f91" + "content": "🔔 赞助 已编辑" }, "template": "blue" }, @@ -126,7 +126,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -139,7 +139,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -163,7 +163,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u8d5e\u52a9 \u5f85\u53d6\u6d88" + "content": "🔔 赞助 待取消" }, "template": "yellow" }, @@ -172,7 +172,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -185,7 +185,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -209,7 +209,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u8d5e\u52a9 \u5f85\u53d8\u66f4\u7b49\u7ea7" + "content": "🔔 赞助 待变更等级" }, "template": "yellow" }, @@ -218,7 +218,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -231,7 +231,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -255,7 +255,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u8d5e\u52a9 \u7b49\u7ea7\u5df2\u53d8\u66f4" + "content": "🔔 赞助 等级已变更" }, "template": "turquoise" }, @@ -264,7 +264,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -277,7 +277,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/star.json b/example-configs/templates/cn/star.json index 021412c..f155e35 100644 --- a/example-configs/templates/cn/star.json +++ b/example-configs/templates/cn/star.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2b50 {{action}} by {{sender_name | default(sender.login)}}" + "content": "⭐ {{action}} by {{sender_name | default(sender.login)}}" }, "template": "yellow" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository.full_name}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + "content": "**仓库:** {{repository.full_name}}\n**操作:** {{action}}\n" } } ] @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u661f\u6807 \u5df2\u521b\u5efa" + "content": "🔔 星标 已创建" }, "template": "green" }, @@ -51,7 +51,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -64,7 +64,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u661f\u6807 \u5df2\u5220\u9664" + "content": "🔔 星标 已删除" }, "template": "red" }, @@ -97,7 +97,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -110,7 +110,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/status.json b/example-configs/templates/cn/status.json index 595973d..09dcb9c 100644 --- a/example-configs/templates/cn/status.json +++ b/example-configs/templates/cn/status.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd01 \u72b6\u6001\u66f4\u65b0\uff1a{{state}}" + "content": "🔁 状态更新:{{state}}" }, "template": "gray" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository.full_name}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + "content": "**仓库:** {{repository.full_name}}\n**操作:** {{action}}\n" } } ] diff --git a/example-configs/templates/cn/sub_issues.json b/example-configs/templates/cn/sub_issues.json index c71f0f9..a3d893a 100644 --- a/example-configs/templates/cn/sub_issues.json +++ b/example-configs/templates/cn/sub_issues.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5b50 Issue \u7236 Issue \u5df2\u6dfb\u52a0" + "content": "🔔 子 Issue 父 Issue 已添加" }, "template": "turquoise" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -35,7 +35,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5b50 Issue \u7236 Issue \u5df2\u79fb\u9664" + "content": "🔔 子 Issue 父 Issue 已移除" }, "template": "turquoise" }, @@ -68,7 +68,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -81,7 +81,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -105,7 +105,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5b50 Issue \u5b50 Issue \u5df2\u6dfb\u52a0" + "content": "🔔 子 Issue 子 Issue 已添加" }, "template": "turquoise" }, @@ -114,7 +114,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -127,7 +127,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -151,7 +151,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5b50 Issue \u5b50 Issue \u5df2\u79fb\u9664" + "content": "🔔 子 Issue 子 Issue 已移除" }, "template": "turquoise" }, @@ -160,7 +160,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -173,7 +173,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/team.json b/example-configs/templates/cn/team.json index 158ab55..4363402 100644 --- a/example-configs/templates/cn/team.json +++ b/example-configs/templates/cn/team.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udc65 \u56e2\u961f\u4e8b\u4ef6\uff1a{{action}} {{team.name}}" + "content": "👥 团队事件:{{action}} {{team.name}}" }, "template": "blue" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u56e2\u961f\uff1a** {{team.name}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + "content": "**团队:** {{team.name}}\n**操作:** {{action}}\n" } } ] @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u56e2\u961f \u5df2\u6dfb\u52a0\u5230\u4ed3\u5e93" + "content": "🔔 团队 已添加到仓库" }, "template": "turquoise" }, @@ -51,7 +51,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -64,7 +64,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u56e2\u961f \u5df2\u521b\u5efa" + "content": "🔔 团队 已创建" }, "template": "green" }, @@ -97,7 +97,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -110,7 +110,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u56e2\u961f \u5df2\u5220\u9664" + "content": "🔔 团队 已删除" }, "template": "red" }, @@ -143,7 +143,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -156,7 +156,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -180,7 +180,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u56e2\u961f \u5df2\u7f16\u8f91" + "content": "🔔 团队 已编辑" }, "template": "blue" }, @@ -189,7 +189,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -202,7 +202,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -226,7 +226,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u56e2\u961f \u5df2\u4ece\u4ed3\u5e93\u79fb\u9664" + "content": "🔔 团队 已从仓库移除" }, "template": "turquoise" }, @@ -235,7 +235,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -248,7 +248,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/team_add.json b/example-configs/templates/cn/team_add.json index 0313252..65ecd0b 100644 --- a/example-configs/templates/cn/team_add.json +++ b/example-configs/templates/cn/team_add.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u56e2\u961f\u6dfb\u52a0" + "content": "🔔 团队添加" }, "template": "turquoise" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -35,7 +35,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/watch.json b/example-configs/templates/cn/watch.json index 8de7919..5324ebe 100644 --- a/example-configs/templates/cn/watch.json +++ b/example-configs/templates/cn/watch.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u6765\u81ea {{sender_name | default(sender.login)}} \u7684\u5173\u6ce8\uff1a{{action}}" + "content": "🔔 来自 {{sender_name | default(sender.login)}} 的关注:{{action}}" }, "template": "yellow" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository.full_name}}\n**\u64cd\u4f5c\uff1a** {{action}}\n" + "content": "**仓库:** {{repository.full_name}}\n**操作:** {{action}}\n" } } ] @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5173\u6ce8 \u5df2\u5f00\u59cb" + "content": "🔔 关注 已开始" }, "template": "turquoise" }, @@ -51,7 +51,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -64,7 +64,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/workflow_dispatch.json b/example-configs/templates/cn/workflow_dispatch.json index 39f2039..b5310e3 100644 --- a/example-configs/templates/cn/workflow_dispatch.json +++ b/example-configs/templates/cn/workflow_dispatch.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5de5\u4f5c\u6d41\u8c03\u5ea6" + "content": "🔔 工作流调度" }, "template": "turquoise" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -35,7 +35,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/workflow_job.json b/example-configs/templates/cn/workflow_job.json index e6b6fbd..6205243 100644 --- a/example-configs/templates/cn/workflow_job.json +++ b/example-configs/templates/cn/workflow_job.json @@ -14,7 +14,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2705 \u4efb\u52a1\u6210\u529f\uff1a{{job_name}}" + "content": "✅ 任务成功:{{job_name}}" }, "template": "green" }, @@ -23,7 +23,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4efb\u52a1\uff1a** {{job_name}}\n**\u5de5\u4f5c\u6d41\uff1a** {{workflow_name}}\n**\u72b6\u6001\uff1a** {{job_status}}\n**\u7ed3\u679c\uff1a** {{job_conclusion}}\n" + "content": "**任务:** {{job_name}}\n**工作流:** {{workflow_name}}\n**状态:** {{job_status}}\n**结果:** {{job_conclusion}}\n" } }, { @@ -33,7 +33,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u4efb\u52a1" + "content": "查看任务" }, "url": "{{job_html_url}}", "type": "primary" @@ -58,7 +58,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u274c \u4efb\u52a1\u5931\u8d25\uff1a{{job_name}}" + "content": "❌ 任务失败:{{job_name}}" }, "template": "red" }, @@ -67,7 +67,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4efb\u52a1\uff1a** {{job_name}}\n**\u5de5\u4f5c\u6d41\uff1a** {{workflow_name}}\n**\u72b6\u6001\uff1a** {{job_status}}\n**\u7ed3\u679c\uff1a** {{job_conclusion}}\n" + "content": "**任务:** {{job_name}}\n**工作流:** {{workflow_name}}\n**状态:** {{job_status}}\n**结果:** {{job_conclusion}}\n" } }, { @@ -77,7 +77,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u4efb\u52a1" + "content": "查看任务" }, "url": "{{job_html_url}}", "type": "danger" @@ -101,7 +101,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2699\ufe0f \u4efb\u52a1{{action}}\uff1a{{job_name}}" + "content": "⚙️ 任务{{action}}:{{job_name}}" }, "template": "blue" }, @@ -110,7 +110,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4efb\u52a1\uff1a** {{job_name}}\n**\u5de5\u4f5c\u6d41\uff1a** {{workflow_name}}\n**\u72b6\u6001\uff1a** {{job_status}}\n" + "content": "**任务:** {{job_name}}\n**工作流:** {{workflow_name}}\n**状态:** {{job_status}}\n" } } ] @@ -130,7 +130,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5de5\u4f5c\u6d41\u4f5c\u4e1a \u8fdb\u884c\u4e2d" + "content": "🔔 工作流作业 进行中" }, "template": "blue" }, @@ -139,7 +139,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -152,7 +152,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -176,7 +176,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5de5\u4f5c\u6d41\u4f5c\u4e1a \u5df2\u6392\u961f" + "content": "🔔 工作流作业 已排队" }, "template": "turquoise" }, @@ -185,7 +185,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -198,7 +198,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" @@ -222,7 +222,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 \u5de5\u4f5c\u6d41\u4f5c\u4e1a \u7b49\u5f85\u4e2d" + "content": "🔔 工作流作业 等待中" }, "template": "turquoise" }, @@ -231,7 +231,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -244,7 +244,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/cn/workflow_run.json b/example-configs/templates/cn/workflow_run.json index e112762..556b585 100644 --- a/example-configs/templates/cn/workflow_run.json +++ b/example-configs/templates/cn/workflow_run.json @@ -14,7 +14,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2705 \u5de5\u4f5c\u6d41\u6267\u884c\u6210\u529f" + "content": "✅ 工作流执行成功" }, "template": "green" }, @@ -23,7 +23,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u5de5\u4f5c\u6d41\uff1a** {{workflow.name}}\n**\u8fd0\u884c\u7f16\u53f7\uff1a** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**\u5206\u652f\uff1a** {{workflow_run.head_branch}}\n**\u89e6\u53d1\u8005\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**工作流:** {{workflow.name}}\n**运行编号:** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**分支:** {{workflow_run.head_branch}}\n**触发者:** {{sender_link_md}}" } }, { @@ -34,7 +34,7 @@ "elements": [ { "tag": "plain_text", - "content": "\u2705 \u6240\u6709\u68c0\u67e5\u5df2\u901a\u8fc7" + "content": "✅ 所有检查已通过" } ] }, @@ -45,7 +45,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8fd0\u884c" + "content": "查看运行" }, "url": "{{workflow_run.html_url}}", "type": "primary" @@ -70,7 +70,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u274c \u5de5\u4f5c\u6d41\u6267\u884c\u5931\u8d25" + "content": "❌ 工作流执行失败" }, "template": "red" }, @@ -79,7 +79,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u5de5\u4f5c\u6d41\uff1a** {{workflow.name}}\n**\u8fd0\u884c\u7f16\u53f7\uff1a** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**\u5206\u652f\uff1a** {{workflow_run.head_branch}}\n**\u89e6\u53d1\u8005\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**工作流:** {{workflow.name}}\n**运行编号:** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**分支:** {{workflow_run.head_branch}}\n**触发者:** {{sender_link_md}}" } }, { @@ -90,7 +90,7 @@ "elements": [ { "tag": "plain_text", - "content": "\u274c \u5de5\u4f5c\u6d41\u6267\u884c\u5931\u8d25" + "content": "❌ 工作流执行失败" } ] }, @@ -101,7 +101,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u65e5\u5fd7" + "content": "查看日志" }, "url": "{{workflow_run.html_url}}", "type": "danger" @@ -126,7 +126,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u26a0\ufe0f \u5de5\u4f5c\u6d41\u5df2\u53d6\u6d88" + "content": "⚠️ 工作流已取消" }, "template": "yellow" }, @@ -135,7 +135,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u5de5\u4f5c\u6d41\uff1a** {{workflow.name}}\n**\u8fd0\u884c\u7f16\u53f7\uff1a** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**\u5206\u652f\uff1a** {{workflow_run.head_branch}}\n**\u53d6\u6d88\u8005\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**工作流:** {{workflow.name}}\n**运行编号:** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**分支:** {{workflow_run.head_branch}}\n**取消者:** {{sender_link_md}}" } }, { @@ -146,7 +146,7 @@ "elements": [ { "tag": "plain_text", - "content": "\u6b64\u5de5\u4f5c\u6d41\u8fd0\u884c\u5df2\u88ab\u53d6\u6d88" + "content": "此工作流运行已被取消" } ] }, @@ -157,7 +157,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8fd0\u884c" + "content": "查看运行" }, "url": "{{workflow_run.html_url}}", "type": "default" @@ -181,7 +181,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u23f3 \u5de5\u4f5c\u6d41\u8fd0\u884c\u4e2d" + "content": "⏳ 工作流运行中" }, "template": "blue" }, @@ -190,7 +190,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u5de5\u4f5c\u6d41\uff1a** {{workflow.name}}\n**\u8fd0\u884c\u7f16\u53f7\uff1a** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**\u5206\u652f\uff1a** {{workflow_run.head_branch}}\n**\u89e6\u53d1\u8005\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**工作流:** {{workflow.name}}\n**运行编号:** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**分支:** {{workflow_run.head_branch}}\n**触发者:** {{sender_link_md}}" } }, { @@ -201,7 +201,7 @@ "elements": [ { "tag": "plain_text", - "content": "\u23f3 \u5de5\u4f5c\u6d41\u6b63\u5728\u8fd0\u884c\u4e2d..." + "content": "⏳ 工作流正在运行中..." } ] }, @@ -212,7 +212,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8fdb\u5ea6" + "content": "查看进度" }, "url": "{{workflow_run.html_url}}", "type": "default" @@ -236,7 +236,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2699\ufe0f \u5de5\u4f5c\u6d41 {{action}}" + "content": "⚙️ 工作流 {{action}}" }, "template": "purple" }, @@ -245,7 +245,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u5de5\u4f5c\u6d41\uff1a** {{workflow.name}}\n**\u8fd0\u884c\u7f16\u53f7\uff1a** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**\u72b6\u6001\uff1a** {{workflow_run.conclusion | default(workflow_run.status)}}\n**\u64cd\u4f5c\uff1a** {{action}}" + "content": "**仓库:** {{repository_link_md}}\n**工作流:** {{workflow.name}}\n**运行编号:** [#{{workflow_run_number}}]({{workflow_run.html_url}})\n**状态:** {{workflow_run.conclusion | default(workflow_run.status)}}\n**操作:** {{action}}" } }, { @@ -258,7 +258,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8fd0\u884c" + "content": "查看运行" }, "url": "{{workflow_run.html_url}}", "type": "default" @@ -282,7 +282,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 workflow_run \u5df2\u8bf7\u6c42" + "content": "🔔 workflow_run 已请求" }, "template": "orange" }, @@ -291,7 +291,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**\u4ed3\u5e93\uff1a** {{repository_link_md}}\n**\u64cd\u4f5c\uff1a** {{action}}\n**\u7528\u6237\uff1a** {{sender_link_md}}" + "content": "**仓库:** {{repository_link_md}}\n**操作:** {{action}}\n**用户:** {{sender_link_md}}" } }, { @@ -304,7 +304,7 @@ "tag": "button", "text": { "tag": "plain_text", - "content": "\u67e5\u770b\u8be6\u60c5" + "content": "查看详情" }, "url": "{{repository.html_url}}", "type": "default" diff --git a/example-configs/templates/default/branch_protection_configuration.json b/example-configs/templates/default/branch_protection_configuration.json index c145e10..9b74cc6 100644 --- a/example-configs/templates/default/branch_protection_configuration.json +++ b/example-configs/templates/default/branch_protection_configuration.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Branch Protection Configuration Disabled" + "content": "🔔 Branch Protection Configuration Disabled" }, "template": "turquoise" }, @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Branch Protection Configuration Enabled" + "content": "🔔 Branch Protection Configuration Enabled" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/branch_protection_rule.json b/example-configs/templates/default/branch_protection_rule.json index 900983c..2064dbd 100644 --- a/example-configs/templates/default/branch_protection_rule.json +++ b/example-configs/templates/default/branch_protection_rule.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udee1\ufe0f Branch Protection {{action}}" + "content": "🛡️ Branch Protection {{action}}" }, "template": "blue" }, @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Branch Protection Rule Created" + "content": "🔔 Branch Protection Rule Created" }, "template": "green" }, @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Branch Protection Rule Deleted" + "content": "🔔 Branch Protection Rule Deleted" }, "template": "red" }, @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Branch Protection Rule Edited" + "content": "🔔 Branch Protection Rule Edited" }, "template": "blue" }, diff --git a/example-configs/templates/default/check_run.json b/example-configs/templates/default/check_run.json index 308d65d..0260b70 100644 --- a/example-configs/templates/default/check_run.json +++ b/example-configs/templates/default/check_run.json @@ -14,7 +14,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2705 Check Succeeded: {{check_run.name}}" + "content": "✅ Check Succeeded: {{check_run.name}}" }, "template": "green" }, @@ -44,7 +44,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u274c Check Failed: {{check_run.name}}" + "content": "❌ Check Failed: {{check_run.name}}" }, "template": "red" }, @@ -73,7 +73,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2705 Check Run: {{check_run.name}} {{check_run.status}}" + "content": "✅ Check Run: {{check_run.name}} {{check_run.status}}" }, "template": "green" }, @@ -102,7 +102,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Check Run Created" + "content": "🔔 Check Run Created" }, "template": "green" }, @@ -148,7 +148,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Check Run Requested Action" + "content": "🔔 Check Run Requested Action" }, "template": "turquoise" }, @@ -194,7 +194,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Check Run Rerequested" + "content": "🔔 Check Run Rerequested" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/check_suite.json b/example-configs/templates/default/check_suite.json index 059f2d5..7b59955 100644 --- a/example-configs/templates/default/check_suite.json +++ b/example-configs/templates/default/check_suite.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83e\uddea Check Suite: {{action}}" + "content": "🧪 Check Suite: {{action}}" }, "template": "green" }, @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Check Suite Completed" + "content": "🔔 Check Suite Completed" }, "template": "green" }, @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Check Suite Requested" + "content": "🔔 Check Suite Requested" }, "template": "orange" }, @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Check Suite Rerequested" + "content": "🔔 Check Suite Rerequested" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/code_scanning_alert.json b/example-configs/templates/default/code_scanning_alert.json index e1dc56c..d6029f5 100644 --- a/example-configs/templates/default/code_scanning_alert.json +++ b/example-configs/templates/default/code_scanning_alert.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd0d Code Scanning Alert {{action}}" + "content": "🔍 Code Scanning Alert {{action}}" }, "template": "orange" }, @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Code Scanning Alert Appeared In Branch" + "content": "🔔 Code Scanning Alert Appeared In Branch" }, "template": "turquoise" }, @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Code Scanning Alert Closed By User" + "content": "🔔 Code Scanning Alert Closed By User" }, "template": "turquoise" }, @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Code Scanning Alert Created" + "content": "🔔 Code Scanning Alert Created" }, "template": "green" }, @@ -180,7 +180,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Code Scanning Alert Fixed" + "content": "🔔 Code Scanning Alert Fixed" }, "template": "green" }, @@ -226,7 +226,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Code Scanning Alert Reopened" + "content": "🔔 Code Scanning Alert Reopened" }, "template": "orange" }, @@ -272,7 +272,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Code Scanning Alert Reopened By User" + "content": "🔔 Code Scanning Alert Reopened By User" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/commit_comment.json b/example-configs/templates/default/commit_comment.json index d271dd0..d8f34eb 100644 --- a/example-configs/templates/default/commit_comment.json +++ b/example-configs/templates/default/commit_comment.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcac Commit Comment" + "content": "💬 Commit Comment" }, "template": "blue" }, @@ -56,7 +56,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Commit Comment Created" + "content": "🔔 Commit Comment Created" }, "template": "green" }, diff --git a/example-configs/templates/default/create.json b/example-configs/templates/default/create.json index 735092e..e113c75 100644 --- a/example-configs/templates/default/create.json +++ b/example-configs/templates/default/create.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2728 Created: {{ref_type}} in {{repository.full_name}}" + "content": "✨ Created: {{ref_type}} in {{repository.full_name}}" }, "template": "blue" }, diff --git a/example-configs/templates/default/custom_property.json b/example-configs/templates/default/custom_property.json index e3a3a4c..1fa42f3 100644 --- a/example-configs/templates/default/custom_property.json +++ b/example-configs/templates/default/custom_property.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Custom Property Created" + "content": "🔔 Custom Property Created" }, "template": "green" }, @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Custom Property Deleted" + "content": "🔔 Custom Property Deleted" }, "template": "red" }, @@ -105,7 +105,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Custom Property Promote To Enterprise" + "content": "🔔 Custom Property Promote To Enterprise" }, "template": "turquoise" }, @@ -151,7 +151,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Custom Property Updated" + "content": "🔔 Custom Property Updated" }, "template": "blue" }, diff --git a/example-configs/templates/default/custom_property_values.json b/example-configs/templates/default/custom_property_values.json index 2972f5a..9f7e764 100644 --- a/example-configs/templates/default/custom_property_values.json +++ b/example-configs/templates/default/custom_property_values.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Custom Property Values Updated" + "content": "🔔 Custom Property Values Updated" }, "template": "blue" }, diff --git a/example-configs/templates/default/delete.json b/example-configs/templates/default/delete.json index 49b256a..5c8114b 100644 --- a/example-configs/templates/default/delete.json +++ b/example-configs/templates/default/delete.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\uddd1\ufe0f Deleted: {{ref_type}} in {{repository.full_name}}" + "content": "🗑️ Deleted: {{ref_type}} in {{repository.full_name}}" }, "template": "red" }, diff --git a/example-configs/templates/default/dependabot_alert.json b/example-configs/templates/default/dependabot_alert.json index a2e58ea..7f71c64 100644 --- a/example-configs/templates/default/dependabot_alert.json +++ b/example-configs/templates/default/dependabot_alert.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83e\udd16 Dependabot Alert {{action}}" + "content": "🤖 Dependabot Alert {{action}}" }, "template": "orange" }, @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Dependabot Alert Auto Dismissed" + "content": "🔔 Dependabot Alert Auto Dismissed" }, "template": "turquoise" }, @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Dependabot Alert Auto Reopened" + "content": "🔔 Dependabot Alert Auto Reopened" }, "template": "turquoise" }, @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Dependabot Alert Created" + "content": "🔔 Dependabot Alert Created" }, "template": "green" }, @@ -180,7 +180,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Dependabot Alert Dismissed" + "content": "🔔 Dependabot Alert Dismissed" }, "template": "orange" }, @@ -226,7 +226,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Dependabot Alert Fixed" + "content": "🔔 Dependabot Alert Fixed" }, "template": "green" }, @@ -272,7 +272,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Dependabot Alert Reintroduced" + "content": "🔔 Dependabot Alert Reintroduced" }, "template": "turquoise" }, @@ -318,7 +318,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Dependabot Alert Reopened" + "content": "🔔 Dependabot Alert Reopened" }, "template": "orange" }, diff --git a/example-configs/templates/default/deploy_key.json b/example-configs/templates/default/deploy_key.json index b1cad6b..efa5452 100644 --- a/example-configs/templates/default/deploy_key.json +++ b/example-configs/templates/default/deploy_key.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Deploy Key Created" + "content": "🔔 Deploy Key Created" }, "template": "green" }, @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Deploy Key Deleted" + "content": "🔔 Deploy Key Deleted" }, "template": "red" }, diff --git a/example-configs/templates/default/deployment.json b/example-configs/templates/default/deployment.json index 847aa14..42e5366 100644 --- a/example-configs/templates/default/deployment.json +++ b/example-configs/templates/default/deployment.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udea2 Deployment: {{deployment.environment}}" + "content": "🚢 Deployment: {{deployment.environment}}" }, "template": "green" }, diff --git a/example-configs/templates/default/deployment_protection_rule.json b/example-configs/templates/default/deployment_protection_rule.json index f357a0d..0202d11 100644 --- a/example-configs/templates/default/deployment_protection_rule.json +++ b/example-configs/templates/default/deployment_protection_rule.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Deployment Protection Rule Requested" + "content": "🔔 Deployment Protection Rule Requested" }, "template": "orange" }, diff --git a/example-configs/templates/default/deployment_review.json b/example-configs/templates/default/deployment_review.json index f3dd7cf..8ed8df1 100644 --- a/example-configs/templates/default/deployment_review.json +++ b/example-configs/templates/default/deployment_review.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2705 Deployment Approved" + "content": "✅ Deployment Approved" }, "template": "green" }, @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u274c Deployment Rejected" + "content": "❌ Deployment Rejected" }, "template": "red" }, @@ -71,7 +71,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Deployment Review {{action}}" + "content": "🔔 Deployment Review {{action}}" }, "template": "blue" }, @@ -100,7 +100,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Deployment Review Requested" + "content": "🔔 Deployment Review Requested" }, "template": "orange" }, diff --git a/example-configs/templates/default/deployment_status.json b/example-configs/templates/default/deployment_status.json index 43b77d9..babce34 100644 --- a/example-configs/templates/default/deployment_status.json +++ b/example-configs/templates/default/deployment_status.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udce3 Deployment status: {{deployment_status.state}}" + "content": "📣 Deployment status: {{deployment_status.state}}" }, "template": "green" }, diff --git a/example-configs/templates/default/discussion.json b/example-configs/templates/default/discussion.json index 837e933..fdbaf80 100644 --- a/example-configs/templates/default/discussion.json +++ b/example-configs/templates/default/discussion.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcac New Discussion Created" + "content": "💬 New Discussion Created" }, "template": "green" }, @@ -69,7 +69,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2705 Discussion Answered" + "content": "✅ Discussion Answered" }, "template": "purple" }, @@ -124,7 +124,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd12 Discussion Locked" + "content": "🔒 Discussion Locked" }, "template": "orange" }, @@ -179,7 +179,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd13 Discussion Unlocked" + "content": "🔓 Discussion Unlocked" }, "template": "green" }, @@ -234,7 +234,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udccb Discussion Closed" + "content": "📋 Discussion Closed" }, "template": "grey" }, @@ -280,7 +280,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcac Discussion {{action}}" + "content": "💬 Discussion {{action}}" }, "template": "turquoise" }, @@ -326,7 +326,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Discussion Deleted" + "content": "🔔 Discussion Deleted" }, "template": "red" }, @@ -372,7 +372,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Discussion Edited" + "content": "🔔 Discussion Edited" }, "template": "blue" }, @@ -418,7 +418,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Discussion Labeled" + "content": "🔔 Discussion Labeled" }, "template": "turquoise" }, @@ -464,7 +464,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Discussion Pinned" + "content": "🔔 Discussion Pinned" }, "template": "turquoise" }, @@ -510,7 +510,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Discussion Transferred" + "content": "🔔 Discussion Transferred" }, "template": "turquoise" }, @@ -556,7 +556,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Discussion Unanswered" + "content": "🔔 Discussion Unanswered" }, "template": "turquoise" }, @@ -602,7 +602,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Discussion Unlabeled" + "content": "🔔 Discussion Unlabeled" }, "template": "turquoise" }, @@ -648,7 +648,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Discussion Unpinned" + "content": "🔔 Discussion Unpinned" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/discussion_comment.json b/example-configs/templates/default/discussion_comment.json index 578c40e..faea206 100644 --- a/example-configs/templates/default/discussion_comment.json +++ b/example-configs/templates/default/discussion_comment.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcac Discussion Comment: {{discussion.title}}" + "content": "💬 Discussion Comment: {{discussion.title}}" }, "template": "teal" }, @@ -56,7 +56,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Discussion Comment Created" + "content": "🔔 Discussion Comment Created" }, "template": "green" }, @@ -102,7 +102,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Discussion Comment Deleted" + "content": "🔔 Discussion Comment Deleted" }, "template": "red" }, @@ -148,7 +148,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Discussion Comment Edited" + "content": "🔔 Discussion Comment Edited" }, "template": "blue" }, diff --git a/example-configs/templates/default/fork.json b/example-configs/templates/default/fork.json index ef369ef..e7bd0db 100644 --- a/example-configs/templates/default/fork.json +++ b/example-configs/templates/default/fork.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83c\udf74 Fork: {{forkee.full_name}}" + "content": "🍴 Fork: {{forkee.full_name}}" }, "template": "purple" }, diff --git a/example-configs/templates/default/github_app_authorization.json b/example-configs/templates/default/github_app_authorization.json index 43085db..1f1cf61 100644 --- a/example-configs/templates/default/github_app_authorization.json +++ b/example-configs/templates/default/github_app_authorization.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Github App Authorization Revoked" + "content": "🔔 Github App Authorization Revoked" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/gollum.json b/example-configs/templates/default/gollum.json index 8d3511a..b29d8e1 100644 --- a/example-configs/templates/default/gollum.json +++ b/example-configs/templates/default/gollum.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcda Wiki Update: {{repository.full_name}}" + "content": "📚 Wiki Update: {{repository.full_name}}" }, "template": "gray" }, diff --git a/example-configs/templates/default/installation.json b/example-configs/templates/default/installation.json index afde93b..ac49b3d 100644 --- a/example-configs/templates/default/installation.json +++ b/example-configs/templates/default/installation.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83e\udd16 GitHub App {{action}}" + "content": "🤖 GitHub App {{action}}" }, "template": "blue" }, @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Installation Created" + "content": "🔔 Installation Created" }, "template": "green" }, @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Installation Deleted" + "content": "🔔 Installation Deleted" }, "template": "red" }, @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Installation New Permissions Accepted" + "content": "🔔 Installation New Permissions Accepted" }, "template": "turquoise" }, @@ -180,7 +180,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Installation Suspend" + "content": "🔔 Installation Suspend" }, "template": "turquoise" }, @@ -226,7 +226,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Installation Unsuspend" + "content": "🔔 Installation Unsuspend" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/installation_repositories.json b/example-configs/templates/default/installation_repositories.json index 1d2bdb0..6665588 100644 --- a/example-configs/templates/default/installation_repositories.json +++ b/example-configs/templates/default/installation_repositories.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Installation Repositories Added" + "content": "🔔 Installation Repositories Added" }, "template": "turquoise" }, @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Installation Repositories Removed" + "content": "🔔 Installation Repositories Removed" }, "template": "red" }, diff --git a/example-configs/templates/default/installation_target.json b/example-configs/templates/default/installation_target.json index 0811181..16fb379 100644 --- a/example-configs/templates/default/installation_target.json +++ b/example-configs/templates/default/installation_target.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Installation Target Renamed" + "content": "🔔 Installation Target Renamed" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/issue_comment.json b/example-configs/templates/default/issue_comment.json index 9390d93..e474724 100644 --- a/example-configs/templates/default/issue_comment.json +++ b/example-configs/templates/default/issue_comment.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcac Issue Comment: #{{issue.number}}" + "content": "💬 Issue Comment: #{{issue.number}}" }, "template": "orange" }, @@ -56,7 +56,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Issue Comment Created" + "content": "🔔 Issue Comment Created" }, "template": "green" }, @@ -102,7 +102,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Issue Comment Deleted" + "content": "🔔 Issue Comment Deleted" }, "template": "red" }, @@ -148,7 +148,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Issue Comment Edited" + "content": "🔔 Issue Comment Edited" }, "template": "blue" }, @@ -194,7 +194,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcac PR Comment: #{{issue.number}}" + "content": "💬 PR Comment: #{{issue.number}}" }, "template": "orange" }, @@ -238,7 +238,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 PR Comment Created" + "content": "🔔 PR Comment Created" }, "template": "green" }, @@ -285,7 +285,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 PR Comment Deleted" + "content": "🔔 PR Comment Deleted" }, "template": "red" }, @@ -332,7 +332,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 PR Comment Edited" + "content": "🔔 PR Comment Edited" }, "template": "blue" }, diff --git a/example-configs/templates/default/issue_dependencies.json b/example-configs/templates/default/issue_dependencies.json index 4438a28..1faa04f 100644 --- a/example-configs/templates/default/issue_dependencies.json +++ b/example-configs/templates/default/issue_dependencies.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Issue Dependencies Blocked By Added" + "content": "🔔 Issue Dependencies Blocked By Added" }, "template": "turquoise" }, @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Issue Dependencies Blocked By Removed" + "content": "🔔 Issue Dependencies Blocked By Removed" }, "template": "turquoise" }, @@ -105,7 +105,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Issue Dependencies Blocking Added" + "content": "🔔 Issue Dependencies Blocking Added" }, "template": "turquoise" }, @@ -151,7 +151,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Issue Dependencies Blocking Removed" + "content": "🔔 Issue Dependencies Blocking Removed" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/issues.json b/example-configs/templates/default/issues.json index 1572857..cd5f9c8 100644 --- a/example-configs/templates/default/issues.json +++ b/example-configs/templates/default/issues.json @@ -14,7 +14,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udc1b Bug reported: {{issue.title}}" + "content": "🐛 Bug reported: {{issue.title}}" }, "template": "red" }, @@ -23,7 +23,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udc1b **Bug reported** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**Description:** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" + "content": "🐛 **Bug reported** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**Description:** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" } }, { @@ -58,7 +58,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2728 Feature request: {{issue.title}}" + "content": "✨ Feature request: {{issue.title}}" }, "template": "blue" }, @@ -67,7 +67,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\u2728 **Feature request** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**Description:** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" + "content": "✨ **Feature request** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**Description:** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" } }, { @@ -102,7 +102,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udccb Task created: {{issue.title}}" + "content": "📋 Task created: {{issue.title}}" }, "template": "green" }, @@ -111,7 +111,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udccb **Task created** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**Description:** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" + "content": "📋 **Task created** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**Description:** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" } }, { @@ -146,7 +146,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2705 Bug fixed: {{issue.title}}" + "content": "✅ Bug fixed: {{issue.title}}" }, "template": "purple" }, @@ -155,7 +155,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\u2705 **Bug fixed** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**State:** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" + "content": "✅ **Bug fixed** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**State:** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" } }, { @@ -190,7 +190,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2705 Feature completed: {{issue.title}}" + "content": "✅ Feature completed: {{issue.title}}" }, "template": "purple" }, @@ -199,7 +199,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\u2705 **Feature completed** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**State:** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" + "content": "✅ **Feature completed** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**State:** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" } }, { @@ -234,7 +234,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2705 Task completed: {{issue.title}}" + "content": "✅ Task completed: {{issue.title}}" }, "template": "purple" }, @@ -243,7 +243,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\u2705 **Task completed** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**State:** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" + "content": "✅ **Task completed** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**State:** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" } }, { @@ -278,7 +278,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd04 Bug reopened: {{issue.title}}" + "content": "🔄 Bug reopened: {{issue.title}}" }, "template": "orange" }, @@ -287,7 +287,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udd04 **Bug reopened** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" + "content": "🔄 **Bug reopened** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" } }, { @@ -322,7 +322,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd04 Feature reopened: {{issue.title}}" + "content": "🔄 Feature reopened: {{issue.title}}" }, "template": "orange" }, @@ -331,7 +331,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udd04 **Feature reopened** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" + "content": "🔄 **Feature reopened** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" } }, { @@ -366,7 +366,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd04 Task reopened: {{issue.title}}" + "content": "🔄 Task reopened: {{issue.title}}" }, "template": "orange" }, @@ -375,7 +375,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udd04 **Task reopened** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" + "content": "🔄 **Task reopened** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" } }, { @@ -409,7 +409,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcdd Issue opened: {{issue.title}}" + "content": "📝 Issue opened: {{issue.title}}" }, "template": "green" }, @@ -418,7 +418,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udcdd **Issue opened** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**Description:** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" + "content": "📝 **Issue opened** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.body}}**Description:** {{issue.body | truncate(200)}}{{/if}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" } }, { @@ -452,7 +452,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2705 Issue closed: {{issue.title}}" + "content": "✅ Issue closed: {{issue.title}}" }, "template": "purple" }, @@ -461,7 +461,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\u2705 **Issue closed** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**State:** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" + "content": "✅ **Issue closed** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n**State:** {{issue.state | default('closed')}} ({{issue_state_reason | default('completed')}})\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" } }, { @@ -495,7 +495,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd04 Issue reopened: {{issue.title}}" + "content": "🔄 Issue reopened: {{issue.title}}" }, "template": "orange" }, @@ -504,7 +504,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udd04 **Issue reopened** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" + "content": "🔄 **Issue reopened** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_labels_joined}}**Labels:** {{issue_labels_joined}}{{/if}}" } }, { @@ -538,7 +538,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udc64 Issue assigned: {{issue.title}}" + "content": "👤 Issue assigned: {{issue.title}}" }, "template": "blue" }, @@ -547,7 +547,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udc64 **Issue assigned** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if assignee_link_md}}**Assignee:** {{assignee_link_md}}{{/if}}" + "content": "👤 **Issue assigned** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if assignee_link_md}}**Assignee:** {{assignee_link_md}}{{/if}}" } }, { @@ -581,7 +581,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udc64 Issue unassigned: {{issue.title}}" + "content": "👤 Issue unassigned: {{issue.title}}" }, "template": "grey" }, @@ -590,7 +590,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udc64 **Issue unassigned** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if assignee_link_md}}**Removed assignee:** {{assignee_link_md}}{{/if}}" + "content": "👤 **Issue unassigned** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if assignee_link_md}}**Removed assignee:** {{assignee_link_md}}{{/if}}" } }, { @@ -624,7 +624,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u270f\ufe0f Issue edited: {{issue.title}}" + "content": "✏️ Issue edited: {{issue.title}}" }, "template": "grey" }, @@ -633,7 +633,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\u270f\ufe0f **Issue edited** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if changes_title_from}}**Title changed from:** {{changes_title_from}}{{/if}}" + "content": "✏️ **Issue edited** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if changes_title_from}}**Title changed from:** {{changes_title_from}}{{/if}}" } }, { @@ -667,7 +667,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83c\udfaf Milestone added: {{issue.title}}" + "content": "🎯 Milestone added: {{issue.title}}" }, "template": "turquoise" }, @@ -676,7 +676,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83c\udfaf **Milestone added** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if milestone_title}}**Milestone:** {{milestone_title}}{{/if}}" + "content": "🎯 **Milestone added** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if milestone_title}}**Milestone:** {{milestone_title}}{{/if}}" } }, { @@ -710,7 +710,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83c\udfaf Milestone removed: {{issue.title}}" + "content": "🎯 Milestone removed: {{issue.title}}" }, "template": "grey" }, @@ -719,7 +719,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83c\udfaf **Milestone removed** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if milestone_title}}**Removed milestone:** {{milestone_title}}{{/if}}" + "content": "🎯 **Milestone removed** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if milestone_title}}**Removed milestone:** {{milestone_title}}{{/if}}" } }, { @@ -753,7 +753,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udce6 Issue transferred: {{issue.title}}" + "content": "📦 Issue transferred: {{issue.title}}" }, "template": "blue" }, @@ -762,7 +762,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udce6 **Issue transferred** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if changes_new_repository_full_name}}**To repository:** {{changes_new_repository_full_name}}{{/if}}" + "content": "📦 **Issue transferred** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if changes_new_repository_full_name}}**To repository:** {{changes_new_repository_full_name}}{{/if}}" } }, { @@ -796,7 +796,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\uddd1\ufe0f Issue deleted: {{issue.title}}" + "content": "🗑️ Issue deleted: {{issue.title}}" }, "template": "red" }, @@ -805,7 +805,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\uddd1\ufe0f **Issue deleted** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" + "content": "🗑️ **Issue deleted** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" } } ] @@ -825,7 +825,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udccc Issue pinned: {{issue.title}}" + "content": "📌 Issue pinned: {{issue.title}}" }, "template": "yellow" }, @@ -834,7 +834,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udccc **Issue pinned** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" + "content": "📌 **Issue pinned** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" } }, { @@ -868,7 +868,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udccc Issue unpinned: {{issue.title}}" + "content": "📌 Issue unpinned: {{issue.title}}" }, "template": "grey" }, @@ -877,7 +877,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udccc **Issue unpinned** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" + "content": "📌 **Issue unpinned** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" } }, { @@ -911,7 +911,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd12 Issue locked: {{issue.title}}" + "content": "🔒 Issue locked: {{issue.title}}" }, "template": "red" }, @@ -920,7 +920,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udd12 **Issue locked** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.active_lock_reason}}**Reason:** {{issue.active_lock_reason}}{{/if}}" + "content": "🔒 **Issue locked** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue.active_lock_reason}}**Reason:** {{issue.active_lock_reason}}{{/if}}" } }, { @@ -954,7 +954,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd13 Issue unlocked: {{issue.title}}" + "content": "🔓 Issue unlocked: {{issue.title}}" }, "template": "green" }, @@ -963,7 +963,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udd13 **Issue unlocked** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" + "content": "🔓 **Issue unlocked** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" } }, { @@ -997,7 +997,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83c\udff7\ufe0f Label added: {{labeled_label_name}} on {{issue.title}}" + "content": "🏷️ Label added: {{labeled_label_name}} on {{issue.title}}" }, "template": "teal" }, @@ -1040,7 +1040,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83c\udff7\ufe0f Label removed: {{labeled_label_name}} from {{issue.title}}" + "content": "🏷️ Label removed: {{labeled_label_name}} from {{issue.title}}" }, "template": "grey" }, @@ -1083,7 +1083,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u270f\ufe0f Issue typed: {{issue.title}}" + "content": "✏️ Issue typed: {{issue.title}}" }, "template": "yellow" }, @@ -1092,7 +1092,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\u270f\ufe0f **Issue typed** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_type}}**Type:** {{issue_type}}{{/if}}" + "content": "✏️ **Issue typed** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n{{#if issue_type}}**Type:** {{issue_type}}{{/if}}" } }, { @@ -1126,7 +1126,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u270f\ufe0f Issue type removed: {{issue.title}}" + "content": "✏️ Issue type removed: {{issue.title}}" }, "template": "grey" }, @@ -1135,7 +1135,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\u270f\ufe0f **Issue type removed** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" + "content": "✏️ **Issue type removed** by {{sender_link_md | default(sender.login)}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}" } }, { @@ -1169,7 +1169,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udc1e Bug: {{issue.title}}" + "content": "🐞 Bug: {{issue.title}}" }, "template": "red" }, @@ -1178,7 +1178,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udc1b **Bug reported** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n" + "content": "🐛 **Bug reported** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n" } }, { @@ -1212,7 +1212,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2728 Feature: {{issue.title}}" + "content": "✨ Feature: {{issue.title}}" }, "template": "blue" }, @@ -1221,7 +1221,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\u2728 **Feature request** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n" + "content": "✨ **Feature request** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n" } }, { @@ -1255,7 +1255,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcdd Task: {{issue.title}}" + "content": "📝 Task: {{issue.title}}" }, "template": "yellow" }, @@ -1264,7 +1264,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\ud83d\udcdd **Task created** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n" + "content": "📝 **Task created** by {{sender_link_md | default(sender.login)}} {{issue_user_link_md | default('')}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n" } }, { @@ -1298,7 +1298,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u26a0\ufe0f Issue: {{issue.title}}" + "content": "⚠️ Issue: {{issue.title}}" }, "template": "yellow" }, @@ -1307,7 +1307,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "\u26a0\ufe0f **Issue** by {{sender_link_md | default(sender.login)}} {{issue_type_display | default(issue_user_link_md | default(''))}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n" + "content": "⚠️ **Issue** by {{sender_link_md | default(sender.login)}} {{issue_type_display | default(issue_user_link_md | default(''))}}\n**Repository:** {{repository_link_md}}\n**Issue:** {{issue_link_md | default(issue.html_url | default(''))}}\n" } }, { @@ -1341,7 +1341,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83c\udff7\ufe0f Label added: {{labeled_label_name}} on {{issue.title}}" + "content": "🏷️ Label added: {{labeled_label_name}} on {{issue.title}}" }, "template": "teal" }, @@ -1384,7 +1384,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcdd Issue: {{issue.title}}" + "content": "📝 Issue: {{issue.title}}" }, "template": "gray" }, diff --git a/example-configs/templates/default/label.json b/example-configs/templates/default/label.json index 7cf7ebd..3c92fe4 100644 --- a/example-configs/templates/default/label.json +++ b/example-configs/templates/default/label.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83c\udff7\ufe0f Label {{action}}" + "content": "🏷️ Label {{action}}" }, "template": "blue" }, @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Label Created" + "content": "🔔 Label Created" }, "template": "green" }, @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Label Deleted" + "content": "🔔 Label Deleted" }, "template": "red" }, @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Label Edited" + "content": "🔔 Label Edited" }, "template": "blue" }, diff --git a/example-configs/templates/default/marketplace_purchase.json b/example-configs/templates/default/marketplace_purchase.json index bac13f9..44e147e 100644 --- a/example-configs/templates/default/marketplace_purchase.json +++ b/example-configs/templates/default/marketplace_purchase.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Marketplace Purchase Cancelled" + "content": "🔔 Marketplace Purchase Cancelled" }, "template": "orange" }, @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Marketplace Purchase Changed" + "content": "🔔 Marketplace Purchase Changed" }, "template": "turquoise" }, @@ -105,7 +105,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Marketplace Purchase Pending Change" + "content": "🔔 Marketplace Purchase Pending Change" }, "template": "yellow" }, @@ -151,7 +151,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Marketplace Purchase Pending Change Cancelled" + "content": "🔔 Marketplace Purchase Pending Change Cancelled" }, "template": "yellow" }, @@ -197,7 +197,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Marketplace Purchase Purchased" + "content": "🔔 Marketplace Purchase Purchased" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/member.json b/example-configs/templates/default/member.json index d544386..58ec396 100644 --- a/example-configs/templates/default/member.json +++ b/example-configs/templates/default/member.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udc64 Member event: {{action}} {{member.login}}" + "content": "👤 Member event: {{action}} {{member.login}}" }, "template": "blue" }, @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Member Added" + "content": "🔔 Member Added" }, "template": "turquoise" }, @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Member Edited" + "content": "🔔 Member Edited" }, "template": "blue" }, @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Member Removed" + "content": "🔔 Member Removed" }, "template": "red" }, diff --git a/example-configs/templates/default/membership.json b/example-configs/templates/default/membership.json index 1046ae6..2c536cf 100644 --- a/example-configs/templates/default/membership.json +++ b/example-configs/templates/default/membership.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2795 Membership: {{action}}" + "content": "➕ Membership: {{action}}" }, "template": "blue" }, @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Membership Added" + "content": "🔔 Membership Added" }, "template": "turquoise" }, @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Membership Removed" + "content": "🔔 Membership Removed" }, "template": "red" }, diff --git a/example-configs/templates/default/merge_group.json b/example-configs/templates/default/merge_group.json index 0bd52de..9937c7e 100644 --- a/example-configs/templates/default/merge_group.json +++ b/example-configs/templates/default/merge_group.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd00 Merge Queue {{action}}" + "content": "🔀 Merge Queue {{action}}" }, "template": "purple" }, @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Merge Group Checks Requested" + "content": "🔔 Merge Group Checks Requested" }, "template": "turquoise" }, @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Merge Group Destroyed" + "content": "🔔 Merge Group Destroyed" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/meta.json b/example-configs/templates/default/meta.json index 7629f50..59583cc 100644 --- a/example-configs/templates/default/meta.json +++ b/example-configs/templates/default/meta.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Meta Deleted" + "content": "🔔 Meta Deleted" }, "template": "red" }, diff --git a/example-configs/templates/default/milestone.json b/example-configs/templates/default/milestone.json index 272b60c..b4371e2 100644 --- a/example-configs/templates/default/milestone.json +++ b/example-configs/templates/default/milestone.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83c\udfc1 Milestone: {{action}} {{milestone.title}}" + "content": "🏁 Milestone: {{action}} {{milestone.title}}" }, "template": "blue" }, @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Milestone Closed" + "content": "🔔 Milestone Closed" }, "template": "red" }, @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Milestone Created" + "content": "🔔 Milestone Created" }, "template": "green" }, @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Milestone Deleted" + "content": "🔔 Milestone Deleted" }, "template": "red" }, @@ -180,7 +180,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Milestone Edited" + "content": "🔔 Milestone Edited" }, "template": "blue" }, @@ -226,7 +226,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Milestone Opened" + "content": "🔔 Milestone Opened" }, "template": "green" }, diff --git a/example-configs/templates/default/org_block.json b/example-configs/templates/default/org_block.json index 062413f..f3f0705 100644 --- a/example-configs/templates/default/org_block.json +++ b/example-configs/templates/default/org_block.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Org Block Blocked" + "content": "🔔 Org Block Blocked" }, "template": "turquoise" }, @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Org Block Unblocked" + "content": "🔔 Org Block Unblocked" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/organization.json b/example-configs/templates/default/organization.json index 95ba86a..7f70617 100644 --- a/example-configs/templates/default/organization.json +++ b/example-configs/templates/default/organization.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83c\udfe2 Organization change: {{action}}" + "content": "🏢 Organization change: {{action}}" }, "template": "blue" }, @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Organization Member Added" + "content": "🔔 Organization Member Added" }, "template": "turquoise" }, @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Organization Member Invited" + "content": "🔔 Organization Member Invited" }, "template": "turquoise" }, @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Organization Member Removed" + "content": "🔔 Organization Member Removed" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/package.json b/example-configs/templates/default/package.json index bd1bafc..f131603 100644 --- a/example-configs/templates/default/package.json +++ b/example-configs/templates/default/package.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udce6 Package: {{action}} {{package.name | default('package')}}" + "content": "📦 Package: {{action}} {{package.name | default('package')}}" }, "template": "purple" }, @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Package Published" + "content": "🔔 Package Published" }, "template": "green" }, @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Package Updated" + "content": "🔔 Package Updated" }, "template": "blue" }, diff --git a/example-configs/templates/default/page_build.json b/example-configs/templates/default/page_build.json index c0f8c97..c4d2ffd 100644 --- a/example-configs/templates/default/page_build.json +++ b/example-configs/templates/default/page_build.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcc4 Page Build: {{action}}" + "content": "📄 Page Build: {{action}}" }, "template": "gray" }, diff --git a/example-configs/templates/default/personal_access_token_request.json b/example-configs/templates/default/personal_access_token_request.json index 5114d52..9542565 100644 --- a/example-configs/templates/default/personal_access_token_request.json +++ b/example-configs/templates/default/personal_access_token_request.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Personal Access Token Request Approved" + "content": "🔔 Personal Access Token Request Approved" }, "template": "green" }, @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Personal Access Token Request Cancelled" + "content": "🔔 Personal Access Token Request Cancelled" }, "template": "orange" }, @@ -105,7 +105,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Personal Access Token Request Created" + "content": "🔔 Personal Access Token Request Created" }, "template": "green" }, @@ -151,7 +151,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Personal Access Token Request Denied" + "content": "🔔 Personal Access Token Request Denied" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/ping.json b/example-configs/templates/default/ping.json index 32a2f7f..1661c81 100644 --- a/example-configs/templates/default/ping.json +++ b/example-configs/templates/default/ping.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2705 GitHub Webhook Successfully Added" + "content": "✅ GitHub Webhook Successfully Added" }, "template": "green" }, diff --git a/example-configs/templates/default/project.json b/example-configs/templates/default/project.json index 92db7ca..1dd006e 100644 --- a/example-configs/templates/default/project.json +++ b/example-configs/templates/default/project.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udccb Project: {{action}} {{project.name}}" + "content": "📋 Project: {{action}} {{project.name}}" }, "template": "brown" }, @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Project Closed" + "content": "🔔 Project Closed" }, "template": "red" }, @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Project Created" + "content": "🔔 Project Created" }, "template": "green" }, @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Project Deleted" + "content": "🔔 Project Deleted" }, "template": "red" }, @@ -180,7 +180,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Project Reopened" + "content": "🔔 Project Reopened" }, "template": "orange" }, @@ -226,7 +226,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Project Updated" + "content": "🔔 Project Updated" }, "template": "blue" }, diff --git a/example-configs/templates/default/project_card.json b/example-configs/templates/default/project_card.json index e6761ea..cd60e11 100644 --- a/example-configs/templates/default/project_card.json +++ b/example-configs/templates/default/project_card.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83c\udccf Project Card: {{action}}" + "content": "🃏 Project Card: {{action}}" }, "template": "brown" }, @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Project Card Converted" + "content": "🔔 Project Card Converted" }, "template": "turquoise" }, @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Project Card Created" + "content": "🔔 Project Card Created" }, "template": "green" }, @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Project Card Deleted" + "content": "🔔 Project Card Deleted" }, "template": "red" }, @@ -180,7 +180,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Project Card Edited" + "content": "🔔 Project Card Edited" }, "template": "blue" }, @@ -226,7 +226,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Project Card Moved" + "content": "🔔 Project Card Moved" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/project_column.json b/example-configs/templates/default/project_column.json index e9b6ac9..3a9ebe0 100644 --- a/example-configs/templates/default/project_column.json +++ b/example-configs/templates/default/project_column.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcd0 Project Column: {{action}}" + "content": "📐 Project Column: {{action}}" }, "template": "brown" }, @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Project Column Created" + "content": "🔔 Project Column Created" }, "template": "green" }, @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Project Column Deleted" + "content": "🔔 Project Column Deleted" }, "template": "red" }, @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Project Column Moved" + "content": "🔔 Project Column Moved" }, "template": "turquoise" }, @@ -180,7 +180,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Project Column Updated" + "content": "🔔 Project Column Updated" }, "template": "blue" }, diff --git a/example-configs/templates/default/projects_v2.json b/example-configs/templates/default/projects_v2.json index 28c7cfd..e1aec18 100644 --- a/example-configs/templates/default/projects_v2.json +++ b/example-configs/templates/default/projects_v2.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udccb Project {{action}}" + "content": "📋 Project {{action}}" }, "template": "blue" }, @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Projects V2 Closed" + "content": "🔔 Projects V2 Closed" }, "template": "red" }, @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Projects V2 Created" + "content": "🔔 Projects V2 Created" }, "template": "green" }, @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Projects V2 Deleted" + "content": "🔔 Projects V2 Deleted" }, "template": "red" }, @@ -180,7 +180,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Projects V2 Edited" + "content": "🔔 Projects V2 Edited" }, "template": "blue" }, @@ -226,7 +226,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Projects V2 Reopened" + "content": "🔔 Projects V2 Reopened" }, "template": "orange" }, diff --git a/example-configs/templates/default/projects_v2_item.json b/example-configs/templates/default/projects_v2_item.json index 1cb6616..40323b4 100644 --- a/example-configs/templates/default/projects_v2_item.json +++ b/example-configs/templates/default/projects_v2_item.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Projects V2 Item Archived" + "content": "🔔 Projects V2 Item Archived" }, "template": "turquoise" }, @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Projects V2 Item Converted" + "content": "🔔 Projects V2 Item Converted" }, "template": "turquoise" }, @@ -105,7 +105,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Projects V2 Item Created" + "content": "🔔 Projects V2 Item Created" }, "template": "green" }, @@ -151,7 +151,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Projects V2 Item Deleted" + "content": "🔔 Projects V2 Item Deleted" }, "template": "red" }, @@ -197,7 +197,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Projects V2 Item Edited" + "content": "🔔 Projects V2 Item Edited" }, "template": "blue" }, @@ -243,7 +243,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Projects V2 Item Reordered" + "content": "🔔 Projects V2 Item Reordered" }, "template": "turquoise" }, @@ -289,7 +289,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Projects V2 Item Restored" + "content": "🔔 Projects V2 Item Restored" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/projects_v2_status_update.json b/example-configs/templates/default/projects_v2_status_update.json index 2585fb5..eda9999 100644 --- a/example-configs/templates/default/projects_v2_status_update.json +++ b/example-configs/templates/default/projects_v2_status_update.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Projects V2 Status Update Created" + "content": "🔔 Projects V2 Status Update Created" }, "template": "green" }, @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Projects V2 Status Update Deleted" + "content": "🔔 Projects V2 Status Update Deleted" }, "template": "red" }, @@ -105,7 +105,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Projects V2 Status Update Edited" + "content": "🔔 Projects V2 Status Update Edited" }, "template": "blue" }, diff --git a/example-configs/templates/default/public.json b/example-configs/templates/default/public.json index c8362b4..28d225e 100644 --- a/example-configs/templates/default/public.json +++ b/example-configs/templates/default/public.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83c\udf10 Repository made public: {{repository.full_name}}" + "content": "🌐 Repository made public: {{repository.full_name}}" }, "template": "green" }, diff --git a/example-configs/templates/default/pull_request.json b/example-configs/templates/default/pull_request.json index 1f279f7..56c2d63 100644 --- a/example-configs/templates/default/pull_request.json +++ b/example-configs/templates/default/pull_request.json @@ -14,7 +14,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd2e Pull Request Merged" + "content": "🔮 Pull Request Merged" }, "template": "purple" }, @@ -23,7 +23,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Merged by:** {{sender_link_md}}\n**Branch:** {{pr_head_branch_link_md}} \u2192 {{pr_base_branch_link_md}}" + "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Merged by:** {{sender_link_md}}\n**Branch:** {{pr_head_branch_link_md}} → {{pr_base_branch_link_md}}" } }, { @@ -68,7 +68,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u274c Pull Request Closed (Not Merged)" + "content": "❌ Pull Request Closed (Not Merged)" }, "template": "red" }, @@ -77,7 +77,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Closed by:** {{sender_link_md}}\n**Branch:** {{pr_head_branch_link_md}} \u2192 {{pr_base_branch_link_md}}" + "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Closed by:** {{sender_link_md}}\n**Branch:** {{pr_head_branch_link_md}} → {{pr_base_branch_link_md}}" } }, { @@ -123,7 +123,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd00 New Pull Request Opened" + "content": "🔀 New Pull Request Opened" }, "template": "green" }, @@ -132,7 +132,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Author:** {{pr_user_link_md}}\n**Branch:** {{pr_head_branch_link_md}} \u2192 {{pr_base_branch_link_md}}" + "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Author:** {{pr_user_link_md}}\n**Branch:** {{pr_head_branch_link_md}} → {{pr_base_branch_link_md}}" } }, { @@ -176,7 +176,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd04 Pull Request Reopened" + "content": "🔄 Pull Request Reopened" }, "template": "green" }, @@ -185,7 +185,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Reopened by:** {{sender_link_md}}\n**Branch:** {{pr_head_branch_link_md}} \u2192 {{pr_base_branch_link_md}}" + "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Reopened by:** {{sender_link_md}}\n**Branch:** {{pr_head_branch_link_md}} → {{pr_base_branch_link_md}}" } }, { @@ -222,7 +222,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd04 Pull Request Updated" + "content": "🔄 Pull Request Updated" }, "template": "blue" }, @@ -231,7 +231,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Updated by:** {{sender_link_md}}\n**Branch:** {{pr_head_branch_link_md}} \u2192 {{pr_base_branch_link_md}}" + "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Updated by:** {{sender_link_md}}\n**Branch:** {{pr_head_branch_link_md}} → {{pr_base_branch_link_md}}" } }, { @@ -277,7 +277,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2705 Pull Request Ready for Review" + "content": "✅ Pull Request Ready for Review" }, "template": "green" }, @@ -286,7 +286,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Author:** {{pr_user_link_md}}\n**Branch:** {{pr_head_branch_link_md}} \u2192 {{pr_base_branch_link_md}}" + "content": "**Repository:** {{repository_link_md}}\n**PR:** [#{{pr_number}} {{pr_title}}]({{pr_url}})\n**Author:** {{pr_user_link_md}}\n**Branch:** {{pr_head_branch_link_md}} → {{pr_base_branch_link_md}}" } }, { @@ -332,7 +332,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcdd Pull Request Converted to Draft" + "content": "📝 Pull Request Converted to Draft" }, "template": "grey" }, @@ -387,7 +387,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udc41\ufe0f Review Requested" + "content": "👁️ Review Requested" }, "template": "orange" }, @@ -433,7 +433,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd00 Pull Request {{action}}" + "content": "🔀 Pull Request {{action}}" }, "template": "blue" }, @@ -479,7 +479,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Pull Request Assigned" + "content": "🔔 Pull Request Assigned" }, "template": "turquoise" }, @@ -525,7 +525,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Pull Request Auto Merge Disabled" + "content": "🔔 Pull Request Auto Merge Disabled" }, "template": "turquoise" }, @@ -571,7 +571,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Pull Request Auto Merge Enabled" + "content": "🔔 Pull Request Auto Merge Enabled" }, "template": "turquoise" }, @@ -617,7 +617,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Pull Request Demilestoned" + "content": "🔔 Pull Request Demilestoned" }, "template": "turquoise" }, @@ -663,7 +663,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Pull Request Dequeued" + "content": "🔔 Pull Request Dequeued" }, "template": "turquoise" }, @@ -709,7 +709,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Pull Request Edited" + "content": "🔔 Pull Request Edited" }, "template": "blue" }, @@ -755,7 +755,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Pull Request Enqueued" + "content": "🔔 Pull Request Enqueued" }, "template": "turquoise" }, @@ -801,7 +801,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Pull Request Labeled" + "content": "🔔 Pull Request Labeled" }, "template": "turquoise" }, @@ -847,7 +847,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Pull Request Locked" + "content": "🔔 Pull Request Locked" }, "template": "orange" }, @@ -893,7 +893,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Pull Request Milestoned" + "content": "🔔 Pull Request Milestoned" }, "template": "turquoise" }, @@ -939,7 +939,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Pull Request Review Request Removed" + "content": "🔔 Pull Request Review Request Removed" }, "template": "turquoise" }, @@ -985,7 +985,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Pull Request Unassigned" + "content": "🔔 Pull Request Unassigned" }, "template": "turquoise" }, @@ -1031,7 +1031,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Pull Request Unlabeled" + "content": "🔔 Pull Request Unlabeled" }, "template": "turquoise" }, @@ -1077,7 +1077,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Pull Request Unlocked" + "content": "🔔 Pull Request Unlocked" }, "template": "green" }, diff --git a/example-configs/templates/default/pull_request_review.json b/example-configs/templates/default/pull_request_review.json index d119468..1c5a9ce 100644 --- a/example-configs/templates/default/pull_request_review.json +++ b/example-configs/templates/default/pull_request_review.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcdd PR Review {{action}}: #{{pull_request.number}}" + "content": "📝 PR Review {{action}}: #{{pull_request.number}}" }, "template": "cyan" }, @@ -56,7 +56,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Pull Request Review Dismissed" + "content": "🔔 Pull Request Review Dismissed" }, "template": "orange" }, @@ -102,7 +102,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Pull Request Review Edited" + "content": "🔔 Pull Request Review Edited" }, "template": "blue" }, @@ -148,7 +148,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Pull Request Review Submitted" + "content": "🔔 Pull Request Review Submitted" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/pull_request_review_comment.json b/example-configs/templates/default/pull_request_review_comment.json index df8452c..1ec4239 100644 --- a/example-configs/templates/default/pull_request_review_comment.json +++ b/example-configs/templates/default/pull_request_review_comment.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcac PR Review Comment: #{{pull_request.number}}" + "content": "💬 PR Review Comment: #{{pull_request.number}}" }, "template": "cyan" }, @@ -56,7 +56,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Pull Request Review Comment Created" + "content": "🔔 Pull Request Review Comment Created" }, "template": "green" }, @@ -102,7 +102,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Pull Request Review Comment Deleted" + "content": "🔔 Pull Request Review Comment Deleted" }, "template": "red" }, @@ -148,7 +148,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Pull Request Review Comment Edited" + "content": "🔔 Pull Request Review Comment Edited" }, "template": "blue" }, diff --git a/example-configs/templates/default/pull_request_review_thread.json b/example-configs/templates/default/pull_request_review_thread.json index e50e9e5..45a848e 100644 --- a/example-configs/templates/default/pull_request_review_thread.json +++ b/example-configs/templates/default/pull_request_review_thread.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcac PR Review Thread {{action}}" + "content": "💬 PR Review Thread {{action}}" }, "template": "blue" }, @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Pull Request Review Thread Resolved" + "content": "🔔 Pull Request Review Thread Resolved" }, "template": "green" }, @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Pull Request Review Thread Unresolved" + "content": "🔔 Pull Request Review Thread Unresolved" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/push.json b/example-configs/templates/default/push.json index cb5896b..3f86d95 100644 --- a/example-configs/templates/default/push.json +++ b/example-configs/templates/default/push.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcbe New Push: {{repository.full_name}}" + "content": "💾 New Push: {{repository.full_name}}" }, "template": "blue" }, @@ -22,7 +22,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "{{pusher_link_md | default(pusher.name)}} pushed {{commits | length}} commits to **{{branch_name}}**\n\n**Repository:** {{repository_link_md | default('')}} \u00b7 {{branch_link_md | default('')}}\n\n**Commit messages:**\n{{commit_messages_joined | default(commit_message | default(pull_request.body | default('No commit messages'))) }}\n" + "content": "{{pusher_link_md | default(pusher.name)}} pushed {{commits | length}} commits to **{{branch_name}}**\n\n**Repository:** {{repository_link_md | default('')}} · {{branch_link_md | default('')}}\n\n**Commit messages:**\n{{commit_messages_joined | default(commit_message | default(pull_request.body | default('No commit messages'))) }}\n" } }, { @@ -56,7 +56,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udea8 Force Push: {{repository.full_name}}" + "content": "🚨 Force Push: {{repository.full_name}}" }, "template": "red" }, @@ -65,7 +65,7 @@ "tag": "div", "text": { "tag": "lark_md", - "content": "**Force push detected** by {{sender_link_md | default(sender.login)}} on **{{branch_name}}**\nThis may have rewritten history. Commits: {{commits | length}}\n\n**Repository:** {{repository_link_md | default('')}} \u00b7 {{branch_link_md | default('')}}\n\n**Commit messages:**\n{{commit_messages_joined | default(commit_message | default('No commit messages')) }}\n" + "content": "**Force push detected** by {{sender_link_md | default(sender.login)}} on **{{branch_name}}**\nThis may have rewritten history. Commits: {{commits | length}}\n\n**Repository:** {{repository_link_md | default('')}} · {{branch_link_md | default('')}}\n\n**Commit messages:**\n{{commit_messages_joined | default(commit_message | default('No commit messages')) }}\n" } }, { diff --git a/example-configs/templates/default/registry_package.json b/example-configs/templates/default/registry_package.json index 791f752..6f323aa 100644 --- a/example-configs/templates/default/registry_package.json +++ b/example-configs/templates/default/registry_package.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Registry Package Published" + "content": "🔔 Registry Package Published" }, "template": "green" }, @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ufffd Registry Package Updated" + "content": "� Registry Package Updated" }, "template": "blue" }, diff --git a/example-configs/templates/default/release.json b/example-configs/templates/default/release.json index 2c969d1..c686402 100644 --- a/example-configs/templates/default/release.json +++ b/example-configs/templates/default/release.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\ude80 Release Published" + "content": "🚀 Release Published" }, "template": "green" }, @@ -69,7 +69,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd36 Pre-release Published" + "content": "🔶 Pre-release Published" }, "template": "orange" }, @@ -89,7 +89,7 @@ "elements": [ { "tag": "plain_text", - "content": "\u26a0\ufe0f This is a pre-release version" + "content": "⚠️ This is a pre-release version" } ] }, @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udcdd Release Draft Created" + "content": "📝 Release Draft Created" }, "template": "grey" }, @@ -189,7 +189,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\uddd1\ufe0f Release Deleted" + "content": "🗑️ Release Deleted" }, "template": "red" }, @@ -230,7 +230,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\ude80 Release {{action}}" + "content": "🚀 Release {{action}}" }, "template": "green" }, @@ -276,7 +276,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Release Edited" + "content": "🔔 Release Edited" }, "template": "blue" }, @@ -322,7 +322,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Release Released" + "content": "🔔 Release Released" }, "template": "turquoise" }, @@ -368,7 +368,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Release Unpublished" + "content": "🔔 Release Unpublished" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/repository.json b/example-configs/templates/default/repository.json index 323227e..64f40ae 100644 --- a/example-configs/templates/default/repository.json +++ b/example-configs/templates/default/repository.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83c\udff7\ufe0f Repository change: {{repository.full_name}}" + "content": "🏷️ Repository change: {{repository.full_name}}" }, "template": "blue" }, @@ -56,7 +56,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Repository Archived" + "content": "🔔 Repository Archived" }, "template": "turquoise" }, @@ -102,7 +102,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Repository Created" + "content": "🔔 Repository Created" }, "template": "green" }, @@ -148,7 +148,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Repository Deleted" + "content": "🔔 Repository Deleted" }, "template": "red" }, @@ -194,7 +194,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Repository Edited" + "content": "🔔 Repository Edited" }, "template": "blue" }, @@ -240,7 +240,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Repository Privatized" + "content": "🔔 Repository Privatized" }, "template": "turquoise" }, @@ -286,7 +286,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Repository Publicized" + "content": "🔔 Repository Publicized" }, "template": "turquoise" }, @@ -332,7 +332,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Repository Renamed" + "content": "🔔 Repository Renamed" }, "template": "turquoise" }, @@ -378,7 +378,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Repository Transferred" + "content": "🔔 Repository Transferred" }, "template": "turquoise" }, @@ -424,7 +424,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Repository Unarchived" + "content": "🔔 Repository Unarchived" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/repository_advisory.json b/example-configs/templates/default/repository_advisory.json index e282e84..cef0e53 100644 --- a/example-configs/templates/default/repository_advisory.json +++ b/example-configs/templates/default/repository_advisory.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Repository Advisory Published" + "content": "🔔 Repository Advisory Published" }, "template": "green" }, @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Repository Advisory Reported" + "content": "🔔 Repository Advisory Reported" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/repository_dispatch.json b/example-configs/templates/default/repository_dispatch.json index 8f41b43..0f2cb68 100644 --- a/example-configs/templates/default/repository_dispatch.json +++ b/example-configs/templates/default/repository_dispatch.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Repository Dispatch Event" + "content": "🔔 Repository Dispatch Event" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/repository_import.json b/example-configs/templates/default/repository_import.json index 739b2c0..ee61a05 100644 --- a/example-configs/templates/default/repository_import.json +++ b/example-configs/templates/default/repository_import.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Repository Import Event" + "content": "🔔 Repository Import Event" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/repository_ruleset.json b/example-configs/templates/default/repository_ruleset.json index 8557884..ec17868 100644 --- a/example-configs/templates/default/repository_ruleset.json +++ b/example-configs/templates/default/repository_ruleset.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Repository Ruleset Created" + "content": "🔔 Repository Ruleset Created" }, "template": "green" }, @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Repository Ruleset Deleted" + "content": "🔔 Repository Ruleset Deleted" }, "template": "red" }, @@ -105,7 +105,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Repository Ruleset Edited" + "content": "🔔 Repository Ruleset Edited" }, "template": "blue" }, diff --git a/example-configs/templates/default/repository_vulnerability_alert.json b/example-configs/templates/default/repository_vulnerability_alert.json index 648abbd..0c1d665 100644 --- a/example-configs/templates/default/repository_vulnerability_alert.json +++ b/example-configs/templates/default/repository_vulnerability_alert.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Repository Vulnerability Alert Create" + "content": "🔔 Repository Vulnerability Alert Create" }, "template": "turquoise" }, @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Repository Vulnerability Alert Dismiss" + "content": "🔔 Repository Vulnerability Alert Dismiss" }, "template": "turquoise" }, @@ -105,7 +105,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Repository Vulnerability Alert Reopen" + "content": "🔔 Repository Vulnerability Alert Reopen" }, "template": "turquoise" }, @@ -151,7 +151,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Repository Vulnerability Alert Resolve" + "content": "🔔 Repository Vulnerability Alert Resolve" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/secret_scanning_alert.json b/example-configs/templates/default/secret_scanning_alert.json index 938527f..e238221 100644 --- a/example-configs/templates/default/secret_scanning_alert.json +++ b/example-configs/templates/default/secret_scanning_alert.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd10 Secret Scanning Alert {{action}}" + "content": "🔐 Secret Scanning Alert {{action}}" }, "template": "red" }, @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Secret Scanning Alert Created" + "content": "🔔 Secret Scanning Alert Created" }, "template": "green" }, @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Secret Scanning Alert Publicly Leaked" + "content": "🔔 Secret Scanning Alert Publicly Leaked" }, "template": "turquoise" }, @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Secret Scanning Alert Reopened" + "content": "🔔 Secret Scanning Alert Reopened" }, "template": "orange" }, @@ -180,7 +180,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Secret Scanning Alert Resolved" + "content": "🔔 Secret Scanning Alert Resolved" }, "template": "green" }, @@ -226,7 +226,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Secret Scanning Alert Validated" + "content": "🔔 Secret Scanning Alert Validated" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/secret_scanning_alert_location.json b/example-configs/templates/default/secret_scanning_alert_location.json index 0cb3a43..b1a3744 100644 --- a/example-configs/templates/default/secret_scanning_alert_location.json +++ b/example-configs/templates/default/secret_scanning_alert_location.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Secret Scanning Alert Location Created" + "content": "🔔 Secret Scanning Alert Location Created" }, "template": "green" }, diff --git a/example-configs/templates/default/secret_scanning_scan.json b/example-configs/templates/default/secret_scanning_scan.json index dd1222a..b5aeeb7 100644 --- a/example-configs/templates/default/secret_scanning_scan.json +++ b/example-configs/templates/default/secret_scanning_scan.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Secret Scanning Scan Completed" + "content": "🔔 Secret Scanning Scan Completed" }, "template": "green" }, diff --git a/example-configs/templates/default/security_advisory.json b/example-configs/templates/default/security_advisory.json index 4dd063c..1ad43b4 100644 --- a/example-configs/templates/default/security_advisory.json +++ b/example-configs/templates/default/security_advisory.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd12 Security Advisory: {{action}}" + "content": "🔒 Security Advisory: {{action}}" }, "template": "red" }, @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Security Advisory Published" + "content": "🔔 Security Advisory Published" }, "template": "green" }, @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Security Advisory Updated" + "content": "🔔 Security Advisory Updated" }, "template": "blue" }, @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Security Advisory Withdrawn" + "content": "🔔 Security Advisory Withdrawn" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/security_and_analysis.json b/example-configs/templates/default/security_and_analysis.json index 0da5cf3..2005240 100644 --- a/example-configs/templates/default/security_and_analysis.json +++ b/example-configs/templates/default/security_and_analysis.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Security And Analysis Event" + "content": "🔔 Security And Analysis Event" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/sponsorship.json b/example-configs/templates/default/sponsorship.json index 17a798a..90710dd 100644 --- a/example-configs/templates/default/sponsorship.json +++ b/example-configs/templates/default/sponsorship.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udc96 New Sponsor!" + "content": "💖 New Sponsor!" }, "template": "pink" }, @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udc96 Sponsorship {{action}}" + "content": "💖 Sponsorship {{action}}" }, "template": "blue" }, @@ -71,7 +71,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Sponsorship Cancelled" + "content": "🔔 Sponsorship Cancelled" }, "template": "orange" }, @@ -117,7 +117,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Sponsorship Edited" + "content": "🔔 Sponsorship Edited" }, "template": "blue" }, @@ -163,7 +163,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Sponsorship Pending Cancellation" + "content": "🔔 Sponsorship Pending Cancellation" }, "template": "yellow" }, @@ -209,7 +209,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Sponsorship Pending Tier Change" + "content": "🔔 Sponsorship Pending Tier Change" }, "template": "yellow" }, @@ -255,7 +255,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Sponsorship Tier Changed" + "content": "🔔 Sponsorship Tier Changed" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/star.json b/example-configs/templates/default/star.json index f45b0ec..8b2b87b 100644 --- a/example-configs/templates/default/star.json +++ b/example-configs/templates/default/star.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2b50 {{action}} by {{sender_name | default(sender.login)}}" + "content": "⭐ {{action}} by {{sender_name | default(sender.login)}}" }, "template": "yellow" }, @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Star Created" + "content": "🔔 Star Created" }, "template": "green" }, @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Star Deleted" + "content": "🔔 Star Deleted" }, "template": "red" }, diff --git a/example-configs/templates/default/status.json b/example-configs/templates/default/status.json index 1b6370c..6d90c09 100644 --- a/example-configs/templates/default/status.json +++ b/example-configs/templates/default/status.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd01 Status update: {{state}}" + "content": "🔁 Status update: {{state}}" }, "template": "gray" }, diff --git a/example-configs/templates/default/sub_issues.json b/example-configs/templates/default/sub_issues.json index 90801c4..da3ee31 100644 --- a/example-configs/templates/default/sub_issues.json +++ b/example-configs/templates/default/sub_issues.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Sub Issues Parent Issue Added" + "content": "🔔 Sub Issues Parent Issue Added" }, "template": "turquoise" }, @@ -59,7 +59,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Sub Issues Parent Issue Removed" + "content": "🔔 Sub Issues Parent Issue Removed" }, "template": "turquoise" }, @@ -105,7 +105,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Sub Issues Sub Issue Added" + "content": "🔔 Sub Issues Sub Issue Added" }, "template": "turquoise" }, @@ -151,7 +151,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Sub Issues Sub Issue Removed" + "content": "🔔 Sub Issues Sub Issue Removed" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/team.json b/example-configs/templates/default/team.json index 591380e..22656df 100644 --- a/example-configs/templates/default/team.json +++ b/example-configs/templates/default/team.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udc65 Team event: {{action}} {{team.name}}" + "content": "👥 Team event: {{action}} {{team.name}}" }, "template": "blue" }, @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Team Added To Repository" + "content": "🔔 Team Added To Repository" }, "template": "turquoise" }, @@ -88,7 +88,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Team Created" + "content": "🔔 Team Created" }, "template": "green" }, @@ -134,7 +134,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Team Deleted" + "content": "🔔 Team Deleted" }, "template": "red" }, @@ -180,7 +180,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Team Edited" + "content": "🔔 Team Edited" }, "template": "blue" }, @@ -226,7 +226,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Team Removed From Repository" + "content": "🔔 Team Removed From Repository" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/team_add.json b/example-configs/templates/default/team_add.json index 6301eff..a0487ac 100644 --- a/example-configs/templates/default/team_add.json +++ b/example-configs/templates/default/team_add.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Team Add Event" + "content": "🔔 Team Add Event" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/watch.json b/example-configs/templates/default/watch.json index 6c4bbf1..b5efa6f 100644 --- a/example-configs/templates/default/watch.json +++ b/example-configs/templates/default/watch.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Watch: {{action}} by {{sender_name | default(sender.login)}}" + "content": "🔔 Watch: {{action}} by {{sender_name | default(sender.login)}}" }, "template": "yellow" }, @@ -42,7 +42,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Watch Started" + "content": "🔔 Watch Started" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/workflow_dispatch.json b/example-configs/templates/default/workflow_dispatch.json index b6eb829..5b2417a 100644 --- a/example-configs/templates/default/workflow_dispatch.json +++ b/example-configs/templates/default/workflow_dispatch.json @@ -13,7 +13,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Workflow Dispatch Event" + "content": "🔔 Workflow Dispatch Event" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/workflow_job.json b/example-configs/templates/default/workflow_job.json index 072c2fa..a38af9b 100644 --- a/example-configs/templates/default/workflow_job.json +++ b/example-configs/templates/default/workflow_job.json @@ -14,7 +14,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2705 Job succeeded: {{job_name}}" + "content": "✅ Job succeeded: {{job_name}}" }, "template": "green" }, @@ -58,7 +58,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u274c Job failed: {{job_name}}" + "content": "❌ Job failed: {{job_name}}" }, "template": "red" }, @@ -101,7 +101,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2699\ufe0f Job {{action}}: {{job_name}}" + "content": "⚙️ Job {{action}}: {{job_name}}" }, "template": "blue" }, @@ -130,7 +130,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Workflow Job In Progress" + "content": "🔔 Workflow Job In Progress" }, "template": "blue" }, @@ -176,7 +176,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Workflow Job Queued" + "content": "🔔 Workflow Job Queued" }, "template": "turquoise" }, @@ -222,7 +222,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Workflow Job Waiting" + "content": "🔔 Workflow Job Waiting" }, "template": "turquoise" }, diff --git a/example-configs/templates/default/workflow_run.json b/example-configs/templates/default/workflow_run.json index 7db0350..495ba16 100644 --- a/example-configs/templates/default/workflow_run.json +++ b/example-configs/templates/default/workflow_run.json @@ -14,7 +14,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2705 Workflow Succeeded" + "content": "✅ Workflow Succeeded" }, "template": "green" }, @@ -34,7 +34,7 @@ "elements": [ { "tag": "plain_text", - "content": "\u2705 All checks passed" + "content": "✅ All checks passed" } ] }, @@ -70,7 +70,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u274c Workflow Failed" + "content": "❌ Workflow Failed" }, "template": "red" }, @@ -90,7 +90,7 @@ "elements": [ { "tag": "plain_text", - "content": "\u274c Workflow execution failed" + "content": "❌ Workflow execution failed" } ] }, @@ -126,7 +126,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u26a0\ufe0f Workflow Cancelled" + "content": "⚠️ Workflow Cancelled" }, "template": "yellow" }, @@ -181,7 +181,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u23f3 Workflow Running" + "content": "⏳ Workflow Running" }, "template": "blue" }, @@ -201,7 +201,7 @@ "elements": [ { "tag": "plain_text", - "content": "\u23f3 Workflow is currently running..." + "content": "⏳ Workflow is currently running..." } ] }, @@ -236,7 +236,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\u2699\ufe0f Workflow {{action}}" + "content": "⚙️ Workflow {{action}}" }, "template": "purple" }, @@ -282,7 +282,7 @@ "header": { "title": { "tag": "plain_text", - "content": "\ud83d\udd14 Workflow Run Requested" + "content": "🔔 Workflow Run Requested" }, "template": "orange" }, From 1fb677d7ac8f4cea721f52f3a537548fb2e49a9f Mon Sep 17 00:00:00 2001 From: Robert He Date: Sat, 1 Aug 2026 12:38:57 +0800 Subject: [PATCH 06/22] chore: update Go version to 1.23 and upgrade action versions in workflows --- .github/actions/setup-go/action.yml | 6 +++--- .github/workflows/ci.yml | 12 ++++++------ .github/workflows/release.yml | 26 +++++++++++++------------- .github/workflows/sync-develop.yml | 2 +- Dockerfile | 2 +- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/actions/setup-go/action.yml b/.github/actions/setup-go/action.yml index 3d129a7..1dc0b35 100644 --- a/.github/actions/setup-go/action.yml +++ b/.github/actions/setup-go/action.yml @@ -4,13 +4,13 @@ inputs: go-version: description: "Go version to use" required: false - default: "1.21" + default: "1.23" runs: using: "composite" steps: - name: Set up Go - uses: actions/setup-go@v5 + uses: actions/setup-go@v6 with: go-version: ${{ inputs.go-version }} @@ -27,7 +27,7 @@ runs: mkdir -p "${RUNNER_TEMP}/gomodcache_cache" - name: Cache Go modules - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | ${{ steps.cacheprep.outputs.cache_tmp }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3af1d78..f87cc40 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,12 +21,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Setup Go with cache uses: ./.github/actions/setup-go with: - go-version: "1.21" + go-version: "1.23" - name: Run tests run: go test -v ./... @@ -44,7 +44,7 @@ jobs: packages: write steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Set image tag id: tag @@ -57,17 +57,17 @@ jobs: fi - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v4 - name: Log in to GitHub Container Registry - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: provenance: false # Disable provenance to avoid unknown/unknown sbom: false # Disable sbom to avoid unknown/unknown diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 92f21ee..03d6082 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: tag: ${{ steps.create_tag.outputs.tag }} steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 @@ -48,14 +48,14 @@ jobs: if: always() && !cancelled() && !failure() steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: ref: ${{ needs.create-tag.outputs.tag || github.ref }} - name: Setup Go with cache uses: ./.github/actions/setup-go with: - go-version: "1.21" + go-version: "1.23" - name: Run tests run: go test -v ./... @@ -70,14 +70,14 @@ jobs: if: always() && !cancelled() && needs.test.result == 'success' steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: ref: ${{ needs.create-tag.outputs.tag || github.ref }} - name: Setup Go with cache uses: ./.github/actions/setup-go with: - go-version: "1.21" + go-version: "1.23" - name: Get version id: version @@ -93,7 +93,7 @@ jobs: run: go build -v -ldflags "-X main.Version=${{ steps.version.outputs.version }}" -o bin/feishu-github-tracker ./cmd/feishu-github-tracker - name: Upload artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: feishu-github-tracker-binary-${{ steps.version.outputs.version }} path: bin/feishu-github-tracker @@ -109,7 +109,7 @@ jobs: packages: write steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: ref: ${{ needs.create-tag.outputs.tag || github.ref }} @@ -134,17 +134,17 @@ jobs: echo "tags=${TAGS}" >> $GITHUB_OUTPUT - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v4 - name: Log in to GitHub Container Registry - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: provenance: false sbom: false @@ -165,7 +165,7 @@ jobs: contents: write steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: ref: ${{ needs.create-tag.outputs.tag || github.ref }} fetch-depth: 0 @@ -181,7 +181,7 @@ jobs: echo "version=${VERSION}" >> $GITHUB_OUTPUT - name: Download binary artifact - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 with: name: feishu-github-tracker-binary-${{ steps.version.outputs.version }} path: ./release @@ -208,7 +208,7 @@ jobs: fi - name: Create Release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 with: tag_name: ${{ steps.version.outputs.version }} name: Release ${{ steps.version.outputs.version }} diff --git a/.github/workflows/sync-develop.yml b/.github/workflows/sync-develop.yml index 4070bc8..8e93dbd 100644 --- a/.github/workflows/sync-develop.yml +++ b/.github/workflows/sync-develop.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: # 获取完整的 git 历史,以便进行分支操作 fetch-depth: 0 diff --git a/Dockerfile b/Dockerfile index 0864309..2d4fcaa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build stage -FROM golang:1.21-alpine AS builder +FROM golang:1.23-alpine AS builder # Install build dependencies RUN apk add --no-cache git ca-certificates tzdata From 196df1de54f6564df09b8fa05262b2942f1529aa Mon Sep 17 00:00:00 2001 From: Robert He Date: Sat, 1 Aug 2026 13:23:11 +0800 Subject: [PATCH 07/22] ci: upgrade action ver --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f87cc40..a0eeb51 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v6 + uses: docker/build-push-action@v7 with: provenance: false # Disable provenance to avoid unknown/unknown sbom: false # Disable sbom to avoid unknown/unknown diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 03d6082..5b36fa5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -144,7 +144,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v6 + uses: docker/build-push-action@v7 with: provenance: false sbom: false From dcb0dc4549f1d1329a8fe9c2824e9c7f9c78b4a8 Mon Sep 17 00:00:00 2001 From: Robert He Date: Sat, 1 Aug 2026 13:36:41 +0800 Subject: [PATCH 08/22] chore: migration goes first --- cmd/feishu-github-tracker/main.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/cmd/feishu-github-tracker/main.go b/cmd/feishu-github-tracker/main.go index c71772d..76c4461 100644 --- a/cmd/feishu-github-tracker/main.go +++ b/cmd/feishu-github-tracker/main.go @@ -38,6 +38,15 @@ func main() { configDir = filepath.Join(filepath.Dir(execPath), "configs") } + // Auto-migrate legacy flat-file configs FIRST, BEFORE seeding defaults. + // If old files (repos.yaml, events.yaml, etc.) exist, they are moved to + // legacy/ and split into the new per-item layout. This must run before + // initializeConfigDir so the user's existing config isn't overwritten by + // the example-configs defaults. + if err := config.Migrate(configDir); err != nil { + fmt.Fprintf(os.Stderr, "Config migration warning: %v (continuing)\n", err) + } + if defaultConfigDir := os.Getenv("DEFAULT_CONFIG_DIR"); defaultConfigDir != "" { if err := initializeConfigDir(defaultConfigDir, configDir); err != nil { fmt.Fprintf(os.Stderr, "Failed to initialize configuration: %v\n", err) @@ -45,12 +54,6 @@ func main() { } } - // Auto-migrate legacy flat-file configs to the new per-item subdirectory - // layout. Old files are backed up to legacy/ intact. - if err := config.Migrate(configDir); err != nil { - fmt.Fprintf(os.Stderr, "Config migration warning: %v (continuing)\n", err) - } - // Load configuration cfg, err := config.Load(configDir) if err != nil { From 31dde4ed6975840349f53dd649e39d894cbee2e3 Mon Sep 17 00:00:00 2001 From: Robert He Date: Sat, 1 Aug 2026 13:49:11 +0800 Subject: [PATCH 09/22] refactor: update event file handling and UI for event sets and definitions --- .../events/definitions/create.yaml | 1 - .../events/definitions/delete.yaml | 1 - .../events/definitions/deployment.yaml | 1 - .../events/definitions/deployment_status.yaml | 1 - example-configs/events/definitions/fork.yaml | 1 - .../events/definitions/gollum.yaml | 1 - .../events/definitions/page_build.yaml | 1 - example-configs/events/definitions/ping.yaml | 1 - .../events/definitions/public.yaml | 1 - .../definitions/repository_dispatch.yaml | 1 - .../events/definitions/repository_import.yaml | 1 - .../definitions/security_and_analysis.yaml | 1 - .../events/definitions/status.yaml | 1 - .../events/definitions/team_add.yaml | 1 - .../events/definitions/workflow_dispatch.yaml | 1 - example-configs/events/event_sets/all.yaml | 154 +++++++------- example-configs/events/event_sets/basic.yaml | 20 +- example-configs/events/event_sets/org.yaml | 40 ++-- internal/config/migrate.go | 8 +- internal/panel/app.go | 3 + internal/panel/handlers_events.go | 200 +++++++++++++++++- internal/panel/templates/events.html | 78 ++++++- 22 files changed, 378 insertions(+), 140 deletions(-) diff --git a/example-configs/events/definitions/create.yaml b/example-configs/events/definitions/create.yaml index 19765bd..e69de29 100644 --- a/example-configs/events/definitions/create.yaml +++ b/example-configs/events/definitions/create.yaml @@ -1 +0,0 @@ -null diff --git a/example-configs/events/definitions/delete.yaml b/example-configs/events/definitions/delete.yaml index 19765bd..e69de29 100644 --- a/example-configs/events/definitions/delete.yaml +++ b/example-configs/events/definitions/delete.yaml @@ -1 +0,0 @@ -null diff --git a/example-configs/events/definitions/deployment.yaml b/example-configs/events/definitions/deployment.yaml index 19765bd..e69de29 100644 --- a/example-configs/events/definitions/deployment.yaml +++ b/example-configs/events/definitions/deployment.yaml @@ -1 +0,0 @@ -null diff --git a/example-configs/events/definitions/deployment_status.yaml b/example-configs/events/definitions/deployment_status.yaml index 19765bd..e69de29 100644 --- a/example-configs/events/definitions/deployment_status.yaml +++ b/example-configs/events/definitions/deployment_status.yaml @@ -1 +0,0 @@ -null diff --git a/example-configs/events/definitions/fork.yaml b/example-configs/events/definitions/fork.yaml index 19765bd..e69de29 100644 --- a/example-configs/events/definitions/fork.yaml +++ b/example-configs/events/definitions/fork.yaml @@ -1 +0,0 @@ -null diff --git a/example-configs/events/definitions/gollum.yaml b/example-configs/events/definitions/gollum.yaml index 19765bd..e69de29 100644 --- a/example-configs/events/definitions/gollum.yaml +++ b/example-configs/events/definitions/gollum.yaml @@ -1 +0,0 @@ -null diff --git a/example-configs/events/definitions/page_build.yaml b/example-configs/events/definitions/page_build.yaml index 19765bd..e69de29 100644 --- a/example-configs/events/definitions/page_build.yaml +++ b/example-configs/events/definitions/page_build.yaml @@ -1 +0,0 @@ -null diff --git a/example-configs/events/definitions/ping.yaml b/example-configs/events/definitions/ping.yaml index 19765bd..e69de29 100644 --- a/example-configs/events/definitions/ping.yaml +++ b/example-configs/events/definitions/ping.yaml @@ -1 +0,0 @@ -null diff --git a/example-configs/events/definitions/public.yaml b/example-configs/events/definitions/public.yaml index 19765bd..e69de29 100644 --- a/example-configs/events/definitions/public.yaml +++ b/example-configs/events/definitions/public.yaml @@ -1 +0,0 @@ -null diff --git a/example-configs/events/definitions/repository_dispatch.yaml b/example-configs/events/definitions/repository_dispatch.yaml index 19765bd..e69de29 100644 --- a/example-configs/events/definitions/repository_dispatch.yaml +++ b/example-configs/events/definitions/repository_dispatch.yaml @@ -1 +0,0 @@ -null diff --git a/example-configs/events/definitions/repository_import.yaml b/example-configs/events/definitions/repository_import.yaml index 19765bd..e69de29 100644 --- a/example-configs/events/definitions/repository_import.yaml +++ b/example-configs/events/definitions/repository_import.yaml @@ -1 +0,0 @@ -null diff --git a/example-configs/events/definitions/security_and_analysis.yaml b/example-configs/events/definitions/security_and_analysis.yaml index 19765bd..e69de29 100644 --- a/example-configs/events/definitions/security_and_analysis.yaml +++ b/example-configs/events/definitions/security_and_analysis.yaml @@ -1 +0,0 @@ -null diff --git a/example-configs/events/definitions/status.yaml b/example-configs/events/definitions/status.yaml index 19765bd..e69de29 100644 --- a/example-configs/events/definitions/status.yaml +++ b/example-configs/events/definitions/status.yaml @@ -1 +0,0 @@ -null diff --git a/example-configs/events/definitions/team_add.yaml b/example-configs/events/definitions/team_add.yaml index 19765bd..e69de29 100644 --- a/example-configs/events/definitions/team_add.yaml +++ b/example-configs/events/definitions/team_add.yaml @@ -1 +0,0 @@ -null diff --git a/example-configs/events/definitions/workflow_dispatch.yaml b/example-configs/events/definitions/workflow_dispatch.yaml index 19765bd..e69de29 100644 --- a/example-configs/events/definitions/workflow_dispatch.yaml +++ b/example-configs/events/definitions/workflow_dispatch.yaml @@ -1 +0,0 @@ -null diff --git a/example-configs/events/event_sets/all.yaml b/example-configs/events/event_sets/all.yaml index f0c0239..07dc5ed 100644 --- a/example-configs/events/event_sets/all.yaml +++ b/example-configs/events/event_sets/all.yaml @@ -1,77 +1,77 @@ -branch_protection_configuration: null -branch_protection_rule: null -branches: null -check_run: null -check_suite: null -code_scanning_alert: null -commit_comment: null -create: null -custom_property: null -custom_property_values: null -delete: null -dependabot_alert: null -deploy_key: null -deployment: null -deployment_protection_rule: null -deployment_review: null -deployment_status: null -discussion: null -discussion_comment: null -fork: null -github_app_authorization: null -gollum: null -installation: null -installation_repositories: null -installation_target: null -issue_comment: null -issue_dependencies: null -issues: null -label: null -marketplace_purchase: null -member: null -membership: null -merge_group: null -meta: null -milestone: null -org_block: null -organization: null -package: null -page_build: null -personal_access_token_request: null -ping: null -project: null -project_card: null -project_column: null -projects_v2: null -projects_v2_item: null -projects_v2_status_update: null -public: null -pull_request: null -pull_request_review: null -pull_request_review_comment: null -pull_request_review_thread: null -push: null -registry_package: null -release: null -repository: null -repository_advisory: null -repository_dispatch: null -repository_import: null -repository_ruleset: null -repository_vulnerability_alert: null -secret_scanning_alert: null -secret_scanning_alert_location: null -secret_scanning_scan: null -security_advisory: null -security_and_analysis: null -sponsorship: null -star: null -status: null -sub_issues: null -team: null -team_add: null -types: null -watch: null -workflow_dispatch: null -workflow_job: null -workflow_run: null +branch_protection_configuration: +branch_protection_rule: +branches: +check_run: +check_suite: +code_scanning_alert: +commit_comment: +create: +custom_property: +custom_property_values: +delete: +dependabot_alert: +deploy_key: +deployment: +deployment_protection_rule: +deployment_review: +deployment_status: +discussion: +discussion_comment: +fork: +github_app_authorization: +gollum: +installation: +installation_repositories: +installation_target: +issue_comment: +issue_dependencies: +issues: +label: +marketplace_purchase: +member: +membership: +merge_group: +meta: +milestone: +org_block: +organization: +package: +page_build: +personal_access_token_request: +ping: +project: +project_card: +project_column: +projects_v2: +projects_v2_item: +projects_v2_status_update: +public: +pull_request: +pull_request_review: +pull_request_review_comment: +pull_request_review_thread: +push: +registry_package: +release: +repository: +repository_advisory: +repository_dispatch: +repository_import: +repository_ruleset: +repository_vulnerability_alert: +secret_scanning_alert: +secret_scanning_alert_location: +secret_scanning_scan: +security_advisory: +security_and_analysis: +sponsorship: +star: +status: +sub_issues: +team: +team_add: +types: +watch: +workflow_dispatch: +workflow_job: +workflow_run: diff --git a/example-configs/events/event_sets/basic.yaml b/example-configs/events/event_sets/basic.yaml index 7be6c26..2f4c070 100644 --- a/example-configs/events/event_sets/basic.yaml +++ b/example-configs/events/event_sets/basic.yaml @@ -1,10 +1,10 @@ -discussion: null -discussion_comment: null -issue_comment: null -issues: null -package: null -pull_request: null -pull_request_review: null -pull_request_review_comment: null -push: null -release: null +discussion: +discussion_comment: +issue_comment: +issues: +package: +pull_request: +pull_request_review: +pull_request_review_comment: +push: +release: diff --git a/example-configs/events/event_sets/org.yaml b/example-configs/events/event_sets/org.yaml index f13a525..d66c5a2 100644 --- a/example-configs/events/event_sets/org.yaml +++ b/example-configs/events/event_sets/org.yaml @@ -1,20 +1,20 @@ -organization: null -org_block: null -team: null -team_add: null -member: null -membership: null -repository: null -repository_vulnerability_alert: null -secret_scanning_alert: null -secret_scanning_alert_location: null -security_advisory: null -security_and_analysis: null -github_app_authorization: null -installation: null -installation_repositories: null -installation_target: null -marketplace_purchase: null -sponsorship: null -personal_access_token_request: null -meta: null +organization: +org_block: +team: +team_add: +member: +membership: +repository: +repository_vulnerability_alert: +secret_scanning_alert: +secret_scanning_alert_location: +security_advisory: +security_and_analysis: +github_app_authorization: +installation: +installation_repositories: +installation_target: +marketplace_purchase: +sponsorship: +personal_access_token_request: +meta: diff --git a/internal/config/migrate.go b/internal/config/migrate.go index 0fcdc34..d31c880 100644 --- a/internal/config/migrate.go +++ b/internal/config/migrate.go @@ -287,7 +287,9 @@ func nodePattern(n *yaml.Node) string { } // marshalYAMLNode encodes a yaml.Node with 2-space indent, preserving all -// attached comments (HeadComment, LineComment, FootComment). +// attached comments (HeadComment, LineComment, FootComment). Also strips +// trailing ": null" → ":" for cosmetic compatibility (Go's yaml.v3 writes +// `key: null` for nil values; the original files used `key:`). func marshalYAMLNode(n *yaml.Node) ([]byte, error) { var buf strings.Builder enc := yaml.NewEncoder(&buf) @@ -298,7 +300,9 @@ func marshalYAMLNode(n *yaml.Node) ([]byte, error) { if err := enc.Close(); err != nil { return nil, err } - return []byte(buf.String()), nil + // Strip ": null\n" → ":\n" for cosmetic compatibility + out := strings.ReplaceAll(buf.String(), ": null\n", ":\n") + return []byte(out), nil } // ── Generic helpers ── diff --git a/internal/panel/app.go b/internal/panel/app.go index 89e6b74..f81e5d4 100644 --- a/internal/panel/app.go +++ b/internal/panel/app.go @@ -87,6 +87,7 @@ type ViewData struct { // events EventSetsYAML string EventsYAML string + EventFiles []EventFileRow // templates TemplateFilesList []TemplateFileRow @@ -295,6 +296,8 @@ func (a *App) routes() http.Handler { mux.HandleFunc("/events", a.requireAuth(a.handleEvents)) mux.HandleFunc("/events/save", a.requireAuth(a.handleEventsSave)) + mux.HandleFunc("/events/create", a.requireAuth(a.handleEventsCreateFile)) + mux.HandleFunc("/events/delete", a.requireAuth(a.handleEventsDeleteFile)) mux.HandleFunc("/templates", a.requireAuth(a.handleTemplatesList)) mux.HandleFunc("/templates/edit", a.requireAuth(a.handleTemplateEdit)) diff --git a/internal/panel/handlers_events.go b/internal/panel/handlers_events.go index d761754..f99ad83 100644 --- a/internal/panel/handlers_events.go +++ b/internal/panel/handlers_events.go @@ -3,40 +3,218 @@ package panel import ( "net/http" "os" + "path/filepath" + "sort" + "strings" - "github.com/hnrobert/feishu-github-tracker/internal/config" "gopkg.in/yaml.v3" ) -// handleEvents shows the raw events.yaml in an editor. The whole file is -// edited as text so comments and ordering are preserved exactly. +// EventFileRow represents one editable events file. +type EventFileRow struct { + Name string // file name without extension + Content string // raw file content (preserves comments) + Section string // "event_sets" or "definitions" +} + +// handleEvents shows event sets and definitions as per-file editors. func (a *App) handleEvents(w http.ResponseWriter, r *http.Request) { data := a.baseData(r) - if b, err := os.ReadFile(a.cfgDir + "/events.yaml"); err == nil { - data.EventsYAML = string(b) + + // Try new split layout first + esDir := filepath.Join(a.cfgDir, "events", "event_sets") + defDir := filepath.Join(a.cfgDir, "events", "definitions") + + var rows []EventFileRow + rows = append(rows, a.readEventFiles(esDir, "event_sets")...) + rows = append(rows, a.readEventFiles(defDir, "definitions")...) + + if len(rows) == 0 { + // Fallback: legacy single events.yaml + if b, err := os.ReadFile(filepath.Join(a.cfgDir, "events.yaml")); err == nil { + rows = append(rows, EventFileRow{ + Name: "events", + Content: string(b), + Section: "legacy", + }) + } } + + data.EventFiles = rows a.renderPage(w, "events", data) } -// handleEventsSave validates the edited events.yaml (by parsing it) and, if -// valid, writes the raw text back verbatim. +func (a *App) readEventFiles(dir, section string) []EventFileRow { + entries, err := os.ReadDir(dir) + if err != nil { + return nil + } + var rows []EventFileRow + for _, e := range entries { + if e.IsDir() || !strings.HasSuffix(e.Name(), ".yaml") { + continue + } + name := strings.TrimSuffix(e.Name(), ".yaml") + b, err := os.ReadFile(filepath.Join(dir, e.Name())) + if err != nil { + continue + } + rows = append(rows, EventFileRow{ + Name: name, + Content: string(b), + Section: section, + }) + } + sort.Slice(rows, func(i, j int) bool { return rows[i].Name < rows[j].Name }) + return rows +} + +// handleEventsSave writes one event file (identified by section + name). +// Content is written verbatim (preserving comments). YAML is validated. func (a *App) handleEventsSave(w http.ResponseWriter, r *http.Request) { if err := r.ParseForm(); err != nil { a.redirectFlash(w, r, "/events", a.message(r, "flash.invalidForm"), "err") return } - text := r.FormValue("events_yaml") - var check config.EventsConfig - if err := yaml.Unmarshal([]byte(text), &check); err != nil { + section := r.FormValue("section") + name := r.FormValue("name") + content := r.FormValue("content") + + // Determine target directory + var dir string + switch section { + case "event_sets": + dir = filepath.Join(a.cfgDir, "events", "event_sets") + case "definitions": + dir = filepath.Join(a.cfgDir, "events", "definitions") + case "legacy": + // Legacy single-file mode + if err := validateYAML(content); err != nil { + a.redirectFlash(w, r, "/events", a.message(r, "flash.eventsParseFailed", err), "err") + return + } + if err := os.WriteFile(filepath.Join(a.cfgDir, "events.yaml"), []byte(content), 0o644); err != nil { + a.redirectFlash(w, r, "/events", a.message(r, "flash.saveFailed", err), "err") + return + } + a.notifySaved() + a.redirectFlash(w, r, "/events", a.message(r, "flash.eventsSaved"), "ok") + return + default: + a.redirectFlash(w, r, "/events", "invalid section", "err") + return + } + + // Sanitize filename + safe := sanitizeEventFilename(name) + if safe == "" { + a.redirectFlash(w, r, "/events", "invalid name", "err") + return + } + + // Validate YAML + if err := validateYAML(content); err != nil { a.redirectFlash(w, r, "/events", a.message(r, "flash.eventsParseFailed", err), "err") return } - if err := os.WriteFile(a.cfgDir+"/events.yaml", []byte(text), 0o644); err != nil { + // Write verbatim (preserves comments) + path := filepath.Join(dir, safe+".yaml") + if err := os.MkdirAll(dir, 0o755); err != nil { + a.redirectFlash(w, r, "/events", a.message(r, "flash.saveFailed", err), "err") + return + } + if err := os.WriteFile(path, []byte(content), 0o644); err != nil { a.redirectFlash(w, r, "/events", a.message(r, "flash.saveFailed", err), "err") return } a.notifySaved() a.redirectFlash(w, r, "/events", a.message(r, "flash.eventsSaved"), "ok") } + +// handleEventsCreateFile creates a new event_set or definition file. +func (a *App) handleEventsCreateFile(w http.ResponseWriter, r *http.Request) { + if err := r.ParseForm(); err != nil { + a.redirectFlash(w, r, "/events", a.message(r, "flash.invalidForm"), "err") + return + } + section := r.FormValue("section") + name := sanitizeEventFilename(r.FormValue("name")) + if name == "" { + a.redirectFlash(w, r, "/events", "name required", "err") + return + } + + var dir string + switch section { + case "event_sets": + dir = filepath.Join(a.cfgDir, "events", "event_sets") + case "definitions": + dir = filepath.Join(a.cfgDir, "events", "definitions") + default: + a.redirectFlash(w, r, "/events", "invalid section", "err") + return + } + + path := filepath.Join(dir, name+".yaml") + if _, err := os.Stat(path); err == nil { + a.redirectFlash(w, r, "/events", "file already exists", "err") + return + } + + if err := os.MkdirAll(dir, 0o755); err != nil { + a.redirectFlash(w, r, "/events", a.message(r, "flash.saveFailed", err), "err") + return + } + if err := os.WriteFile(path, []byte(""), 0o644); err != nil { + a.redirectFlash(w, r, "/events", a.message(r, "flash.saveFailed", err), "err") + return + } + a.notifySaved() + a.redirectFlash(w, r, "/events", "file created", "ok") +} + +// handleEventsDeleteFile deletes an event file. +func (a *App) handleEventsDeleteFile(w http.ResponseWriter, r *http.Request) { + if err := r.ParseForm(); err != nil { + a.redirectFlash(w, r, "/events", a.message(r, "flash.invalidForm"), "err") + return + } + section := r.FormValue("section") + name := sanitizeEventFilename(r.FormValue("name")) + + var dir string + switch section { + case "event_sets": + dir = filepath.Join(a.cfgDir, "events", "event_sets") + case "definitions": + dir = filepath.Join(a.cfgDir, "events", "definitions") + default: + a.redirectFlash(w, r, "/events", "invalid section", "err") + return + } + + path := filepath.Join(dir, name+".yaml") + if err := os.Remove(path); err != nil { + a.redirectFlash(w, r, "/events", a.message(r, "flash.saveFailed", err), "err") + return + } + a.notifySaved() + a.redirectFlash(w, r, "/events", "file deleted", "ok") +} + +func validateYAML(content string) error { + var check map[string]any + return yaml.Unmarshal([]byte(content), &check) +} + +func sanitizeEventFilename(s string) string { + var b strings.Builder + for _, r := range strings.TrimSpace(s) { + if (r >= 'a' && r <= 'z') || (r >= 'A' && r <= 'Z') || (r >= '0' && r <= '9') || r == '-' || r == '_' { + b.WriteRune(r) + } + } + return b.String() +} diff --git a/internal/panel/templates/events.html b/internal/panel/templates/events.html index b571bb4..44758b5 100644 --- a/internal/panel/templates/events.html +++ b/internal/panel/templates/events.html @@ -5,12 +5,80 @@

{{t . "events.title"}}

{{t . "events.subtitle"}}
+{{$hasSets := false}} +{{$hasDefs := false}} +{{range .EventFiles}} + {{if eq .Section "event_sets"}}{{$hasSets = true}}{{end}} + {{if eq .Section "definitions"}}{{$hasDefs = true}}{{end}} +{{end}} + +{{if $hasSets}} +

{{t . "events.title"}} — Event Sets

+{{range .EventFiles}} +{{if eq .Section "event_sets"}} +
+ + +
+ {{.Name}} +
+ + +
+
+ +
+{{end}} +{{end}} + +
+ +
+
+ + +
+ +
+
+{{end}} + +{{if $hasDefs}} +

Event Definitions

+{{range .EventFiles}} +{{if eq .Section "definitions"}}
- - -
{{t . "events.preserve"}}
-
- + + +
+ {{.Name}} +
+ + +
+ {{end}} +{{end}} +{{end}} + +{{if eq (len .EventFiles) 0}} +
No events configuration found.
+{{end}} + +{{if not $hasDefs}} +{{if $hasSets}} +
+ +
+
+ + +
+ +
+
+{{end}} +{{end}} +{{end}} From e3a150b32607873df67f04df0b5d3778be950915 Mon Sep 17 00:00:00 2001 From: Robert He Date: Sat, 1 Aug 2026 13:58:37 +0800 Subject: [PATCH 10/22] refactor: improve migration logic for legacy flat-file configs --- internal/config/migrate.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/internal/config/migrate.go b/internal/config/migrate.go index d31c880..6872f81 100644 --- a/internal/config/migrate.go +++ b/internal/config/migrate.go @@ -12,16 +12,17 @@ import ( "gopkg.in/yaml.v3" ) -// Migrate detects legacy flat-file configs and migrates them to the new -// per-item subdirectory layout. Old files are moved intact to legacy/ (all -// comments preserved) and split into per-item files that also preserve -// comments via yaml.Node round-trip. This is a no-op when no legacy files -// are found or when the new dirs already have content. +// Migrate detects legacy flat-file configs in the config root and migrates +// them to the new per-item subdirectory layout. Old files are ALWAYS moved +// to legacy/ (comments preserved) and split into per-item files, regardless +// of whether the target subdirectory already exists (e.g. from +// initializeConfigDir seeding example defaults). This ensures the user's +// actual configuration is never ignored. func Migrate(configDir string) error { legacyDir := filepath.Join(configDir, "legacy") // repos.yaml → patterns/*.yaml - if fileExists(filepath.Join(configDir, "repos.yaml")) && !dirHasYAML(filepath.Join(configDir, "patterns")) { + if fileExists(filepath.Join(configDir, "repos.yaml")) { if err := ensureDir(legacyDir); err != nil { return err } @@ -31,7 +32,7 @@ func Migrate(configDir string) error { } // events.yaml → events/event_sets/*.yaml + events/definitions/*.yaml - if fileExists(filepath.Join(configDir, "events.yaml")) && !dirHasYAML(filepath.Join(configDir, "events")) { + if fileExists(filepath.Join(configDir, "events.yaml")) { if err := ensureDir(legacyDir); err != nil { return err } @@ -41,7 +42,7 @@ func Migrate(configDir string) error { } // templates.jsonc + templates.*.jsonc → templates//*.json - if fileExists(filepath.Join(configDir, "templates.jsonc")) && !dirHasContent(filepath.Join(configDir, "templates")) { + if fileExists(filepath.Join(configDir, "templates.jsonc")) { if err := ensureDir(legacyDir); err != nil { return err } From dbdbb3867f9150c8346eea538db1bc2879b70738 Mon Sep 17 00:00:00 2001 From: Robert He Date: Sat, 1 Aug 2026 17:05:00 +0800 Subject: [PATCH 11/22] fix: correct template variable usage for event actions --- internal/panel/templates/events.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/panel/templates/events.html b/internal/panel/templates/events.html index 44758b5..ff440ac 100644 --- a/internal/panel/templates/events.html +++ b/internal/panel/templates/events.html @@ -13,7 +13,7 @@

{{t . "events.title"}}

{{end}} {{if $hasSets}} -

{{t . "events.title"}} — Event Sets

+

{{t $ "events.title"}} — Event Sets

{{range .EventFiles}} {{if eq .Section "event_sets"}}
@@ -22,8 +22,8 @@

{{t . "events.title"}} — Event Sets

{{.Name}}
- - + +
@@ -38,7 +38,7 @@

{{t . "events.title"}} — Event Sets

- + {{end}} @@ -53,8 +53,8 @@

Event Definitions

{{.Name}}
- - + +
@@ -76,7 +76,7 @@

Event Definitions

- + {{end}} From 3aa7ddb0cf9330846c3ecd26ec89a09709dbf04b Mon Sep 17 00:00:00 2001 From: Robert He Date: Sat, 1 Aug 2026 17:10:15 +0800 Subject: [PATCH 12/22] fix: enhance template handling and migration logic for event payloads --- internal/config/migrate.go | 11 ++- internal/panel/handlers_templates.go | 128 ++++++++++++--------------- 2 files changed, 66 insertions(+), 73 deletions(-) diff --git a/internal/config/migrate.go b/internal/config/migrate.go index 6872f81..4f44c61 100644 --- a/internal/config/migrate.go +++ b/internal/config/migrate.go @@ -131,8 +131,12 @@ func migrateEvents(configDir, legacyDir string) error { for i := 0; i+1 < len(esMap.Content); i += 2 { keyNode := esMap.Content[i] valNode := esMap.Content[i+1] - // The key's HeadComment (or value's HeadComment) carries any - // comment above this entry. + // The comment above the key (e.g., "# custom template...") is + // stored on keyNode.HeadComment. Move it to valNode so it's + // preserved when we marshal the value as a standalone file. + if keyNode.HeadComment != "" && valNode.HeadComment == "" { + valNode.HeadComment = keyNode.HeadComment + } out, err := marshalYAMLNode(valNode) if err != nil { continue @@ -149,6 +153,9 @@ func migrateEvents(configDir, legacyDir string) error { for i := 0; i+1 < len(evMap.Content); i += 2 { keyNode := evMap.Content[i] valNode := evMap.Content[i+1] + if keyNode.HeadComment != "" && valNode.HeadComment == "" { + valNode.HeadComment = keyNode.HeadComment + } out, err := marshalYAMLNode(valNode) if err != nil { continue diff --git a/internal/panel/handlers_templates.go b/internal/panel/handlers_templates.go index 6064047..4f6a6b4 100644 --- a/internal/panel/handlers_templates.go +++ b/internal/panel/handlers_templates.go @@ -3,24 +3,23 @@ package panel import ( "encoding/json" "net/http" + "os" "path/filepath" "sort" + "strings" ) -// templateFileName maps a logical template name to its on-disk file name. -// "default" -> templates.jsonc; anything else -> templates..jsonc. -func templateFileName(name string) string { - if name == "" || name == "default" { - return "templates.jsonc" - } - return "templates." + name + ".jsonc" -} - -func (a *App) templateFilePath(name string) string { - return filepath.Join(a.cfgDir, templateFileName(name)) +// templateDir returns the locale directory for templates. +// New layout: configs/templates// +// Legacy fallback: configs/templates..jsonc (handled by loadConfigFile). +func (a *App) templateLocaleDir(locale string) string { + if locale == "" { + locale = "default" + } + return filepath.Join(a.cfgDir, "templates", locale) } -// handleTemplatesList lists every templates.*.jsonc file with its event count. +// handleTemplatesList lists every template locale with its event count. func (a *App) handleTemplatesList(w http.ResponseWriter, r *http.Request) { data := a.baseData(r) if cfg, err := a.loadConfig(); err == nil { @@ -37,33 +36,54 @@ func (a *App) handleTemplatesList(w http.ResponseWriter, r *http.Request) { a.renderPage(w, "templates_list", data) } -// handleTemplateEdit shows the payloads for one event in one template file as -// editable JSON. +// handleTemplateEdit shows the payloads for one event in one locale as +// editable JSON. Works with both new split layout (templates//.json) +// and legacy flat files (templates.jsonc). func (a *App) handleTemplateEdit(w http.ResponseWriter, r *http.Request) { file := r.URL.Query().Get("file") event := r.URL.Query().Get("event") - path := a.templateFilePath(file) + if file == "" { + file = "default" + } - root := map[string]any{} - if err := loadJSONC(path, &root); err != nil { + // Get the list of events for this locale from loaded config + cfg, err := a.loadConfig() + if err != nil { a.redirectFlash(w, r, "/templates", a.message(r, "flash.templateLoadFailed", err), "err") return } + tc := cfg.GetTemplateConfig(file) + events := make([]string, 0, len(tc.Templates)) + for k := range tc.Templates { + events = append(events, k) + } + sort.Strings(events) - events := eventKeys(root) ed := EditTemplateData{File: file, Events: events, Event: event} if event != "" { - ed.PayloadsJSON = payloadsJSON(root, event) + // Read the single per-event file (new layout) + eventPath := filepath.Join(a.templateLocaleDir(file), event+".json") + var perEvent struct { + Payloads []map[string]any `json:"payloads"` + } + if b, err := os.ReadFile(eventPath); err == nil { + json.Unmarshal(b, &perEvent) + ed.PayloadsJSON = prettyJSON(perEvent.Payloads) + } else { + // Legacy fallback: read from loaded config + if et, ok := tc.Templates[event]; ok { + ed.PayloadsJSON = prettyJSON(et.Payloads) + } else { + ed.PayloadsJSON = "[]" + } + } } data := a.baseData(r) data.EditTemplate = ed a.renderPage(w, "template_edit", data) } -// handleTemplateSave replaces one event's payloads in a templates file. -// -// NOTE: the file is re-marshalled as JSON, which strips // comments and -// alphabetically reorders keys. Functionality is preserved. +// handleTemplateSave writes one event's payloads to its per-event .json file. func (a *App) handleTemplateSave(w http.ResponseWriter, r *http.Request) { if err := r.ParseForm(); err != nil { a.redirectFlash(w, r, "/templates", a.message(r, "flash.invalidForm"), "err") @@ -83,65 +103,31 @@ func (a *App) handleTemplateSave(w http.ResponseWriter, r *http.Request) { return } - path := a.templateFilePath(file) - root := map[string]any{} - if err := loadJSONC(path, &root); err != nil { - a.redirectFlash(w, r, "/templates", a.message(r, "flash.templateLoadFailed", err), "err") + // Write to templates//.json + dir := a.templateLocaleDir(file) + if err := os.MkdirAll(dir, 0o755); err != nil { + a.redirectFlash(w, r, "/templates", a.message(r, "flash.saveFailed", err), "err") return } - - templatesNode, _ := root["templates"].(map[string]any) - if templatesNode == nil { - templatesNode = map[string]any{} - root["templates"] = templatesNode - } - eventNode, _ := templatesNode[event].(map[string]any) - if eventNode == nil { - eventNode = map[string]any{} - } - eventNode["payloads"] = payloads - templatesNode[event] = eventNode - - if err := SaveJSON(path, root); err != nil { + path := filepath.Join(dir, event+".json") + out, _ := json.MarshalIndent(map[string]any{"payloads": payloads}, "", " ") + if err := SaveJSON(path, map[string]any{"payloads": payloads}); err != nil { a.redirectFlash(w, r, "/templates", a.message(r, "flash.saveFailed", err), "err") return } + _ = out // SaveJSON handles the actual write a.notifySaved() a.redirectFlash(w, r, "/templates", a.message(r, "flash.templateSaved"), "ok") } -// eventKeys returns the sorted event keys present in a parsed templates file. -func eventKeys(root map[string]any) []string { - templatesNode, ok := root["templates"].(map[string]any) - if !ok { - return nil - } - keys := make([]string, 0, len(templatesNode)) - for k := range templatesNode { - keys = append(keys, k) - } - sort.Strings(keys) - return keys -} - -// payloadsJSON returns the indented JSON for one event's payloads array. -func payloadsJSON(root map[string]any, event string) string { - templatesNode, _ := root["templates"].(map[string]any) - if templatesNode == nil { - return "[]" - } - eventNode, _ := templatesNode[event].(map[string]any) - if eventNode == nil { - return "[]" - } - payloads, _ := eventNode["payloads"].([]any) - if payloads == nil { - // payloads may be missing (means "default payload"); expose empty array. - return "[]" - } - b, err := json.MarshalIndent(payloads, "", " ") +// prettyJSON marshals v as indented JSON, returning "[]" on error. +func prettyJSON(v any) string { + b, err := json.MarshalIndent(v, "", " ") if err != nil { return "[]" } return string(b) } + +// ensure these vars are referenced to avoid unused warnings +var _ = strings.TrimSpace From a227270d6d670184e766c1b1c4ec88bf473b8167 Mon Sep 17 00:00:00 2001 From: Robert He Date: Sat, 1 Aug 2026 18:49:58 +0800 Subject: [PATCH 13/22] feat: add weight attribute to repo patterns and update related configurations --- example-configs/patterns/03-all.yaml | 6 --- ...aml => CompPsyUnion-experimental-all.yaml} | 3 +- ... => CompPsyUnion-motion-vote-backend.yaml} | 5 +- example-configs/patterns/all.yaml | 14 +++++ ...02-hnrobert-all.yaml => hnrobert-all.yaml} | 3 +- internal/config/config.go | 9 ++++ internal/config/migrate.go | 51 +++++++++---------- internal/panel/app.go | 11 ++-- internal/panel/handlers_repos.go | 5 +- internal/panel/templates/repo_edit.html | 12 ++++- 10 files changed, 74 insertions(+), 45 deletions(-) delete mode 100644 example-configs/patterns/03-all.yaml rename example-configs/patterns/{01-CompPsyUnion-experimental-all.yaml => CompPsyUnion-experimental-all.yaml} (79%) rename example-configs/patterns/{00-CompPsyUnion-motion-vote-backend.yaml => CompPsyUnion-motion-vote-backend.yaml} (88%) create mode 100644 example-configs/patterns/all.yaml rename example-configs/patterns/{02-hnrobert-all.yaml => hnrobert-all.yaml} (71%) diff --git a/example-configs/patterns/03-all.yaml b/example-configs/patterns/03-all.yaml deleted file mode 100644 index 2dfab69..0000000 --- a/example-configs/patterns/03-all.yaml +++ /dev/null @@ -1,6 +0,0 @@ -pattern: '*' -events: - basic: null - project: null -notify_to: -- org-notify diff --git a/example-configs/patterns/01-CompPsyUnion-experimental-all.yaml b/example-configs/patterns/CompPsyUnion-experimental-all.yaml similarity index 79% rename from example-configs/patterns/01-CompPsyUnion-experimental-all.yaml rename to example-configs/patterns/CompPsyUnion-experimental-all.yaml index 35d8a4d..16f73d0 100644 --- a/example-configs/patterns/01-CompPsyUnion-experimental-all.yaml +++ b/example-configs/patterns/CompPsyUnion-experimental-all.yaml @@ -1,5 +1,6 @@ +weight: 2 pattern: CompPsyUnion/experimental-* events: - all: null + all: notify_to: - dev-team diff --git a/example-configs/patterns/00-CompPsyUnion-motion-vote-backend.yaml b/example-configs/patterns/CompPsyUnion-motion-vote-backend.yaml similarity index 88% rename from example-configs/patterns/00-CompPsyUnion-motion-vote-backend.yaml rename to example-configs/patterns/CompPsyUnion-motion-vote-backend.yaml index 8a944fb..22b3176 100644 --- a/example-configs/patterns/00-CompPsyUnion-motion-vote-backend.yaml +++ b/example-configs/patterns/CompPsyUnion-motion-vote-backend.yaml @@ -1,3 +1,4 @@ +weight: 3 pattern: CompPsyUnion/motion-vote-backend events: push: @@ -9,8 +10,8 @@ events: - opened - closed - reopened - issues: null - release: null + issues: + release: notify_to: - ops-team - https://open.feishu.cn/open-apis/bot/v2/hook/zzzzzzz diff --git a/example-configs/patterns/all.yaml b/example-configs/patterns/all.yaml new file mode 100644 index 0000000..29d6ea3 --- /dev/null +++ b/example-configs/patterns/all.yaml @@ -0,0 +1,14 @@ +# ========================================= +# Catch-all rule (weight 0 = lowest priority) +# ----------------------------------------- +# This rule matches ALL repositories and is evaluated last. +# Place it at the end with the lowest weight so more specific +# rules (higher weight) are evaluated first. +# ========================================= +weight: 0 +pattern: '*' +events: + basic: + project: +notify_to: + - org-notify diff --git a/example-configs/patterns/02-hnrobert-all.yaml b/example-configs/patterns/hnrobert-all.yaml similarity index 71% rename from example-configs/patterns/02-hnrobert-all.yaml rename to example-configs/patterns/hnrobert-all.yaml index 0a3aba9..12cf76b 100644 --- a/example-configs/patterns/02-hnrobert-all.yaml +++ b/example-configs/patterns/hnrobert-all.yaml @@ -1,5 +1,6 @@ +weight: 1 pattern: hnrobert/* events: - custom: null + custom: notify_to: - ops-team diff --git a/internal/config/config.go b/internal/config/config.go index ee004a7..6e53b3b 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -49,6 +49,7 @@ type ReposConfig struct { } type RepoPattern struct { + Weight int `yaml:"weight,omitempty"` Pattern string `yaml:"pattern"` Events map[string]any `yaml:"events"` NotifyTo []string `yaml:"notify_to"` @@ -133,6 +134,14 @@ func loadPatterns(configDir string) ([]RepoPattern, error) { } repos = append(repos, rp) } + // Sort by weight DESCENDING (higher weight = higher priority = evaluated first). + // Ties broken by pattern name (ascending) for deterministic ordering. + sort.SliceStable(repos, func(i, j int) bool { + if repos[i].Weight != repos[j].Weight { + return repos[i].Weight > repos[j].Weight + } + return repos[i].Pattern < repos[j].Pattern + }) return repos, nil } var rc ReposConfig diff --git a/internal/config/migrate.go b/internal/config/migrate.go index 4f44c61..079995b 100644 --- a/internal/config/migrate.go +++ b/internal/config/migrate.go @@ -7,6 +7,7 @@ import ( "path/filepath" "regexp" "sort" + "strconv" "strings" "gopkg.in/yaml.v3" @@ -82,20 +83,26 @@ func migrateRepos(configDir, legacyDir string) error { return err } + total := len(seqNode.Content) for i, item := range seqNode.Content { - // item is a yaml.Node mapping — its HeadComment carries any comment - // that was above this entry in the original file. + // Assign weight: first rule (index 0) gets highest weight (total-1), + // last rule gets weight 0. This preserves the original evaluation order + // where the first match wins, and the catch-all "*" at the end gets + // the lowest priority (weight 0). + weight := total - 1 - i + injectWeight(item, weight) + out, err := marshalYAMLNode(item) if err != nil { return fmt.Errorf("marshal repo %d: %w", i, err) } - // Derive filename from the pattern field if possible - name := nodePattern(item) // returns the "pattern" value or "" + // Filename is just the sanitized pattern name (no index prefix) + name := nodePattern(item) if name == "" { name = fmt.Sprintf("rule-%d", i) } - fname := fmt.Sprintf("%02d-%s.yaml", i, sanitizeFilename(name)) + fname := sanitizeFilename(name) + ".yaml" if err := os.WriteFile(filepath.Join(dstDir, fname), out, 0o644); err != nil { return err } @@ -313,6 +320,18 @@ func marshalYAMLNode(n *yaml.Node) ([]byte, error) { return []byte(out), nil } +// injectWeight inserts a `weight: N` key-value pair at the beginning of a +// mapping node, preserving any existing HeadComment on the node. +func injectWeight(mappingNode *yaml.Node, weight int) { + if mappingNode == nil || mappingNode.Kind != yaml.MappingNode { + return + } + keyNode := &yaml.Node{Kind: yaml.ScalarNode, Tag: "", Value: "weight"} + valNode := &yaml.Node{Kind: yaml.ScalarNode, Tag: "", Value: strconv.Itoa(weight)} + // Prepend key+value to the mapping's Content + mappingNode.Content = append([]*yaml.Node{keyNode, valNode}, mappingNode.Content...) +} + // ── Generic helpers ── func fileExists(path string) bool { @@ -320,28 +339,6 @@ func fileExists(path string) bool { return err == nil } -func dirHasYAML(dir string) bool { - files, err := scanYAMLDir(dir) - return err == nil && len(files) > 0 -} - -func dirHasContent(dir string) bool { - entries, err := os.ReadDir(dir) - if err != nil { - return false - } - for _, e := range entries { - if e.IsDir() { - if dirHasContent(filepath.Join(dir, e.Name())) { - return true - } - } else { - return true - } - } - return false -} - func ensureDir(dir string) error { return os.MkdirAll(dir, 0o755) } diff --git a/internal/panel/app.go b/internal/panel/app.go index f81e5d4..c5fec3a 100644 --- a/internal/panel/app.go +++ b/internal/panel/app.go @@ -107,14 +107,15 @@ type ServerInfo struct { // RepoRow represents one repos.yaml entry, for both list display and editing. type RepoRow struct { Index int + Weight int Pattern string - NotifyTo []string // list display - NotifyToRaw string // newline-joined, for the edit form + NotifyTo []string + NotifyToRaw string Events map[string]any - EventsYAML string // raw YAML text, for the edit textarea + EventsYAML string EventCount int - Secret string // per-rule webhook secret (edit form) - HasSecret bool // whether a per-rule secret is set (list badge) + Secret string + HasSecret bool } // BotRow represents one feishu-bots.yaml entry. diff --git a/internal/panel/handlers_repos.go b/internal/panel/handlers_repos.go index f1487f0..c2c8b2f 100644 --- a/internal/panel/handlers_repos.go +++ b/internal/panel/handlers_repos.go @@ -56,6 +56,7 @@ func (a *App) handleRepoSave(w http.ResponseWriter, r *http.Request) { a.redirectFlash(w, r, "/repos", a.message(r, "flash.patternRequired"), "err") return } + weight, _ := strconv.Atoi(strings.TrimSpace(r.FormValue("weight"))) events, err := parseEventsYAML(r.FormValue("events")) if err != nil { @@ -71,7 +72,7 @@ func (a *App) handleRepoSave(w http.ResponseWriter, r *http.Request) { return } - rp := config.RepoPattern{Pattern: pattern, Events: events, NotifyTo: notifyTo, Secret: secret} + rp := config.RepoPattern{Weight: weight, Pattern: pattern, Events: events, NotifyTo: notifyTo, Secret: secret} if idx >= 0 && idx < len(cfg.Repos.Repos) { cfg.Repos.Repos[idx] = rp } else { @@ -115,6 +116,7 @@ func (a *App) handleRepoDelete(w http.ResponseWriter, r *http.Request) { func repoListRow(i int, rp config.RepoPattern) RepoRow { return RepoRow{ Index: i, + Weight: rp.Weight, Pattern: rp.Pattern, NotifyTo: rp.NotifyTo, EventCount: len(rp.Events), @@ -126,6 +128,7 @@ func repoListRow(i int, rp config.RepoPattern) RepoRow { func repoEditRow(i int, rp config.RepoPattern) RepoRow { row := RepoRow{ Index: i, + Weight: rp.Weight, Pattern: rp.Pattern, NotifyTo: rp.NotifyTo, NotifyToRaw: strings.Join(rp.NotifyTo, "\n"), diff --git a/internal/panel/templates/repo_edit.html b/internal/panel/templates/repo_edit.html index 498f41f..d614887 100644 --- a/internal/panel/templates/repo_edit.html +++ b/internal/panel/templates/repo_edit.html @@ -8,8 +8,16 @@

{{if lt .EditRepo.Index 0}}{{t . "repo.newTitle"}}{{else}}{{t . "repo.editTi
- - +
+
+ + +
+
+ + +
+
From 735a867862e66970266551888ba6f71514cdd24d Mon Sep 17 00:00:00 2001 From: Robert He Date: Sat, 1 Aug 2026 19:06:07 +0800 Subject: [PATCH 14/22] refactor: use patterns --- internal/panel/app.go | 20 ++--- ...handlers_repos.go => handlers_patterns.go} | 73 +++++++++---------- internal/panel/locales/en-US.json | 60 +++++++-------- internal/panel/locales/zh-CN.json | 50 ++++++------- internal/panel/templates/dashboard.html | 2 +- internal/panel/templates/layout.html | 4 +- internal/panel/templates/pattern_edit.html | 45 ++++++++++++ internal/panel/templates/patterns.html | 54 ++++++++++++++ internal/panel/templates/repo_edit.html | 45 ------------ internal/panel/templates/repos.html | 54 -------------- internal/panel/templates/topology.html | 4 +- 11 files changed, 205 insertions(+), 206 deletions(-) rename internal/panel/{handlers_repos.go => handlers_patterns.go} (55%) create mode 100644 internal/panel/templates/pattern_edit.html create mode 100644 internal/panel/templates/patterns.html delete mode 100644 internal/panel/templates/repo_edit.html delete mode 100644 internal/panel/templates/repos.html diff --git a/internal/panel/app.go b/internal/panel/app.go index c5fec3a..8660282 100644 --- a/internal/panel/app.go +++ b/internal/panel/app.go @@ -73,8 +73,8 @@ type ViewData struct { Topology Topology // repos - Repos []RepoRow - EditRepo RepoRow + Patterns []PatternRow + EditPattern PatternRow // bots Bots []BotRow @@ -105,7 +105,7 @@ type ServerInfo struct { } // RepoRow represents one repos.yaml entry, for both list display and editing. -type RepoRow struct { +type PatternRow struct { Index int Weight int Pattern string @@ -204,8 +204,8 @@ func New(opts Options) (*App, error) { "login", "dashboard", "topology", - "repos", - "repo_edit", + "patterns", + "pattern_edit", "bots", "bot_edit", "server_settings", @@ -280,11 +280,11 @@ func (a *App) routes() http.Handler { mux.HandleFunc("/", a.requireAuth(a.handleDashboard)) mux.HandleFunc("/topology", a.requireAuth(a.handleTopology)) - mux.HandleFunc("/repos", a.requireAuth(a.handleRepos)) - mux.HandleFunc("/repos/new", a.requireAuth(a.handleRepoNew)) - mux.HandleFunc("/repos/edit", a.requireAuth(a.handleRepoEdit)) - mux.HandleFunc("/repos/save", a.requireAuth(a.handleRepoSave)) - mux.HandleFunc("/repos/delete", a.requireAuth(a.handleRepoDelete)) + mux.HandleFunc("/patterns", a.requireAuth(a.handlePatterns)) + mux.HandleFunc("/patterns/new", a.requireAuth(a.handlePatternNew)) + mux.HandleFunc("/patterns/edit", a.requireAuth(a.handlePatternEdit)) + mux.HandleFunc("/patterns/save", a.requireAuth(a.handlePatternSave)) + mux.HandleFunc("/patterns/delete", a.requireAuth(a.handlePatternDelete)) mux.HandleFunc("/bots", a.requireAuth(a.handleBots)) mux.HandleFunc("/bots/new", a.requireAuth(a.handleBotNew)) diff --git a/internal/panel/handlers_repos.go b/internal/panel/handlers_patterns.go similarity index 55% rename from internal/panel/handlers_repos.go rename to internal/panel/handlers_patterns.go index c2c8b2f..31a4316 100644 --- a/internal/panel/handlers_repos.go +++ b/internal/panel/handlers_patterns.go @@ -9,58 +9,58 @@ import ( "gopkg.in/yaml.v3" ) -// handleRepos lists all repo rules. -func (a *App) handleRepos(w http.ResponseWriter, r *http.Request) { +// handlePatterns lists all pattern rules. +func (a *App) handlePatterns(w http.ResponseWriter, r *http.Request) { data := a.baseData(r) if cfg, err := a.loadConfig(); err == nil { for i, rp := range cfg.Repos.Repos { - data.Repos = append(data.Repos, repoListRow(i, rp)) + data.Patterns = append(data.Patterns, patternListRow(i, rp)) } } - a.renderPage(w, "repos", data) + a.renderPage(w, "patterns", data) } -// handleRepoNew renders a blank edit form for a new repo rule. -func (a *App) handleRepoNew(w http.ResponseWriter, r *http.Request) { +// handlePatternNew renders a blank edit form for a new pattern rule. +func (a *App) handlePatternNew(w http.ResponseWriter, r *http.Request) { data := a.baseData(r) - data.EditRepo = RepoRow{Index: -1} - a.renderPage(w, "repo_edit", data) + data.EditPattern = PatternRow{Index: -1} + a.renderPage(w, "pattern_edit", data) } -// handleRepoEdit renders the edit form for an existing repo rule by index. -func (a *App) handleRepoEdit(w http.ResponseWriter, r *http.Request) { +// handlePatternEdit renders the edit form for an existing pattern rule by index. +func (a *App) handlePatternEdit(w http.ResponseWriter, r *http.Request) { data := a.baseData(r) idx, _ := strconv.Atoi(r.URL.Query().Get("index")) cfg, err := a.loadConfig() if err != nil { - a.redirectFlash(w, r, "/repos", a.message(r, "flash.configLoadFailed"), "err") + a.redirectFlash(w, r, "/patterns", a.message(r, "flash.configLoadFailed"), "err") return } if idx < 0 || idx >= len(cfg.Repos.Repos) { - a.redirectFlash(w, r, "/repos", a.message(r, "flash.repoNotFound"), "err") + a.redirectFlash(w, r, "/patterns", a.message(r, "flash.patternNotFound"), "err") return } - data.EditRepo = repoEditRow(idx, cfg.Repos.Repos[idx]) - a.renderPage(w, "repo_edit", data) + data.EditPattern = patternEditRow(idx, cfg.Repos.Repos[idx]) + a.renderPage(w, "pattern_edit", data) } -// handleRepoSave creates or updates a repo rule. -func (a *App) handleRepoSave(w http.ResponseWriter, r *http.Request) { +// handlePatternSave creates or updates a pattern rule. +func (a *App) handlePatternSave(w http.ResponseWriter, r *http.Request) { if err := r.ParseForm(); err != nil { - a.redirectFlash(w, r, "/repos", a.message(r, "flash.invalidForm"), "err") + a.redirectFlash(w, r, "/patterns", a.message(r, "flash.invalidForm"), "err") return } idx, _ := strconv.Atoi(r.FormValue("index")) pattern := strings.TrimSpace(r.FormValue("pattern")) if pattern == "" { - a.redirectFlash(w, r, "/repos", a.message(r, "flash.patternRequired"), "err") + a.redirectFlash(w, r, "/patterns", a.message(r, "flash.patternRequired"), "err") return } weight, _ := strconv.Atoi(strings.TrimSpace(r.FormValue("weight"))) events, err := parseEventsYAML(r.FormValue("events")) if err != nil { - a.redirectFlash(w, r, "/repos", a.message(r, "flash.eventsParseFailed", err), "err") + a.redirectFlash(w, r, "/patterns", a.message(r, "flash.eventsParseFailed", err), "err") return } notifyTo := splitLines(r.FormValue("notify_to")) @@ -68,7 +68,7 @@ func (a *App) handleRepoSave(w http.ResponseWriter, r *http.Request) { cfg, err := a.loadConfig() if err != nil { - a.redirectFlash(w, r, "/repos", a.message(r, "flash.configLoadFailed"), "err") + a.redirectFlash(w, r, "/patterns", a.message(r, "flash.configLoadFailed"), "err") return } @@ -80,41 +80,41 @@ func (a *App) handleRepoSave(w http.ResponseWriter, r *http.Request) { } if err := SaveYAML(a.cfgDir+"/repos.yaml", cfg.Repos); err != nil { - a.redirectFlash(w, r, "/repos", a.message(r, "flash.saveFailed", err), "err") + a.redirectFlash(w, r, "/patterns", a.message(r, "flash.saveFailed", err), "err") return } a.notifySaved() - a.redirectFlash(w, r, "/repos", a.message(r, "flash.repoSaved"), "ok") + a.redirectFlash(w, r, "/patterns", a.message(r, "flash.patternSaved"), "ok") } -// handleRepoDelete removes a repo rule by index. -func (a *App) handleRepoDelete(w http.ResponseWriter, r *http.Request) { +// handlePatternDelete removes a pattern rule by index. +func (a *App) handlePatternDelete(w http.ResponseWriter, r *http.Request) { if err := r.ParseForm(); err != nil { - a.redirectFlash(w, r, "/repos", a.message(r, "flash.invalidForm"), "err") + a.redirectFlash(w, r, "/patterns", a.message(r, "flash.invalidForm"), "err") return } idx, _ := strconv.Atoi(r.FormValue("index")) cfg, err := a.loadConfig() if err != nil { - a.redirectFlash(w, r, "/repos", a.message(r, "flash.configLoadFailed"), "err") + a.redirectFlash(w, r, "/patterns", a.message(r, "flash.configLoadFailed"), "err") return } if idx < 0 || idx >= len(cfg.Repos.Repos) { - a.redirectFlash(w, r, "/repos", a.message(r, "flash.repoNotFound"), "err") + a.redirectFlash(w, r, "/patterns", a.message(r, "flash.patternNotFound"), "err") return } cfg.Repos.Repos = append(cfg.Repos.Repos[:idx], cfg.Repos.Repos[idx+1:]...) if err := SaveYAML(a.cfgDir+"/repos.yaml", cfg.Repos); err != nil { - a.redirectFlash(w, r, "/repos", a.message(r, "flash.saveFailed", err), "err") + a.redirectFlash(w, r, "/patterns", a.message(r, "flash.saveFailed", err), "err") return } a.notifySaved() - a.redirectFlash(w, r, "/repos", a.message(r, "flash.repoDeleted"), "ok") + a.redirectFlash(w, r, "/patterns", a.message(r, "flash.patternDeleted"), "ok") } -// repoListRow builds a RepoRow for list display. -func repoListRow(i int, rp config.RepoPattern) RepoRow { - return RepoRow{ +// patternListRow builds a PatternRow for list display. +func patternListRow(i int, rp config.RepoPattern) PatternRow { + return PatternRow{ Index: i, Weight: rp.Weight, Pattern: rp.Pattern, @@ -124,9 +124,9 @@ func repoListRow(i int, rp config.RepoPattern) RepoRow { } } -// repoEditRow builds a RepoRow for the edit form (with raw textarea contents). -func repoEditRow(i int, rp config.RepoPattern) RepoRow { - row := RepoRow{ +// patternEditRow builds a PatternRow for the edit form (with raw textarea contents). +func patternEditRow(i int, rp config.RepoPattern) PatternRow { + row := PatternRow{ Index: i, Weight: rp.Weight, Pattern: rp.Pattern, @@ -145,8 +145,7 @@ func repoEditRow(i int, rp config.RepoPattern) RepoRow { return row } -// parseEventsYAML parses the events textarea into a map[string]any. An empty -// textarea yields an empty (non-nil) map so the rule still subscribes to events. +// parseEventsYAML parses the events textarea into a map[string]any. func parseEventsYAML(text string) (map[string]any, error) { text = strings.TrimSpace(text) out := map[string]any{} diff --git a/internal/panel/locales/en-US.json b/internal/panel/locales/en-US.json index 4aa9182..4815057 100644 --- a/internal/panel/locales/en-US.json +++ b/internal/panel/locales/en-US.json @@ -14,7 +14,7 @@ "action.copy": "Copy", "action.copied": "Copied", "nav.overview": "Overview", - "nav.repos": "Repo rules", + "nav.patterns": "Pattern rules", "nav.bots": "Feishu bots", "nav.events": "Event sets", "nav.templates": "Templates", @@ -28,7 +28,7 @@ "login.password": "Administrator password", "dashboard.title": "Operations overview", "dashboard.subtitle": "Monitor notification configuration, delivery health, and relationships.", - "dashboard.repoRules": "Repo rules", + "dashboard.patternRules": "Pattern rules", "dashboard.bots": "Feishu bots", "dashboard.eventSets": "Event sets", "dashboard.templates": "Template files", @@ -48,8 +48,8 @@ "dashboard.allowedSources": "Allowed sources", "topology.title": "Configuration topology", "topology.subtitle": "Select a node to view or edit its configuration.", - "topology.empty": "No configuration relationships to show. Create a repo rule and connect events and bots first.", - "topology.legend.repo": "Repo rules", + "topology.empty": "No configuration relationships to show. Create a pattern rule and connect events and bots first.", + "topology.legend.pattern": "Pattern rules", "topology.legend.event": "Events or sets", "topology.legend.bot": "Delivery targets", "topology.routes": "configuration rules", @@ -57,11 +57,11 @@ "topology.edges": "relationships", "topology.events": "events", "topology.targets": "delivery targets", - "topology.column.repo": "Repo rules", + "topology.column.pattern": "Pattern rules", "topology.column.event": "Events and sets", "topology.column.target": "Delivery targets", "bots.title": "Feishu bots", - "bots.subtitle": "Bot aliases and webhook URLs can be referenced by repo rules.", + "bots.subtitle": "Bot aliases and webhook URLs can be referenced by pattern rules.", "bots.alias": "Alias", "bots.webhookURL": "Webhook URL", "bots.template": "Template", @@ -69,26 +69,26 @@ "bots.deleteConfirm": "Delete this bot?", "bot.newTitle": "New bot", "bot.editTitle": "Edit bot", - "bot.subtitle": "Repo rules use this alias to reference the bot.", + "bot.subtitle": "Pattern rules use this alias to reference the bot.", "bot.templateHint": "Optional; default is used when empty", - "repos.title": "Repo rules", - "repos.subtitle": "Repository patterns, event subscriptions, and delivery targets are evaluated in order.", - "repos.pattern": "Pattern", - "repos.events": "Events", - "repos.notifyTo": "Notify to", - "repos.eventsCount": "events", - "repos.empty": "No repo rules yet. Select New to add one.", - "repos.deleteConfirm": "Delete this repo rule?", - "repos.customSecret": "Custom secret", - "repo.newTitle": "New repo rule", - "repo.editTitle": "Edit repo rule", - "repo.subtitle": "Configure the rule's events and delivery targets.", - "repo.patternHint": "Glob patterns are supported, for example org/*", - "repo.secret": "Webhook secret", - "repo.secretHint": "Optional; uses the global server.secret when empty", - "repo.secretPlaceholder": "Empty uses the global secret", - "repo.notifyHint": "One per line", - "repo.eventsHint": "Events can reference entries in events.yaml or compose named event_sets.", + "patterns.title": "Pattern rules", + "patterns.subtitle": "Repository patterns, event subscriptions, and delivery targets. Evaluated by weight descending (higher = higher priority).", + "patterns.pattern": "Pattern", + "patterns.events": "Events", + "patterns.notifyTo": "Notify to", + "patterns.eventsCount": "events", + "patterns.empty": "No pattern rules yet. Select New to add one.", + "patterns.deleteConfirm": "Delete this pattern rule?", + "patterns.customSecret": "Custom secret", + "pattern.newTitle": "New pattern rule", + "pattern.editTitle": "Edit pattern rule", + "pattern.subtitle": "Configure the rule's events and delivery targets.", + "pattern.patternHint": "Glob patterns are supported, for example org/*", + "pattern.secret": "Webhook secret", + "pattern.secretHint": "Optional; uses the global server.secret when empty", + "pattern.secretPlaceholder": "Empty uses the global secret", + "pattern.notifyHint": "One per line", + "pattern.eventsHint": "Events can reference entries in events.yaml or compose named event_sets.", "events.title": "Event sets", "events.subtitle": "Edit event sets and event definitions.", "events.preserve": "Comments and formatting are preserved exactly.", @@ -110,12 +110,12 @@ "settings.host": "Listen host", "settings.port": "Port", "settings.secret": "Webhook secret", - "settings.secretHint": "Global fallback. A repo rule's own secret takes precedence.", + "settings.secretHint": "Global fallback. A pattern rule's own secret takes precedence.", "settings.logLevel": "Log level", "settings.maxPayload": "Maximum payload", "settings.timeout": "Timeout", "settings.seconds": "seconds", - "settings.matchAll": "Match all repo rules", + "settings.matchAll": "Match all pattern rules", "settings.matchAllHint": "By default only the first matching rule is used. When enabled, all matching rules are evaluated in order and a target receives one notification per webhook.", "settings.allowedSources": "Allowed sources", "settings.onePerLine": "One per line", @@ -139,11 +139,11 @@ "flash.botFieldsRequired": "Alias and URL are required.", "flash.botSaved": "Bot saved.", "flash.botDeleted": "Bot deleted.", - "flash.repoNotFound": "The repo rule was not found.", + "flash.patternNotFound": "The pattern rule was not found.", "flash.patternRequired": "Pattern is required.", "flash.eventsParseFailed": "events YAML could not be parsed: %s", - "flash.repoSaved": "Repo rule saved.", - "flash.repoDeleted": "Repo rule deleted.", + "flash.patternSaved": "Pattern rule saved.", + "flash.patternDeleted": "Pattern rule deleted.", "flash.eventsSaved": "Event configuration saved.", "flash.templateLoadFailed": "Template could not be loaded: %s", "flash.eventRequired": "Select an event first.", diff --git a/internal/panel/locales/zh-CN.json b/internal/panel/locales/zh-CN.json index 77ce38c..e5b9e26 100644 --- a/internal/panel/locales/zh-CN.json +++ b/internal/panel/locales/zh-CN.json @@ -14,7 +14,7 @@ "action.copy": "复制", "action.copied": "已复制", "nav.overview": "概览", - "nav.repos": "仓库规则", + "nav.patterns": "仓库规则", "nav.bots": "飞书机器人", "nav.events": "事件集合", "nav.templates": "消息模板", @@ -28,7 +28,7 @@ "login.password": "管理员密码", "dashboard.title": "运行概览", "dashboard.subtitle": "查看通知配置、投递健康度与配置关系。", - "dashboard.repoRules": "仓库规则", + "dashboard.patternRules": "仓库规则", "dashboard.bots": "飞书机器人", "dashboard.eventSets": "事件集合", "dashboard.templates": "模板文件", @@ -49,7 +49,7 @@ "topology.title": "配置图谱", "topology.subtitle": "选择节点查看或修改对应配置。", "topology.empty": "暂无可展示的配置关系。先创建仓库规则并关联事件和机器人。", - "topology.legend.repo": "仓库规则", + "topology.legend.pattern": "仓库规则", "topology.legend.event": "事件或集合", "topology.legend.bot": "通知目标", "topology.routes": "条配置规则", @@ -57,7 +57,7 @@ "topology.edges": "条关联", "topology.events": "个事件", "topology.targets": "个通知目标", - "topology.column.repo": "仓库规则", + "topology.column.pattern": "仓库规则", "topology.column.event": "事件与集合", "topology.column.target": "通知目标", "bots.title": "飞书机器人", @@ -71,24 +71,24 @@ "bot.editTitle": "编辑机器人", "bot.subtitle": "别名用于在仓库规则中引用此机器人。", "bot.templateHint": "可选,默认使用 default", - "repos.title": "仓库规则", - "repos.subtitle": "仓库匹配模式、订阅事件与通知目标按配置顺序匹配。", - "repos.pattern": "模式", - "repos.events": "事件", - "repos.notifyTo": "通知目标", - "repos.eventsCount": "个事件", - "repos.empty": "暂无仓库规则,点击“新建”添加。", - "repos.deleteConfirm": "删除该仓库规则?", - "repos.customSecret": "自定义密钥", - "repo.newTitle": "新建仓库规则", - "repo.editTitle": "编辑仓库规则", - "repo.subtitle": "设置规则的事件与通知目标。", - "repo.patternHint": "支持 glob,例如 org/*", - "repo.secret": "Webhook 密钥", - "repo.secretHint": "可选;留空则使用全局 server.secret", - "repo.secretPlaceholder": "留空则使用全局密钥", - "repo.notifyHint": "每行一个", - "repo.eventsHint": "事件可直接引用 events.yaml 中的事件,也可叠加 event_sets 中的模板名称。", + "patterns.title": "仓库规则", + "patterns.subtitle": "仓库匹配模式、订阅事件与通知目标。按 weight 降序评估(数值越大优先级越高)。", + "patterns.pattern": "模式", + "patterns.events": "事件", + "patterns.notifyTo": "通知目标", + "patterns.eventsCount": "个事件", + "patterns.empty": "暂无仓库规则,点击“新建”添加。", + "patterns.deleteConfirm": "删除该仓库规则?", + "patterns.customSecret": "自定义密钥", + "pattern.newTitle": "新建仓库规则", + "pattern.editTitle": "编辑仓库规则", + "pattern.subtitle": "设置规则的事件与通知目标。", + "pattern.patternHint": "支持 glob,例如 org/*", + "pattern.secret": "Webhook 密钥", + "pattern.secretHint": "可选;留空则使用全局 server.secret", + "pattern.secretPlaceholder": "留空则使用全局密钥", + "pattern.notifyHint": "每行一个", + "pattern.eventsHint": "事件可直接引用 events.yaml 中的事件,也可叠加 event_sets 中的模板名称。", "events.title": "事件集合", "events.subtitle": "编辑事件集合和事件定义。", "events.preserve": "注释与格式会完整保留。", @@ -139,11 +139,11 @@ "flash.botFieldsRequired": "别名和 URL 不能为空。", "flash.botSaved": "机器人已保存。", "flash.botDeleted": "机器人已删除。", - "flash.repoNotFound": "仓库规则不存在。", + "flash.patternNotFound": "仓库规则不存在。", "flash.patternRequired": "模式不能为空。", "flash.eventsParseFailed": "events YAML 解析失败:%s", - "flash.repoSaved": "仓库规则已保存。", - "flash.repoDeleted": "仓库规则已删除。", + "flash.patternSaved": "仓库规则已保存。", + "flash.patternDeleted": "仓库规则已删除。", "flash.eventsSaved": "事件配置已保存。", "flash.templateLoadFailed": "读取模板失败:%s", "flash.eventRequired": "未选择事件。", diff --git a/internal/panel/templates/dashboard.html b/internal/panel/templates/dashboard.html index 59daa95..9800e47 100644 --- a/internal/panel/templates/dashboard.html +++ b/internal/panel/templates/dashboard.html @@ -6,7 +6,7 @@

{{t . "dashboard.title"}}

-
{{.RepoCount}}
{{t . "dashboard.repoRules"}}
+
{{.RepoCount}}
{{t . "dashboard.patternRules"}}
{{.BotCount}}
{{t . "dashboard.bots"}}
{{.EventSetCount}}
{{t . "dashboard.eventSets"}}
{{len .TemplateFiles}}
{{t . "dashboard.templates"}}
diff --git a/internal/panel/templates/layout.html b/internal/panel/templates/layout.html index 9ab0359..a27e139 100644 --- a/internal/panel/templates/layout.html +++ b/internal/panel/templates/layout.html @@ -4,8 +4,8 @@ {{t . "nav.overview"}} - - {{t . "nav.repos"}} + + {{t . "nav.patterns"}} {{t . "nav.bots"}} diff --git a/internal/panel/templates/pattern_edit.html b/internal/panel/templates/pattern_edit.html new file mode 100644 index 0000000..f199ce2 --- /dev/null +++ b/internal/panel/templates/pattern_edit.html @@ -0,0 +1,45 @@ +{{define "title"}}{{if lt .EditPattern.Index 0}}{{t . "pattern.newTitle"}}{{else}}{{t . "pattern.editTitle"}}{{end}} · Feishu GitHub Tracker{{end}} +{{define "content"}} +
+

{{if lt .EditPattern.Index 0}}{{t . "pattern.newTitle"}}{{else}}{{t . "pattern.editTitle"}}{{end}}

+
{{t . "pattern.subtitle"}}
+
+ + + + +
+
+ + +
+
+ + +
+
+ + + + +
+
+ + +
+
+ + +
+
+ +
+ {{t . "pattern.eventsHint"}} +
+ +
+ +{{end}} diff --git a/internal/panel/templates/patterns.html b/internal/panel/templates/patterns.html new file mode 100644 index 0000000..f8e1291 --- /dev/null +++ b/internal/panel/templates/patterns.html @@ -0,0 +1,54 @@ +{{define "title"}}{{t . "patterns.title"}} · Feishu GitHub Tracker{{end}} +{{define "content"}} +
+
+

{{t . "patterns.title"}}

+
{{t . "patterns.subtitle"}}
+
+ + {{t . "action.new"}} +
+ +
+ {{if .Patterns}} +
+ + + + + + + + + + + + {{range .Patterns}} + + + + + + + + {{end}} + +
W{{t . "patterns.pattern"}}{{t . "patterns.events"}}{{t . "patterns.notifyTo"}}
{{.Weight}}{{.Pattern}} + {{if gt .EventCount 0}}{{.EventCount}} {{t $ "patterns.eventsCount"}}{{else}}0{{end}} + {{if .HasSecret}}🔒{{end}} + + {{if .NotifyTo}}{{range .NotifyTo}}{{.}}{{end}}{{else}}—{{end}} + +
+ {{t $ "action.edit"}} +
+ + +
+
+
+
+ {{else}} +
{{t . "patterns.empty"}}
+ {{end}} +
+{{end}} diff --git a/internal/panel/templates/repo_edit.html b/internal/panel/templates/repo_edit.html deleted file mode 100644 index d614887..0000000 --- a/internal/panel/templates/repo_edit.html +++ /dev/null @@ -1,45 +0,0 @@ -{{define "title"}}{{if lt .EditRepo.Index 0}}{{t . "repo.newTitle"}}{{else}}{{t . "repo.editTitle"}}{{end}} · Feishu GitHub Tracker{{end}} -{{define "content"}} -
-

{{if lt .EditRepo.Index 0}}{{t . "repo.newTitle"}}{{else}}{{t . "repo.editTitle"}}{{end}}

-
{{t . "repo.subtitle"}}
-
- -
- - -
-
- - -
-
- - -
-
- - - - -
-
- - -
-
- - -
-
- -
- {{t . "repo.eventsHint"}} -
- -
- - {{t . "action.cancel"}} -
-
-{{end}} diff --git a/internal/panel/templates/repos.html b/internal/panel/templates/repos.html deleted file mode 100644 index a060f48..0000000 --- a/internal/panel/templates/repos.html +++ /dev/null @@ -1,54 +0,0 @@ -{{define "title"}}{{t . "repos.title"}} · Feishu GitHub Tracker{{end}} -{{define "content"}} -
-
-

{{t . "repos.title"}}

-
{{t . "repos.subtitle"}}
-
- + {{t . "action.new"}} -
- -
- {{if .Repos}} -
- - - - - - - - - - - - {{range .Repos}} - - - - - - - - {{end}} - -
#{{t . "repos.pattern"}}{{t . "repos.events"}}{{t . "repos.notifyTo"}}
{{.Index}}{{.Pattern}} - {{if gt .EventCount 0}}{{.EventCount}} {{t $ "repos.eventsCount"}}{{else}}0{{end}} - {{if .HasSecret}}🔒{{end}} - - {{if .NotifyTo}}{{range .NotifyTo}}{{.}}{{end}}{{else}}—{{end}} - -
- {{t $ "action.edit"}} -
- - -
-
-
-
- {{else}} -
{{t . "repos.empty"}}
- {{end}} -
-{{end}} diff --git a/internal/panel/templates/topology.html b/internal/panel/templates/topology.html index 1f3fb14..518c2f0 100644 --- a/internal/panel/templates/topology.html +++ b/internal/panel/templates/topology.html @@ -6,7 +6,7 @@

{{t . "topology.title"}}

- {{t . "topology.legend.repo"}} + {{t . "topology.legend.pattern"}} {{t . "topology.legend.event"}} {{t . "topology.legend.bot"}}
@@ -17,7 +17,7 @@

{{t . "topology.title"}}

{{len .Topology.Nodes}}{{t . "topology.nodes"}}
{{len .Topology.Edges}}{{t . "topology.edges"}}
-
+