You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement emoji support for pull request descriptions to match commit
message functionality
- Add emoji field to GeneratedPullRequest type
- Update PR system prompt to include gitmoji usage guidelines
- Modify PR service methods to respect use_gitmoji configuration
- Update PR formatting to display emoji in title when present
- Remove word wrapping from PR sections for better web UI display
- Fix textwrap import to use module directly instead of wrap function
- Update test cases to include emoji field in mock data
PR descriptions now support the same emoji functionality as commit
messages, with proper configuration handling and formatting.
"\n\nUse emojis strategically to create visual structure and reinforce section meaning. \
553
+
Use a single gitmoji at the start of the PR title, and include emojis in section headers \
554
+
to create a clean, professional, and visually structured PR description. \
555
+
Choose relevant emojis from the following list:\n\n",
556
+
);
557
+
prompt.push_str(&get_gitmoji_list());
558
+
prompt.push_str(
559
+
"\n\nEmoji placement guidelines:\
560
+
\n- Use emojis in ALL major section headers (## Summary, ## Features, ## Testing, etc.)\
561
+
\n- Include emojis in key sub-section headers within Features for visual hierarchy\
562
+
\n- Use ⚠️ specifically for breaking changes\
563
+
\n- Keep the actual content clean and professional without scattered emojis\
564
+
\n- Choose emojis that reinforce the section's purpose and meaning\
565
+
\n- Maintain consistency in emoji selection across similar sections\
566
+
\n\nRecommended section emojis:\
567
+
\n- 🧩 Summary (puzzle piece for overview)\
568
+
\n- 📦 Features (package for new functionality)\
569
+
\n- 🚀 Core Capabilities (rocket for main features)\
570
+
\n- 🛠 Technical Details (wrench for implementation)\
571
+
\n- 🧪 Testing (test tube for testing info)\
572
+
\n- 📝 Notes (memo for additional context)\
573
+
\n- 🔍 Commits (magnifying glass for commit list)\
574
+
\n- ⚠️ Breaking Changes (warning for breaking changes)\n\n",
575
+
);
576
+
}
577
+
550
578
prompt.push_str(
551
579
"
552
580
Your response must be a valid JSON object with the following structure:
553
581
554
582
{
583
+
\"emoji\": \"string or null\",
555
584
\"title\": \"Clear, descriptive PR title\",
556
585
\"summary\": \"Brief overview of the changes\",
557
-
\"description\": \"Detailed explanation of what was changed and why\",
586
+
\"description\": \"Detailed explanation organized into Features section with sub-sections for Core Capabilities, Technical Details, CLI/Integration details, etc.\",
558
587
\"commits\": [\"List of commit messages included in this PR\"],
1. Analyze the provided context, including commit messages, file changes, and project metadata
567
596
2. Identify the main theme or purpose that unifies all the changes
568
597
3. Create a clear, descriptive title that captures the essence of the PR
569
-
4. Write a concise summary highlighting the key changes and their impact
570
-
5. Provide a detailed description explaining the changes, their rationale, and implementation approach
571
-
6. List all commit messages for reference and traceability
572
-
7. Identify any breaking changes and explain their impact on users or systems
573
-
8. Provide testing instructions if the changes require specific testing procedures
574
-
9. Add any additional notes about deployment, configuration, or other considerations
575
-
10. Construct the final JSON object with all components
598
+
4. If using emojis, select the most appropriate one for the PR type
599
+
5. Write a concise summary highlighting the key changes and their impact
600
+
6. Organize the description into a Features section with logical sub-sections
601
+
7. List all commit messages for reference and traceability
602
+
8. Identify any breaking changes and explain their impact on users or systems
603
+
9. Provide testing instructions if the changes require specific testing procedures
604
+
10. Add any additional notes about deployment, configuration, or other considerations
605
+
11. Construct the final JSON object with all components
576
606
577
607
Example output format:
578
608
579
609
{
580
-
\"title\": \"Add user authentication with JWT tokens and role-based access control\",
581
-
\"summary\": \"Implements a comprehensive authentication system with JWT tokens, user registration/login, and role-based permissions. Includes middleware for route protection and database migrations for user management.\",
582
-
\"description\": \"This PR introduces a complete authentication system to secure the application:\\n\\n**Features Added:**\\n- JWT-based authentication with access and refresh tokens\\n- User registration and login endpoints\\n- Role-based access control (admin, user roles)\\n- Password hashing with bcrypt\\n- Authentication middleware for protected routes\\n\\n**Technical Details:**\\n- Uses industry-standard JWT libraries for token management\\n- Implements secure password storage with salt rounds\\n- Adds database migrations for user and role tables\\n- Includes comprehensive error handling and validation\\n\\n**Security Considerations:**\\n- Tokens expire after 24 hours with refresh mechanism\\n- Passwords are hashed with bcrypt (12 rounds)\\n- CORS configuration updated for authentication headers\",
583
-
\"commits\": [\"abc1234: Add JWT authentication middleware\", \"def5678: Implement user registration endpoint\", \"ghi9012: Add login functionality with password validation\"],
584
-
\"breaking_changes\": [\"All API endpoints now require authentication headers\", \"Database schema changes require migration\"],
585
-
\"testing_notes\": \"Test user registration and login flows. Verify that protected routes reject unauthenticated requests. Check token refresh mechanism with expired tokens.\",
586
-
\"notes\": \"Requires environment variables: JWT_SECRET, JWT_EXPIRES_IN. Run database migrations before deployment.\"
610
+
\"emoji\": \"✨\",
611
+
\"title\": \"Add comprehensive Experience Fragment management system\",
612
+
\"summary\": \"Implements full lifecycle support for Experience Fragments (XFs), including create, retrieve, update, and page integration operations. Adds a unified agent tool, rich CLI interface, and tight AEM manager integration with tenant-specific configuration support.\",
613
+
\"description\": \"### 🚀 Core Capabilities\\n\\n* Unified `manage_experience_fragments` tool with four key operations:\\n * `create`: Create new XFs with optional initial content\\n * `get`: Retrieve existing XF data\\n * `update`: Modify XF content\\n * `add_to_page`: Inject XF references into pages with flexible positioning\\n\\n* AEM manager integration with `createExperienceFragment` and `populateExperienceFragment`\\n* Support for tenant-specific `experienceFragmentComponentType` configuration\\n\\n### 🛠 Technical Details\\n\\n* Secure CSRF token handling for all operations\\n* XF page structure conversion for accurate population\\n* AEM 6.5 vs AEM Cloud component type detection\\n* Unique XF name generation with randomized suffixes\\n* Comprehensive validation and error handling\\n* State change logging for operational observability\\n\\n### 🖥 CLI Tooling\\n\\n* New command-line script with full XF management\\n* Commands: `create`, `update`, `list`, `get`, `delete`, `search`, `info`\\n* Content file input/output support\\n* XF discovery and metadata analysis tools\",
614
+
\"commits\": [\"b1b1f3f: feat(xf): add experience fragment management system\"],
615
+
\"breaking_changes\": [],
616
+
\"testing_notes\": \"Verified XF creation, update, and population. Confirmed CLI command behavior across all operations. Tested page integration and position logic. Checked tenant-specific component resolution.\",
617
+
\"notes\": \"Tenants using non-default XF components must define `experienceFragmentComponentType`. Requires sufficient AEM permissions and CSRF support.\"
587
618
}
588
619
589
-
Ensure that your response is a valid JSON object matching this structure.
620
+
Ensure that your response is a valid JSON object matching this structure. Include an empty string for the emoji if not using one.
0 commit comments