pr-link-issue

bởi sentry

Thêm một liên kết GitHub issue và ticket Linear của nó vào mô tả của PR hiện tại. Sử dụng khi được yêu cầu "liên kết issue với pr", "điền issue và linear vào pr", "thêm…

npx skills add https://github.com/getsentry/skills --skill pr-link-issue

Link a GitHub Issue + Linear Ticket on a PR

Appends a Sentry-style #### Issues block to a PR description, referencing both the GitHub issue and the Linear ticket pulled from the issue's linear-linkback comment.

Inputs

  • <issue-url> — GitHub issue URL like https://github.com/<owner>/<repo>/issues/<n>. Issue number alone is fine if the PR is in the same repo.
  • (optional) <pr-number> — defaults to the open PR for the current branch.

Steps

  1. Resolve the PR number — skip if user supplied one:

    gh pr view --json number,body -q '.number'
    

    If no PR exists on the branch, stop and tell the user.

  2. Extract issue number + repo from the input URL, or accept a bare #1234 for current repo.

  3. Fetch the Linear ticket from the issue's linear-linkback comment:

    gh issue view <n> --repo <owner>/<repo> --json comments \
      -q '.comments[] | select(.author.login=="linear-code") | .body' \
      | grep -Eioe '[a-z]+-[0-9]+' | head -1
    

    If no match, fall back to asking the user for the Linear key, or omit it.

  4. Read the existing PR body so you can append rather than overwrite:

    gh pr view <pr-number> --json body -q '.body'
    
  5. Construct the new body. If the body is empty, use just the #### Issues block. Otherwise, append it after a blank line. Don't duplicate — if #### Issues is already present, replace that section instead of adding a second one.

    Format:

    #### Issues
    
    * Resolves: #<n>
    * Resolves: <linear-key>
    
  6. Update the PR with a heredoc to preserve newlines:

    gh pr edit <pr-number> --body "$(cat <<'EOF'
    <new body>
    EOF
    )"
    
  7. Confirm by echoing the resulting PR URL:

    gh pr view <pr-number> --json url -q '.url'
    

Notes

  • Linear linkback comments are posted by the GitHub user linear-code. The body contains a markdown link whose text is the Linear key, e.g. PY-2357.
  • Project keys vary per repo (PY-… for sentry-python, JS-… for sentry-javascript, etc.) — the regex [a-z]+-[0-9]+ covers them.
  • Don't strip existing PR content. Always read first, append/replace second.
  • If the issue doesn't have a Linear linkback yet (newly filed), proceed with just the GitHub issue reference and tell the user the Linear key is missing.

Thêm skills từ sentry

add-ai-integration
sentry
Thêm tích hợp nhà cung cấp AI mới vào Sentry JavaScript SDK. Sử dụng khi đóng góp một công cụ đo lường AI mới (OpenAI, Anthropic, Vercel AI, LangChain, v.v.)…
add-cdn-bundle
sentry
Tạo một gói CDN mới cho trình duyệt với các tính năng được chỉ định
agent-prompt
sentry
Hướng dẫn tham khảo để viết các prompt và kỹ năng agent hiệu quả. Sử dụng khi tạo kỹ năng mới
agents-md
sentry
Kỹ năng này nên được sử dụng khi người dùng yêu cầu "tạo AGENTS.md", "cập nhật AGENTS.md", "bảo trì tài liệu agent", "thiết lập CLAUDE.md", hoặc cần duy trì agent…
agents-md
sentry
Tạo và duy trì tài liệu agent tối giản, tín hiệu cao dưới 60 dòng. Áp dụng các phương pháp tốt nhất dựa trên nghiên cứu cho tài liệu hướng đến agent; chất lượng hướng dẫn giảm dần theo độ dài. Yêu cầu ba phần chính: Package Manager, File-Scoped Commands (kiểm
agents-md
sentry
Kỹ năng này nên được sử dụng khi người dùng yêu cầu "tạo AGENTS.md", "cập nhật AGENTS.md", "duy trì tài liệu agent", "thiết lập CLAUDE.md", hoặc cần giữ cho agent…
ai-sdk
sentry
ai-sdk — một kỹ năng có thể cài đặt cho các tác nhân AI, được xuất bản bởi getsentry/webvitals.com.
analytics
sentry
Công cụ và khám phá các sự kiện analytics trong giao diện người dùng của Sentry. Sử dụng khi thêm theo dõi vào các nút, trang, cửa sổ modal hoặc tương tác tùy chỉnh, khi định nghĩa mới…