-
Notifications
You must be signed in to change notification settings - Fork 4
Order PRs by number #491
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
Order PRs by number #491
Conversation
WalkthroughThis pull request updates the dependency update grouping logic and its tests. The test suite for Changes
Sequence Diagram(s)sequenceDiagram
participant T as Test Suite
participant G as groupDependencyUpdates Function
participant S as Sorting Routine
T->>G: Call with dependency updates list
G->>S: Extract PR numbers using regex
S-->>G: Return sorted PR numbers
G-->>T: Return consolidated, numerically sorted update string
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (2)
🔇 Additional comments (3)
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
PR Overview
This PR refines the sorting of pull request numbers within dependency update messages by modifying the sorting logic in groupDependencyUpdates and updating the corresponding test cases.
- Updated sorting logic in src/notes.ts to sort PR numbers numerically rather than lexicographically.
- Revised test cases in tests/notes.test.ts to reflect the new numerical ordering of PR numbers.
Reviewed Changes
File | Description |
---|---|
src/notes.ts | Updated sorting logic for consolidated PR entries using numeric sorting. |
tests/notes.test.ts | Modified expected PR number values and order in dependency update tests. |
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
tests/notes.test.ts:390
- [nitpick] Ensure that additional test cases are added to cover edge cases for PR numbers that might not follow the common URL pattern so the numeric sorting remains robust.
* Update dependency @types/node to ^22.5.4 by @renovate in https://github.com/lucacome/draft-release/pull/85, https://github.com/lucacome/draft-release/pull/169, https://github.com/lucacome/draft-release/pull/210
This pull request includes changes to the
groupDependencyUpdates
function and its corresponding tests to improve the sorting of pull request (PR) numbers. The most important changes include updating test cases to reflect the new PR numbers and modifying the sorting logic in thegroupDependencyUpdates
function.Changes to test cases:
__tests__/notes.test.ts
: Updated the PR numbers in thegroupDependencyUpdates
test cases to ensure they match the new sorting logic. [1] [2]Improvements to sorting logic:
src/notes.ts
: Modified thegroupDependencyUpdates
function to sort PR numbers numerically rather than lexicographically, ensuring a proper numerical order in the consolidated entry.Summary by CodeRabbit