Çekme Talebi Yönergeleri
Bu belge, XOOPS projelerine çekme isteklerinin gönderilmesine ilişkin kapsamlı yönergeler sağlar. Bu yönergelere uyulması, kod incelemelerinin sorunsuz olmasını ve birleştirme sürelerinin daha hızlı olmasını sağlar.
Çekme İsteği Oluşturmadan Önce
Section titled “Çekme İsteği Oluşturmadan Önce”1. Adım: Mevcut Sorunları Kontrol Edin
Section titled “1. Adım: Mevcut Sorunları Kontrol Edin”1. Visit the GitHub repository2. Go to Issues tab3. Search for existing issues related to your change4. Check both open and closed issuesAdım 2: Depoyu Çatallayın ve Klonlayın
Section titled “Adım 2: Depoyu Çatallayın ve Klonlayın”# Fork the repository on GitHub# Click "Fork" button on the repository page
# Clone your forkgit clone https://github.com/YOUR_USERNAME/XOOPS.gitcd XOOPS
# Add upstream remotegit remote add upstream https://github.com/XOOPS/XOOPS.git
# Verify remotesgit remote -v# Should show: origin (your fork) and upstream (official)Adım 3: Özellik Dalı Oluşturun
Section titled “Adım 3: Özellik Dalı Oluşturun”# Update main branchgit fetch upstreamgit checkout maingit merge upstream/main
# Create feature branch# Use descriptive names: bugfix/issue-number or feature/descriptiongit checkout -b bugfix/123-fix-database-connectiongit checkout -b feature/add-psr-7-support4. Adım: Değişikliklerinizi Yapın
Section titled “4. Adım: Değişikliklerinizi Yapın”# Make changes to your files# Follow code style guidelines
# Stage changesgit add .
# Commit with clear messagegit commit -m "Fix database connection timeout issue"
# Create multiple commits for logical changesgit commit -m "Add connection retry logic"git commit -m "Improve error messages for debugging"Mesaj Standartlarını Taahhüt Et
Section titled “Mesaj Standartlarını Taahhüt Et”İyi Taahhüt Mesajları
Section titled “İyi Taahhüt Mesajları”Aşağıdaki kalıpları takip eden net, açıklayıcı mesajlar kullanın:
# Format<type>: <subject>
<body>
<footer>
# Example 1: Bug fixfix: resolve database connection timeout
Add exponential backoff retry mechanism to database connection.Connections now retry up to 3 times with increasing delays.
Fixes #123# Example 2: Featurefeat: implement PSR-7 HTTP message interfaces
Implement Psr\Http\Message interfaces for request/response handling.Provides type-safe HTTP message handling across the framework.
BREAKING CHANGE: Updated RequestHandler signatureTaahhüt Türü Kategorileri
Section titled “Taahhüt Türü Kategorileri”| Tür | Açıklama | Örnek |
|---|---|---|
feat | Yeni özellik | feat: add user dashboard widget |
fix | Hata düzeltme | fix: resolve cache invalidation bug |
docs | Dokümantasyon | docs: update API reference |
style | Kod stili (mantık değişikliği yok) | style: format imports |
refactor | Kodu yeniden düzenleme | refactor: simplify service layer |
perf | Performans iyileştirme | perf: optimize database queries |
test | Değişiklikleri test edin | test: add integration tests |
chore | Build/tooling değişiklikler | chore: update dependencies |
Çekme İsteği Açıklaması
Section titled “Çekme İsteği Açıklaması”Halkla İlişkiler Şablonu
Section titled “Halkla İlişkiler Şablonu”## DescriptionClear description of changes made and why.
## Type of Change- [ ] Bug fix- [ ] New feature- [ ] Breaking change- [ ] Documentation update
## Related IssuesCloses #123Related to #456
## Changes Made- Change 1- Change 2- Change 3
## Testing- [ ] Tested locally- [ ] All tests pass- [ ] Added new tests- [ ] Manual testing steps included
## Checklist- [ ] Code follows style guidelines- [ ] Self-review completed- [ ] Comments added for complex logic- [ ] Documentation updated- [ ] No new warnings generated- [ ] Added tests for new functionality- [ ] All tests passingKod Kalitesi Gereksinimleri
Section titled “Kod Kalitesi Gereksinimleri”Kod Stili
Section titled “Kod Stili”Kod Stili yönergelerini izleyin:
<?php// Good: PSR-12 stylenamespace MyModule\Controller;
use MyModule\Model\Item;use MyModule\Repository\ItemRepository;
class ItemController{ private ItemRepository $repository;
public function __construct(ItemRepository $repository) { $this->repository = $repository; }
public function indexAction() { $items = $this->repository->findAll(); return $this->render('items', ['items' => $items]); }}Test Gereksinimleri
Section titled “Test Gereksinimleri”Birim Testleri
Section titled “Birim Testleri”namespace Tests\Feature;
use PHPUnit\Framework\TestCase;use Xoops\Database\XoopsDatabase;
class DatabaseConnectionTest extends TestCase{ private XoopsDatabase $database;
protected function setUp(): void { $this->database = new XoopsDatabase(); }
public function testConnectionWithValidCredentials() { $result = $this->database->connect(); $this->assertTrue($result); }
public function testConnectionWithInvalidCredentials() { $this->database->setCredentials('invalid', 'invalid'); $result = $this->database->connect(); $this->assertFalse($result); }}Testleri Çalıştırma
Section titled “Testleri Çalıştırma”# Run all testsvendor/bin/phpunit
# Run specific test filevendor/bin/phpunit tests/Feature/DatabaseConnectionTest.php
# Run with coveragevendor/bin/phpunit --coverage-html coverage/Şubelerle Çalışmak
Section titled “Şubelerle Çalışmak”Şubeyi Güncel Tutun
Section titled “Şubeyi Güncel Tutun”# Fetch latest from upstreamgit fetch upstream
# Rebase on latest maingit rebase upstream/main
# Or merge if you prefergit merge upstream/main
# Force push if rebased (warning: only on your branch!)git push -f origin bugfix/123-fix-database-connectionÇekme İsteğini Oluşturma
Section titled “Çekme İsteğini Oluşturma”PR Başlık Formatı
Section titled “PR Başlık Formatı”[Type] Short description (fix/feature/docs)
Examples:- [FIX] Resolve database connection timeout issue (#123)- [FEATURE] Implement PSR-7 HTTP message interfaces- [DOCS] Update API reference for Criteria classKod İnceleme Süreci
Section titled “Kod İnceleme Süreci”İncelemecilerin Aradığı Şeyler
Section titled “İncelemecilerin Aradığı Şeyler”-
Doğruluk
- Kod belirtilen sorunu çözüyor mu?
- Son vakalar ele alınıyor mu?
- Hata işleme uygun mu?
-
Kalite
- Kodlama standartlarına uyuyor mu?
- Bakımı yapılabilir mi?
- İyice test edilmiş mi?
-
Performans
- Herhangi bir performans gerilemesi var mı?
- Sorgular optimize edildi mi?
- Bellek kullanımı makul mü?
-
Güvenlik
- Giriş doğrulaması mı?
- SQL enjeksiyonun önlenmesi?
- Authentication/authorization?
Geri Bildirime Yanıt Verme
Section titled “Geri Bildirime Yanıt Verme”# Address feedback# Edit files based on review comments
# Commit changesgit commit -m "Address code review feedback
- Add additional error handling- Improve test coverage for edge cases- Update documentation"
# Push changesgit push origin bugfix/123-fix-database-connectionYaygın Halkla İlişkiler Sorunları ve Çözümleri
Section titled “Yaygın Halkla İlişkiler Sorunları ve Çözümleri”Sayı 1: Halkla İlişkiler Çok Büyük
Section titled “Sayı 1: Halkla İlişkiler Çok Büyük”Sorun: İncelemeciler büyük PR’ları etkili bir şekilde inceleyemiyor
Çözüm: Daha küçük PR’lere bölün
- İlk PR: Temel değişiklikler
- İkinci Halkla İlişkiler: Testler
- Üçüncü Halkla İlişkiler: Dokümantasyon
Sayı 2: Test Dahil Değil
Section titled “Sayı 2: Test Dahil Değil”Sorun: İncelemeciler işlevselliği doğrulayamıyor
Çözüm: Göndermeden önce kapsamlı testler ekleyin
Sayı 3: Ana ile Çatışmalar
Section titled “Sayı 3: Ana ile Çatışmalar”Sorun: Şubeniz ana şubeyle senkronize değil
Çözüm: En son ana temele göre yeniden temel alın
git fetch upstreamgit rebase upstream/maingit push -f origin your-branchBirleştirmeden Sonra
Section titled “Birleştirmeden Sonra”Temizleme
Section titled “Temizleme”# Switch to maingit checkout main
# Update maingit pull upstream main
# Delete local branchgit branch -d bugfix/123-fix-database-connection
# Delete remote branchgit push origin --delete bugfix/123-fix-database-connectionEn İyi Uygulamaların Özeti
Section titled “En İyi Uygulamaların Özeti”Yapılacaklar
Section titled “Yapılacaklar”- Açıklayıcı taahhüt mesajları oluşturun
- Odaklanmış, tek amaçlı halkla ilişkiler çalışmaları yapın
- Yeni işlevlere yönelik testleri dahil edin
- Belgeleri güncelleyin
- Referansla ilgili sorunlar
- PR açıklamalarını net tutun
- İncelemelere hemen yanıt verin
Yapılmaması Gerekenler
Section titled “Yapılmaması Gerekenler”- İlgisiz değişiklikleri dahil et
- Ana şubenizi şubenizle birleştirin (rebase kullanın)
- İnceleme başladıktan sonra zorlamaya zorla
- Testleri atla
- Devam eden çalışmayı gönderin
- Kod inceleme geri bildirimlerini dikkate almayın
İlgili Belgeler
Section titled “İlgili Belgeler”- ../Contributing - Katkıda bulunanlara genel bakış
- Kod Stili - Kod stili yönergeleri
- ../../03-Module-Development/Best-Practices/Testing - En iyi uygulamaları test etme
- ../Architecture-Decisions/ADR-Index - Mimari yönergeler
Kaynaklar
Section titled “Kaynaklar”Son Güncelleme: 2026-01-31 Geçerli olduğu yerler: Tüm XOOPS projeleri Depo: https://github.com/XOOPS/XOOPS