AgentStack
SKILL verified MIT Self-run

Github Pr Workflow

skill-furkangonel-cowrangler-github-pr-workflow · by furkangonel

GitHub PR yaşam döngüsü — branch, commit, aç, CI izle, merge et.

No reviews yet
0 installs
3 views
0.0% view→install

Install

$ agentstack add skill-furkangonel-cowrangler-github-pr-workflow

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access Used
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Github Pr Workflow? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

GitHub Pull Request İş Akışı

PR yaşam döngüsünü yönetmek için kapsamlı rehber. Her bölüm önce gh CLI yolunu, ardından git + curl geri dönüş yolunu gösterir.

Ön Koşullar

  • GitHub'a kimlik doğrulama yapılmış (gh auth login veya GITHUB_TOKEN env değişkeni)
  • GitHub remote'u olan bir git deposunun içinde

Auth Algılama

if command -v gh &>/dev/null && gh auth status &>/dev/null; then
  AUTH="gh"
else
  AUTH="git"
  if [ -z "$GITHUB_TOKEN" ]; then
    GITHUB_TOKEN=$(grep "^GITHUB_TOKEN=" ~/.cowrangler/credentials.env 2>/dev/null | head -1 | cut -d= -f2 | tr -d '\n\r')
  fi
fi

REMOTE_URL=$(git remote get-url origin)
OWNER_REPO=$(echo "$REMOTE_URL" | sed -E 's|.*github\.com[:/]||; s|\.git$||')
OWNER=$(echo "$OWNER_REPO" | cut -d/ -f1)
REPO=$(echo "$OWNER_REPO" | cut -d/ -f2)

1. Branch Oluştur

git fetch origin
git checkout main && git pull origin main
git checkout -b feat/kullanici-girisi-ekle

Branch isimlendirme:

  • feat/açıklama — yeni özellikler
  • fix/açıklama — hata düzeltmeleri
  • refactor/açıklama — yeniden yapılandırma
  • docs/açıklama — belgeler
  • ci/açıklama — CI/CD değişiklikleri

2. Commit

git add src/auth.ts tests/auth.test.ts
git commit -m "feat: JWT tabanlı kullanıcı kimlik doğrulaması ekle

- Giriş/kayıt endpoint'leri eklendi
- Şifre hashleme ile User modeli eklendi
- Korumalı route'lar için auth middleware eklendi"

Conventional Commits formatı:

type(scope): kısa açıklama

Gerekirse uzun açıklama. 72 karakterde sar.

Tipler: feat, fix, refactor, docs, test, ci, chore, perf

3. Push ve PR Oluştur

git push -u origin HEAD

gh ile:

gh pr create \
  --title "feat: JWT tabanlı kullanıcı kimlik doğrulaması" \
  --body "## Özet
- Giriş/kayıt API endpoint'leri
- JWT token üretimi ve doğrulaması

## Test Planı
- [ ] Birim testleri geçiyor

Closes #42"

curl ile:

BRANCH=$(git branch --show-current)
curl -s -X POST \
  -H "Authorization: token $GITHUB_TOKEN" \
  -H "Accept: application/vnd.github.v3+json" \
  https://api.github.com/repos/$OWNER/$REPO/pulls \
  -d "{\"title\":\"feat: JWT kimlik doğrulaması\",\"body\":\"Closes #42\",\"head\":\"$BRANCH\",\"base\":\"main\"}"

4. CI Durumunu İzle

gh ile:

gh pr checks          # Anlık kontrol
gh pr checks --watch  # Tamamlanana kadar izle

curl ile:

SHA=$(git rev-parse HEAD)
curl -s -H "Authorization: token $GITHUB_TOKEN" \
  https://api.github.com/repos/$OWNER/$REPO/commits/$SHA/status \
  | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['state'])"

5. CI Hatalarını Otomatik Düzelt

CI başarısız olduğunda şu döngüyü izle:

  1. CI durumunu kontrol et → hataları tespit et
  2. Hata loglarını oku → sorunu anla
  3. read_file + patch/write_file → kodu düzelt
  4. git add . && git commit -m "fix: ..." && git push
  5. CI'ı bekle → durumu tekrar kontrol et
  6. Hala başarısız → 3 deneme sonra kullanıcıya sor

gh ile log okuma:

gh run list --branch $(git branch --show-current) --limit 5
gh run view  --log-failed

6. Merge

gh ile:

gh pr merge --squash --delete-branch
gh pr merge --auto --squash --delete-branch  # CI geçince otomatik merge

curl ile:

PR_NUMBER=
curl -s -X PUT \
  -H "Authorization: token $GITHUB_TOKEN" \
  https://api.github.com/repos/$OWNER/$REPO/pulls/$PR_NUMBER/merge \
  -d "{\"merge_method\":\"squash\",\"commit_title\":\"feat: kimlik doğrulaması (#$PR_NUMBER)\"}"

# Branch sil
BRANCH=$(git branch --show-current)
git push origin --delete $BRANCH
git checkout main && git pull origin main && git branch -d $BRANCH

Yararlı PR Komutları

| Aksiyon | gh | curl | |---------|-----|------| | PR'larımı listele | gh pr list --author @me | curl ... /pulls?state=open | | Diff görüntüle | gh pr diff | git diff main...HEAD | | Yorum ekle | gh pr comment N --body "..." | curl -X POST .../issues/N/comments | | İnceleme iste | gh pr edit N --add-reviewer kullanici | curl -X POST .../requested_reviewers | | PR kapat | gh pr close N | curl -X PATCH .../pulls/N -d '{"state":"closed"}' | | PR'ı checkout et | gh pr checkout N | git fetch origin pull/N/head:pr-N && git checkout pr-N |

Why/Failure Modes

[TODO: Explain the reasoning behind this skill's approach and common failure modes to avoid.]

Standalone vs Supercharged

[TODO: Describe how this skill works on its own vs when combined with other tools/context.]

Cross-References

[TODO: Link to other relevant skills or documentation.]

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.