fix(submit): use first commit as default PR title#27
Merged
Conversation
Owner
Author
Stack
Managed by gh-stack |
The default PR title is now derived from the subject of the first commit in the branch (the oldest commit unique to the branch) instead of the branch name. Falls back to the branch-name-based title if no commits are available.
77e1c8b to
6853355
Compare
There was a problem hiding this comment.
Pull request overview
This PR changes the default PR title generation strategy to use the subject line of the first (oldest) commit in the branch instead of deriving it from the branch name, with a fallback to the branch-name-based title when no commits are available.
Changes:
- Modified default title generation to prioritize commit message over branch name
- Added new function to extract title from the first commit's subject line
- Maintained backward compatibility with branch-name fallback
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add whitespace trimming to handle commits with leading/trailing spaces - Fall back to branch name if subject is empty or whitespace-only - Improve comment to reference GetCommits ordering guarantee
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The default PR title is now derived from the subject of the first
commit in the branch (the oldest commit unique to the branch) instead
of the branch name.
Falls back to the branch-name-based title if no commits are available.