🩹 [Patch]: Switch to use GITHUB_TOKEN for updates#68
Merged
MariusStorhaug merged 12 commits intomainfrom Jul 22, 2025
Merged
Conversation
… improved command execution and error handling
…t process with detailed output
There was a problem hiding this comment.
Pull Request Overview
This PR switches from using custom GitHub App authentication to the built-in GITHUB_TOKEN for automated Google Fonts data updates. The changes modernize the CI/CD workflow by leveraging standard GitHub Actions permissions and improving the PowerShell script's reliability and logging capabilities.
- Replaced GitHub App authentication with standard GitHub Actions permissions (
contents: write,pull-requests: write) - Added comprehensive error handling and logging through a new
Invoke-NativeCommandhelper function - Enhanced branch management logic to handle both scheduled runs and manual workflow dispatches
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
.github/workflows/Update-FontsData.yml |
Updated permissions and removed custom authentication parameters |
scripts/Update-FontsData.ps1 |
Complete refactor with improved error handling, logging, and dynamic branch management |
… and error handling
… Run for improved command execution consistency
… enhance command execution clarity
…e change detection logic
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.
Description
This pull request introduces significant updates to the workflow and script for automating Google Fonts data updates. Key changes include enhancements to permissions in the GitHub Actions workflow, improved repository management in the PowerShell script, and refactoring for better logging and error handling.
Workflow Updates:
.github/workflows/Update-FontsData.yml: Updated permissions to includecontents: writeandpull-requests: write, enabling the workflow to create pull requests and write changes to the repository..github/workflows/Update-FontsData.yml: Addedfetch-depth: 0to the checkout step to ensure complete history is fetched, supporting branch operations. Removed unusedClientIDandPrivateKeyinputs from theUpdate-FontsDatajob.Script Enhancements:
scripts/Update-FontsData.ps1: Introduced theInvoke-NativeCommandfunction to standardize execution of native commands with improved error handling and logging.scripts/Update-FontsData.ps1: Refactored branch management logic to dynamically determine whether to create a new branch or use the current branch, ensuring compatibility with different workflow triggers.scripts/Update-FontsData.ps1: Improved logging for changes detection, commit creation, and push operations. Added detailed output for diffs and commit logs to enhance debugging and visibility.Type of change
Checklist