raise-pr

bởi openshift

Quy trình từng bước để commit các thay đổi đã staged và mở pull request trong repo lightspeed-service.

npx skills add https://github.com/openshift/lightspeed-service --skill raise-pr

Create a PR

Step 1: Branch

git fetch upstream
git branch --show-current
git log --oneline upstream/main..HEAD
git diff upstream/main --stat
gh pr list --head "$(git branch --show-current)" --state open

Present the summary and ask before proceeding:

"You are currently on branch <branch>. It has <N> commit(s) ahead of upstream/main touching: <files>. [If an open PR exists]: This branch already has an open PR: <url>. Pushing here would add commits to that existing PR. Should I create a new branch from upstream/main (recommended), or use the current branch?"

Do not continue until the user answers.

If creating a new branch — git carries uncommitted changes automatically:

git fetch upstream
git checkout -b <type>/<short-description> upstream/main
# cherry-pick intended commits from the old branch if needed
git cherry-pick <sha1> <sha2> ...

Never branch from origin/main — the fork may have stale commits that will appear in the PR.

Step 2: Pre-commit checks

Run in order and fix all failures before proceeding:

  1. make test-unit
  2. make test-integration
  3. make verify
  4. Confirm 90%+ coverage is maintained for changed code

Step 3: Commit and push

If a Jira issue ID has not been provided, ask the user for it before proceeding.

Commit message: short imperative sentence, no period, no conventional prefix, no Jira ID.

git add -A   # or only the relevant files
git commit -m "<message>"
git push -u origin HEAD

Step 4: Open the PR

Title format: <JIRA-ID>: <same short imperative sentence as commit>

Read .github/PULL_REQUEST_TEMPLATE.md and populate all sections:

  • Description — what the change does and why, derived from the diff
  • Type of change — tick the relevant checkbox(es)
  • Related Tickets & DocumentsCloses #<github-issue> if it resolves one; always link the Jira ticket
  • Checklist — tick what applies; leave unticked items that genuinely don't apply
  • Testing — describe how the change was verified
gh pr create --title "<JIRA-ID>: <description>" --body "$(cat <<'EOF'
<populated template>
EOF
)"

Return the PR URL to the user when done.

Thêm skills từ openshift

openshift-expert
openshift
Chuyên gia nền tảng OpenShift và Kubernetes với kiến thức sâu về kiến trúc cluster, operators, mạng, lưu trữ, xử lý sự cố và pipeline CI/CD. Sử dụng…
official
find-token
openshift
Tìm mã xác thực ẩn. Chạy tập lệnh find-token để lấy mã duy nhất.
official
code-review
openshift
Xem xét một pull request về chất lượng mã, tính đúng đắn và các quy ước của dự án. Sử dụng khi người dùng yêu cầu xem xét một PR, đánh giá mã, hoặc kiểm tra các thay đổi trên một…
official
css-review
openshift
Xem xét CSS về phong cách mã hóa, cách sử dụng token PatternFly và các phương pháp tốt nhất. Sử dụng khi người dùng yêu cầu xem xét CSS, kiểm tra kiểu dáng hoặc kiểm tra các tệp CSS.
official
review-readmes
openshift
Xem xét tất cả các tệp README.md trong kho lưu trữ để tìm lỗi chính tả, lỗi sai và thông tin lỗi thời. Sử dụng khi người dùng yêu cầu xem xét README, kiểm tra độ chính xác của tài liệu, hoặc…
official
review-skills
openshift
Xem xét các kỹ năng AI của dự án để phát hiện trùng lặp, tham chiếu lỗi thời, sai sót và vấn đề cấu trúc. Sử dụng khi người dùng yêu cầu xem xét kỹ năng, kiểm tra kỹ năng, kiểm tra…
official
test
openshift
Chạy kiểm thử đầu cuối được lọc theo thẻ. Sử dụng khi người dùng yêu cầu chạy kiểm thử, chạy Playwright, hoặc kiểm thử một tính năng cụ thể có thẻ như @core hoặc @attach.
official
unused-exports
openshift
Tìm các ký hiệu được xuất khẩu nhưng không bao giờ được nhập vào tệp khác. Sử dụng khi người dùng nói "kiểm tra xuất khẩu", "xuất khẩu không dùng" hoặc yêu cầu dọn dẹp xuất khẩu.
official