fix(actions): updated i18n gh action to use PAT instead of default token#1377
fix(actions): updated i18n gh action to use PAT instead of default token#1377waleedlatif1 merged 1 commit intostagingfrom
Conversation
There was a problem hiding this comment.
Greptile Summary
This PR updates the i18n GitHub Actions workflow to use a Personal Access Token (PAT) instead of the default GITHUB_TOKEN for authentication. The change affects two critical operations in the workflow: checking out the repository (line 21-25) and creating pull requests with translations (line 52-56). Both operations now use ${{ secrets.GH_PAT }} instead of relying on the default GitHub token.
This change addresses a fundamental limitation of GitHub's default token system. The default GITHUB_TOKEN has restricted permissions and cannot trigger subsequent workflows when it creates pull requests or commits - a security feature designed to prevent infinite workflow loops. For the i18n workflow, this limitation is problematic because automated translation PRs should ideally trigger other workflows like CI tests, build processes, or validation workflows to ensure the translations are properly tested and integrated.
By switching to a PAT, the workflow gains the necessary permissions to create PRs that can trigger downstream workflows. This is a standard pattern in GitHub Actions for workflows that need to perform repository operations that should cascade to other automated processes. The PAT must be configured as a repository secret named GH_PAT with appropriate repository permissions.
Confidence score: 5/5
- This PR is safe to merge with minimal risk as it addresses a well-known GitHub Actions limitation
- Score reflects a straightforward configuration change using established best practices for GitHub Actions workflows
- No files require special attention - the changes are isolated to workflow authentication configuration
1 file reviewed, no comments
Summary
updated i18n gh action to use PAT instead of default token
Type of Change
Testing
Tested manually by dispatching action
Checklist