משוך את הנחיות הבקשה
מסמך זה מספק הנחיות מקיפות להגשת בקשות משיכה לפרויקטים של XOOPS. הקפדה על הנחיות אלו מבטיחה סקירת קוד חלקה וזמני מיזוג מהירים יותר.
לפני יצירת בקשת משיכה
Section titled “לפני יצירת בקשת משיכה”שלב 1: בדוק אם קיימים בעיות
Section titled “שלב 1: בדוק אם קיימים בעיות”1. Visit the GitHub repository2. Go to Issues tab3. Search for existing issues related to your change4. Check both open and closed issuesשלב 2: מזלג ושכפל את המאגר
Section titled “שלב 2: מזלג ושכפל את המאגר”# 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)שלב 3: צור סניף תכונה
Section titled “שלב 3: צור סניף תכונה”# 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-supportשלב 4: בצע את השינויים שלך
Section titled “שלב 4: בצע את השינויים שלך”# 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"התחייבות לתקני הודעה
Section titled “התחייבות לתקני הודעה”Good Commit Messages
Section titled “Good Commit Messages”השתמש בהודעות ברורות ותיאוריות בהתאם לדפוסים הבאים:
# 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 signatureקטגוריות סוג התחייבות
Section titled “קטגוריות סוג התחייבות”| הקלד | תיאור | דוגמה |
|---|---|---|
feat | תכונה חדשה | feat: add user dashboard widget |
fix | תיקון באגים | fix: resolve cache invalidation bug |
docs | תיעוד | docs: update API reference |
style | סגנון קוד (ללא שינוי הגיוני) | style: format imports |
refactor | Refactoring קוד | refactor: simplify service layer |
perf | שיפור ביצועים | perf: optimize database queries |
test | שינויים בבדיקה | test: add integration tests |
chore | Build/tooling שינויים | chore: update dependencies |
Pull Request Description
Section titled “Pull Request Description”תבנית יחסי ציבור
Section titled “תבנית יחסי ציבור”## 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 passingדרישות איכות הקוד
Section titled “דרישות איכות הקוד”סגנון קוד
Section titled “סגנון קוד”פעל לפי הנחיות סגנון קוד:
<?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]); }}דרישות בדיקה
Section titled “דרישות בדיקה”בדיקות יחידה
Section titled “בדיקות יחידה”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); }}בדיקות ריצה
Section titled “בדיקות ריצה”# Run all testsvendor/bin/phpunit
# Run specific test filevendor/bin/phpunit tests/Feature/DatabaseConnectionTest.php
# Run with coveragevendor/bin/phpunit --coverage-html coverage/עבודה עם סניפים
Section titled “עבודה עם סניפים”עדכן את הסניף
Section titled “עדכן את הסניף”# 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יצירת בקשת המשיכה
Section titled “יצירת בקשת המשיכה”פורמט כותרת יחסי ציבור
Section titled “פורמט כותרת יחסי ציבור”[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 classתהליך סקירת קוד
Section titled “תהליך סקירת קוד”מה הסוקרים מחפשים
Section titled “מה הסוקרים מחפשים”-
נכונות
- האם הקוד פותר את הבעיה המוצהרת?
- האם תיקי קצה מטופלים?
- האם טיפול בשגיאות מתאים?
-
איכות
- האם זה עומד בתקני קידוד?
- האם ניתן לתחזוקה?
- האם זה נבדק היטב?
-
ביצועים
- יש רגרסיות בביצועים?
- האם השאילתות עוברות אופטימיזציה?
- האם השימוש בזיכרון סביר?
-
אבטחה
- אימות קלט?
- SQL מניעת הזרקה?
- Authentication/authorization?
תגובה למשוב
Section titled “תגובה למשוב”# 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-connectionבעיות ופתרונות נפוצים של יחסי ציבור
Section titled “בעיות ופתרונות נפוצים של יחסי ציבור”בעיה 1: יחסי ציבור גדולים מדי
Section titled “בעיה 1: יחסי ציבור גדולים מדי”בעיה: סוקרים לא יכולים לסקור יחסי ציבור מסיביים ביעילות
פתרון: חלקו לאנשי יחסי ציבור קטנים יותר
- יחסי ציבור ראשונים: שינויים הליבה
- יחסי ציבור שני: מבחנים
- יחסי ציבור שלישי: תיעוד
בעיה 2: אין בדיקות כלולים
Section titled “בעיה 2: אין בדיקות כלולים”בעיה: בודקים לא יכולים לאמת את הפונקציונליות
פתרון: הוסף מבחנים מקיפים לפני ההגשה
בעיה 3: התנגשות עם ראשי
Section titled “בעיה 3: התנגשות עם ראשי”בעיה: הסניף שלך לא מסונכרן עם הראשי
פתרון: בסיס מחדש ב-main האחרון
git fetch upstreamgit rebase upstream/maingit push -f origin your-branchלאחר המיזוג
Section titled “לאחר המיזוג”# 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-connectionסיכום שיטות עבודה מומלצות
Section titled “סיכום שיטות עבודה מומלצות”מה לעשות
Section titled “מה לעשות”- צור הודעות מחויבות תיאוריות
- צור יחסי ציבור ממוקדים, חד-תכליתיים
- כלול בדיקות לפונקציונליות חדשה
- עדכון תיעוד
- התייחסות לנושאים הקשורים
- שמור על תיאורי יחסי ציבור ברורים
- השב מייד לביקורות
אל תעשה
Section titled “אל תעשה”- כלול שינויים לא קשורים
- מיזוג ראשי לתוך הסניף שלך (השתמש בבסיס מחדש)
- דחיפה בכוח לאחר תחילת הבדיקה
- דלג על מבחנים
- הגשת עבודות בתהליך
- התעלם ממשוב על סקירת קוד
תיעוד קשור
Section titled “תיעוד קשור”- ../Contributing - סקירה תורמת
- סגנון קוד - הנחיות סגנון קוד
- ../../03-Module-Development/Best-Practices/Testing - בדיקות שיטות עבודה מומלצות
- ../Architecture-Decisions/ADR-Index - הנחיות אדריכליות
משאבים
Section titled “משאבים”עדכון אחרון: 2026-01-31 חל על: כל הפרויקטים XOOPS מאגר: https://github.com/XOOPS/XOOPS