-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
Conversation
📝 Walkthrough变更概述演练这个拉取请求引入了一个新的 GitHub Actions 工作流文件 变更
可能相关的 PR
建议的审阅者
诗歌
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
WalkthroughThis 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
|
changelogs: 'CHANGELOG.en-US.md, CHANGELOG.zh-CN.md' | ||
branch: 'main' | ||
tag: '1*' | ||
latest: '1*' |
There was a problem hiding this comment.
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.
There was a problem hiding this 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
: 建议完善预发布版本过滤规则当前的预发布过滤规则可能不够完整,建议考虑添加
rc
、alpha
等常见的预发布标识。- 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
📒 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
tag: '1*' | ||
latest: '1*' |
There was a problem hiding this comment.
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
Bundle ReportBundle size has no change ✅ |
size-limit report 📦
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
* 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
fix: #280
Summary by CodeRabbit