-
Notifications
You must be signed in to change notification settings - Fork 2
Introduce PR template compatibility and enhance template management #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Updated various dependencies to their latest versions. Key updates include: - `@ai-sdk/anthropic` from `^2.0.8` to `^2.0.15` - `@ai-sdk/google` from `^2.0.11` to `^2.0.13` - `@ai-sdk/openai` from `^2.0.22` to `^2.0.27` - `ai` from `^5.0.26` to `^5.0.39` - `eslint` from `^9.34.0` to `^9.35.0` - `typescript-eslint` from `^8.41.0` to `^8.43.0`
Introduced logic to detect and utilize repository-specific PR templates, enhancing compliance with project guidelines. The PR generation prompt is now dynamically adjusted based on whether a template is found, ensuring the generated PR description adheres to the template's structure. Adjusted the PR generation flow to allow PR creation even if `options.yes` or `options.force` are not set, providing more flexibility. Also added an informative message when the branch is already up-to-date with the remote.
This commit introduces a PR template to ensure consistent and informative pull request descriptions. The template provides sections for change summaries, type of changes, and a checklist for PR best practices. This helps streamline the review process and maintain code quality standards.
…rafael/introduce-pr-template-compat
Previously, the `--pr` option only functioned if new commits were generated. This change modifies the condition to allow PR creation independently, enabling its use for existing branches with or without recent commits.
Adjust spacing and empty lines in bug report and feature request templates for better readability and consistency with markdown best practices.
Enhance the `listDirectory` function to correctly handle directory paths and extract filenames. This ensures accurate listing of PR templates, improving compatibility.
Updated the bug report and feature request issue templates to be more direct and concise. This change removes verbose sections, focusing on essential information to improve the efficiency of issue submission and review processes.
Modified the instructions for the PR description generator to emphasize factual, concise, and pragmatic communication. This change aims to produce more accurate and less embellished PR titles and bodies, adhering strictly to the provided templates without exaggeration or conventional commit prefixes.
This template provides a standardized structure for pull requests, aiming to: - Improve clarity and consistency across all contributions. - Guide contributors on necessary information, such as type of change, description, and checklist items. - Streamline the review process for maintainers.
This change introduces a new `reset.d.ts` file to provide a type definition for a global `reset` function. This ensures that the function is properly typed and available within the project's TypeScript environment. The `package.json` and `bun.lock` files are updated to reflect the new type definition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces comprehensive PR template compatibility to automatically detect and utilize templates from the .github/PULL_REQUEST_TEMPLATE directory, enhances overall template management, and updates various dependencies.
- Adds PR template discovery functionality with support for multiple template locations and formats
- Updates AI instruction system to follow repository PR templates when generating PR descriptions
- Refactors PR creation workflow to allow PR generation even without new commits
Reviewed Changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| template.ts | New module implementing PR template discovery and analysis functionality |
| pr.ts | Updated to integrate PR template detection and modified commit checking logic |
| constants.ts | Enhanced PR instruction generation to support template-based descriptions |
| index.ts | Modified PR option description and reordered push/PR handling logic |
| package.json | Updated AI SDK and other development dependencies to newer versions |
| .github/PULL_REQUEST_TEMPLATE/pull_request_template.md | Simplified PR template structure |
| .github/ISSUE_TEMPLATE/feature_request.md | Streamlined feature request template format |
| .github/ISSUE_TEMPLATE/bug_report.md | Condensed bug report template structure |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| } else if (unpushedCommits.total === 0) { | ||
| log.info("Branch is already up to date with remote! 👍"); |
Copilot
AI
Sep 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This condition will never be reached because the code above already checks if unpushedCommits.total > 0 and returns early if the user doesn't confirm pushing. The else if should be just else since it only handles the case where unpushedCommits.total === 0.
| await handlePush({ git, log, spinner }); | ||
| } | ||
|
|
||
| if ((commitCount > 0 && !options.force && !options.yes) || options.pr) { |
Copilot
AI
Sep 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition logic is complex and hard to read. Consider extracting this into a meaningful variable like shouldHandlePullRequest to improve readability and make the intent clearer.
Changes
.github/PULL_REQUEST_TEMPLATEdirectory for new pull requests.Related Issues