agentsclimarketplace

Github pr workflow

Skill furkangonel/cowrangler/bundled_skills/github-pr-workflow

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

Install
npx -y skills add furkangonel/cowrangler --skill github-pr-workflow

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

4.8 KB, ~1.5k tokens by cl100k_base, as published. Nobody here has run it

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 <RUN_ID> --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=<numara>
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ı

Aksiyonghcurl
PR'larımı listelegh pr list --author @mecurl ... /pulls?state=open
Diff görüntülegh pr diffgit diff main...HEAD
Yorum eklegh pr comment N --body "..."curl -X POST .../issues/N/comments
İnceleme istegh pr edit N --add-reviewer kullanicicurl -X POST .../requested_reviewers
PR kapatgh pr close Ncurl -X PATCH .../pulls/N -d '{"state":"closed"}'
PR'ı checkout etgh pr checkout Ngit 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.]

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.