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
## Description
This pull request refactors the `Update-FontsData.ps1` script to improve
readability, simplify command execution, and enhance functionality. The
most significant changes include replacing `Invoke-NativeCommand` with
the `Run` alias, restructuring the command execution logic, and refining
the behavior for detecting and committing changes.
### Command Execution Refactor
- Replaced `Invoke-NativeCommand` with the `Run` alias. This change
affects all Git-related operations, such as fetching, checking out
branches, merging, and pushing changes.
- Updated parameter handling for the `$Command` argument to treat the
first element as the command and subsequent elements as arguments,
simplifying the way commands are constructed and executed.
### Improved Change Detection and Commit Workflow
- Enhanced the logic for detecting changes by reversing the condition to
immediately exit if no changes are detected, reducing unnecessary
processing.
- Simplified the diff and commit process by removing redundant checks
and ensuring staged changes are handled consistently.
### Minor Adjustments
- Adjusted branch naming conventions for auto-generated branches to
improve clarity (e.g., changed `auto-font-update-$timeStamp` to
`auto-update-font-$timeStamp`).
- Removed unnecessary logging blocks to streamline the script output.
## Type of change
<!-- Use the check-boxes [x] on the options that are relevant. -->
- [ ] 📖 [Docs]
- [ ] 🪲 [Fix]
- [x] 🩹 [Patch]
- [ ] ⚠️ [Security fix]
- [ ] 🚀 [Feature]
- [ ] 🌟 [Breaking change]
## Checklist
<!-- Use the check-boxes [x] on the options that are relevant. -->
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
---------
Co-authored-by: github-actions <[email protected]>
0 commit comments