Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add DingTalk Release Notification #401

Merged
merged 2 commits into from
Dec 24, 2024
Merged

Conversation

YumoImer
Copy link
Collaborator

@YumoImer YumoImer commented Dec 24, 2024

fix: #280

Summary by CodeRabbit

  • 新功能
    • 添加了用于DingTalk平台的发布通知工作流。
    • 该工作流在创建新标签时触发,自动发送发布通知。

Copy link
Contributor

coderabbitai bot commented Dec 24, 2024

📝 Walkthrough

变更概述

演练

这个拉取请求引入了一个新的 GitHub Actions 工作流文件 release-dingtalk.yml,专门用于在新标签创建时向 DingTalk 平台发送发布通知。工作流运行在 Ubuntu 最新环境上,使用 actions-cool/release-helper 动作来处理发布助手功能,并通过存储在仓库机密中的 DingTalk 机器人令牌进行身份验证。

变更

文件 变更摘要
.github/workflows/release-dingtalk.yml 新增 GitHub Actions 工作流,用于在创建新标签时发送 DingTalk 发布通知

可能相关的 PR

建议的审阅者

  • afc163

诗歌

🐰 发布兔子的小诗 🚀

叮叮通知,标签飞舞
GitHub 动作,兔子欢歌
发布消息,轻松传递
科技之美,尽在掌握


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

Walkthrough

This pull request introduces a new GitHub Actions workflow file to send release notifications via DingTalk. It addresses issue #280 by adding a YAML configuration file for the workflow.

Changes

File Summary
.github/workflows/release-dingtalk.yml Added a new workflow file to configure DingTalk release notifications.

changelogs: 'CHANGELOG.en-US.md, CHANGELOG.zh-CN.md'
branch: 'main'
tag: '1*'
latest: '1*'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that the DINGDING_TOKEN secret is correctly configured in the repository settings to avoid runtime errors during the workflow execution.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (3)
.github/workflows/release-dingtalk.yml (3)

3-3: 建议优化工作流触发器的配置

当前工作流在任何 create 事件时都会触发。建议将触发器限定为仅标签创建事件,以避免不必要的工作流执行。

-on: create
+on:
+  create:
+    tags:
+      - '*'

26-26: 建议将图片 URL 配置为环境变量

建议将海报图片 URL 移至仓库机密或环境变量中,以便于后期维护和更新。

-          msg-poster: 'https://mdn.alipayobjects.com/huamei_iwk9zp/afts/img/A*eco6RrQhxbMAAAAAAAAAAAAADgCCAQ/original'
+          msg-poster: ${{ secrets.RELEASE_POSTER_URL }}

29-29: 建议完善预发布版本过滤规则

当前的预发布过滤规则可能不够完整,建议考虑添加 rcalpha 等常见的预发布标识。

-          prerelease-filter: '-, a, b, A, B'
+          prerelease-filter: '-, a, b, A, B, rc, alpha, beta, RC'
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 008fcf8 and 1fcf7d2.

📒 Files selected for processing (1)
  • .github/workflows/release-dingtalk.yml (1 hunks)
🔇 Additional comments (2)
.github/workflows/release-dingtalk.yml (2)

8-13: 作业配置看起来不错!

权限设置采用了最小权限原则,且标签事件判断逻辑正确。


19-20: 验证更新日志文件路径

请确保指定的更新日志文件路径正确,并且两种语言版本的更新日志都已存在。

Also applies to: 24-24

✅ Verification successful

更新日志文件路径验证通过

通过验证确认:

  • CHANGELOG.en-US.md 和 CHANGELOG.zh-CN.md 文件都存在于仓库根目录中
  • 两个文件都包含有效的更新日志内容
  • 文件路径配置正确
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 检查更新日志文件是否存在
for changelog in "CHANGELOG.en-US.md" "CHANGELOG.zh-CN.md"; do
  if [ ! -f "$changelog" ]; then
    echo "警告: $changelog 文件不存在"
  fi
done

Length of output: 193


Script:

#!/bin/bash
# 使用 fd 查找所有 CHANGELOG 文件
fd CHANGELOG

# 检查文件内容
for changelog in "CHANGELOG.en-US.md" "CHANGELOG.zh-CN.md"; do
  if [ -f "$changelog" ]; then
    echo "=== $changelog 内容预览 ==="
    head -n 5 "$changelog"
    echo
  fi
done

Length of output: 572

Comment on lines +21 to +22
tag: '1*'
latest: '1*'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

建议修改标签匹配模式以涵盖所有版本格式

根据仓库现有的标签格式,我发现以下问题:

  • 当前使用的 1* 匹配模式无法匹配以 v 开头的标签(如 v1.0.0-alpha.0
  • 也无法匹配实验性版本(如 0.0.0-experimental-2024-08-13

建议修改配置如下:

          tag: '[0-9]*'
          latest: '[0-9]*'

或者更严格的语义化版本匹配模式:

          tag: 'v?[0-9]+.[0-9]+.[0-9]+*'
          latest: 'v?[0-9]+.[0-9]+.[0-9]+*'

这样可以:

  • 同时匹配带 v 前缀和不带前缀的版本号
  • 支持语义化版本的所有格式(正式版本和预发布版本)
  • 保持版本号的规范性
🔗 Analysis chain

请确认标签匹配模式的准确性

当前配置使用 1* 作为标签匹配模式,这可能会错过其他有效的版本号格式。建议考虑使用更灵活的模式。

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 检查仓库现有的标签格式
git ls-remote --tags origin | grep -v '\^{}' | awk -F'/' '{print $NF}'

Length of output: 211

Copy link

github-actions bot commented Dec 24, 2024

Preview is ready

Copy link

codecov bot commented Dec 24, 2024

Bundle Report

Bundle size has no change ✅

Copy link

github-actions bot commented Dec 24, 2024

size-limit report 📦

Path Size
dist/antdx.min.js 40.68 KB

Copy link

codecov bot commented Dec 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.45%. Comparing base (c941e17) to head (ed8e0c0).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #401   +/-   ##
=======================================
  Coverage   91.45%   91.45%           
=======================================
  Files          67       67           
  Lines        1462     1462           
  Branches      370      384   +14     
=======================================
  Hits         1337     1337           
  Misses        125      125           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

Deploying ant-design-x with  Cloudflare Pages  Cloudflare Pages

Latest commit: ed8e0c0
Status:⚡️  Build in progress...

View logs

@YumoImer YumoImer requested a review from a team December 24, 2024 09:28
@YumoImer YumoImer merged commit 8d46606 into main Dec 24, 2024
14 of 15 checks passed
@YumoImer YumoImer deleted the chore/release-to-dingtalk branch December 24, 2024 09:49
YumoImer added a commit that referenced this pull request Dec 25, 2024
* chore: update version

* docs: update changelog of 1.0.4

* docs: fix

* docs: update img link (#395)

* refactor: delete repetitive style import (#394)

* feat: Sender support focus. (#397)

* feat: Sender support focus.

* refactor: demo dom

* chore: update test snap

* fix: ts error

* refactor: remove export SenderRef and use GetRef instead

* refactor: SenderRef

* docs: update SenderRef

* docs: add blur demo

* chore: update test snap

* refactor: useProxyImperativeHandle instead of React.useImperativeHandle

* test: add test for useProxyImperativeHandle

* chore: add DingTalk Release Notification (#401)

* docs: update changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

搞个钉钉机器人把发布信息同步到群里
2 participants