Skip to content

Harden Translations Export workflow for forked PRs without secrets - #1662

Draft
amitjoshi438 with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-export-translations-job
Draft

Harden Translations Export workflow for forked PRs without secrets#1662
amitjoshi438 with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-export-translations-job

Conversation

Copilot AI commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

The Export Translations job was failing on fork-based PRs because actions/create-github-app-token requires a private key secret that is not available in that context. This change makes the workflow fork-aware so it no longer fails at token generation while still enforcing translation consistency.

  • Auth flow: gate GitHub App token usage

    • Skip create-github-app-token when the event is a forked pull_request.
    • Keep existing GitHub App auth path for non-fork runs where secrets are available.
  • Checkout token fallback

    • Use app token when present; otherwise fall back to ${{ github.token }} for checkout.
  • Push behavior: restrict to contexts that can write

    • Run auto commit/push only when changes exist and the PR is not from a fork.
  • Fork PR enforcement

    • If translation export produces diffs on a fork PR, fail with a clear message instructing contributors to run npm run translations-export and commit generated files locally.
- name: Generate GitHub App Token
  if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false

- name: Checkout Repository
  with:
    token: ${{ steps.app-token.outputs.token != '' && steps.app-token.outputs.token || github.token }}

- name: Commit and Push Changes
  if: steps.check-changes.outputs.has_changes == 'true' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false)

Copilot AI and others added 2 commits August 17, 2026 04:52
Co-authored-by: amitjoshi438 <54068463+amitjoshi438@users.noreply.github.com>
Co-authored-by: amitjoshi438 <54068463+amitjoshi438@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job Export Translations Harden Translations Export workflow for forked PRs without secrets Aug 17, 2026
Copilot AI requested a review from amitjoshi438 August 17, 2026 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants