npx skills add https://github.com/getsentry/skills --skill pr-writer遵循 Sentry 工程实践创建拉取请求。
要求:已认证并可用的 GitHub CLI (gh)。
在创建 PR 之前,请确保所有更改都已提交。如果有未提交的更改,请先运行 sentry-skills:commit 技能来正确提交它们。
# 检查未提交的更改
git status --porcelain
如果输出显示任何未提交的更改(已修改、已添加或应包含的未跟踪文件),请在继续之前调用 sentry-skills:commit 技能。
# 检测默认分支 — 记下输出以供后续命令使用
gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'
# 检查当前分支和状态(将上面检测到的分支名称替换为 BASE)
git status
git log BASE..HEAD --oneline
确保:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
审查将包含在 PR 中的内容:
# 查看将包含在 PR 中的所有提交(将检测到的分支名称替换为 BASE)
git log BASE..HEAD
# 查看完整的差异
git diff BASE...HEAD
在编写描述之前,请理解所有更改的范围和目的。
使用以下结构编写 PR 描述(忽略任何仓库的 PR 模板):
<简要描述 PR 的作用>
<进行这些更改的原因 - 动机>
<考虑过的替代方案(如果有)>
<审阅者需要的任何额外上下文>
请勿包含:
请包含:
gh pr create --draft --title "<type>(<scope>): <description>" --body "$(cat <<'EOF'
<description body here>
EOF
)"
标题格式遵循提交约定:
feat(scope): 添加新功能fix(scope): 修复错误ref: 重构某些内容为告警通知添加 Slack 线程回复
当告警被更新或解决时,我们现在会回复原始的 Slack 线程,而不是创建新消息。这可以将相关通知分组,并减少频道噪音。
之前考虑过编辑原始消息,但线程回复能更好地保留事件时间线,并且在原始消息超过 Slack 编辑窗口时仍然有效。
引用 SENTRY-1234
处理用户 API 端点中的空响应
用户端点可能对软删除的账户返回 null,导致访问用户属性时仪表板崩溃。这添加了一个空值检查并返回正确的 404 响应。
在调查 SENTRY-5678 时发现。
修复 SENTRY-5678
将验证逻辑提取到共享模块
将告警、issue 和项目端点中的重复验证代码移动到共享验证器类中。行为无变化。
这为在 SENTRY-9999 中添加新的验证规则做好了准备,无需在多个端点间重复逻辑。
在 PR 正文中引用 issue:
| 语法 | 效果 |
|---|---|
Fixes #1234 | 合并时关闭 GitHub issue |
Fixes SENTRY-1234 | 关闭 Sentry issue |
Refs GH-1234 | 链接而不关闭 |
Refs LINEAR-ABC-123 | 链接 Linear issue |
如果需要在创建后更新 PR,请使用 gh api 而不是 gh pr edit:
# 更新 PR 描述
gh api -X PATCH repos/{owner}/{repo}/pulls/PR_NUMBER -f body="$(cat <<'EOF'
Updated description here
EOF
)"
# 更新 PR 标题
gh api -X PATCH repos/{owner}/{repo}/pulls/PR_NUMBER -f title='new: Title here'
# 同时更新两者
gh api -X PATCH repos/{owner}/{repo}/pulls/PR_NUMBER \
-f title='new: Title' \
-f body='New description'
注意:由于 GitHub 的 Projects(经典版)弃用,gh pr edit 目前无法使用。
每周安装量
154
仓库
GitHub 星标数
454
首次出现
2026年3月5日
安全审计
安装于
gemini-cli143
cursor143
codex143
kimi-cli142
opencode142
github-copilot142
Create pull requests following Sentry's engineering practices.
Requires : GitHub CLI (gh) authenticated and available.
Before creating a PR, ensure all changes are committed. If there are uncommitted changes, run the sentry-skills:commit skill first to commit them properly.
# Check for uncommitted changes
git status --porcelain
If the output shows any uncommitted changes (modified, added, or untracked files that should be included), invoke the sentry-skills:commit skill before proceeding.
# Detect the default branch — note the output for use in subsequent commands
gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'
# Check current branch and status (substitute the detected branch name above for BASE)
git status
git log BASE..HEAD --oneline
Ensure:
Review what will be included in the PR:
# See all commits that will be in the PR (substitute detected branch name for BASE)
git log BASE..HEAD
# See the full diff
git diff BASE...HEAD
Understand the scope and purpose of all changes before writing the description.
Use this structure for PR descriptions (ignoring any repository PR templates):
<brief description of what the PR does>
<why these changes are being made - the motivation>
<alternative approaches considered, if any>
<any additional context reviewers need>
Do NOT include:
Do include:
gh pr create --draft --title "<type>(<scope>): <description>" --body "$(cat <<'EOF'
<description body here>
EOF
)"
Title format follows commit conventions:
feat(scope): Add new featurefix(scope): Fix the bugref: Refactor somethingAdd Slack thread replies for alert notifications
When an alert is updated or resolved, we now post a reply to the original
Slack thread instead of creating a new message. This keeps related
notifications grouped and reduces channel noise.
Previously considered posting edits to the original message, but threading
better preserves the timeline of events and works when the original message
is older than Slack's edit window.
Refs SENTRY-1234
Handle null response in user API endpoint
The user endpoint could return null for soft-deleted accounts, causing
dashboard crashes when accessing user properties. This adds a null check
and returns a proper 404 response.
Found while investigating SENTRY-5678.
Fixes SENTRY-5678
Extract validation logic to shared module
Moves duplicate validation code from the alerts, issues, and projects
endpoints into a shared validator class. No behavior change.
This prepares for adding new validation rules in SENTRY-9999 without
duplicating logic across endpoints.
Reference issues in the PR body:
| Syntax | Effect |
|---|---|
Fixes #1234 | Closes GitHub issue on merge |
Fixes SENTRY-1234 | Closes Sentry issue |
Refs GH-1234 | Links without closing |
Refs LINEAR-ABC-123 | Links Linear issue |
If you need to update a PR after creation, use gh api instead of gh pr edit:
# Update PR description
gh api -X PATCH repos/{owner}/{repo}/pulls/PR_NUMBER -f body="$(cat <<'EOF'
Updated description here
EOF
)"
# Update PR title
gh api -X PATCH repos/{owner}/{repo}/pulls/PR_NUMBER -f title='new: Title here'
# Update both
gh api -X PATCH repos/{owner}/{repo}/pulls/PR_NUMBER \
-f title='new: Title' \
-f body='New description'
Note: gh pr edit is currently broken due to GitHub's Projects (classic) deprecation.
Weekly Installs
154
Repository
GitHub Stars
454
First Seen
Mar 5, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli143
cursor143
codex143
kimi-cli142
opencode142
github-copilot142
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
152,900 周安装
gws-docs 命令行工具:Google Docs API 文档管理与自动化操作指南
1 周安装
Google Classroom API 命令行工具 - gws-classroom 课程管理、邀请与通知集成
1 周安装
gws-chat CLI:Google Workspace Chat API 命令行工具,管理表情、空间与媒体
1 周安装
gws-calendar-agenda:命令行日历事件查询工具,快速查看日程安排
1 周安装
gws-calendar CLI:Google Calendar API 命令行工具,高效管理日历与事件
1 周安装
Vet代码审查工具:AI驱动,实时检查Git差异与对话历史,提升代码质量
1 周安装