Skip to content

fix: Add github.token fallback for GIT_PAT in sync workflows#71

Merged
stuckvgn merged 1 commit intomainfrom
fix/lsf-sync-github-token
Mar 17, 2026
Merged

fix: Add github.token fallback for GIT_PAT in sync workflows#71
stuckvgn merged 1 commit intomainfrom
fix/lsf-sync-github-token

Conversation

@stuckvgn
Copy link
Contributor

Summary

  • All three follow-merge sync workflows (lsf-sync-schedule, sync-pr, upstream-repo-sync) reference secrets.GIT_PAT for github-token in actions/github-script and actions/checkout steps
  • When GIT_PAT is not configured as a repository secret, this resolves to an empty string, causing actions/github-script@v8 to fail with: Input required and not supplied: github-token
  • Added fallback chain ${{ secrets.GIT_PAT || secrets.GITHUB_TOKEN || github.token }} to all affected steps across all three workflows, so they work with or without GIT_PAT configured

Test plan

  • Trigger the LSF Sync workflow manually via workflow_dispatch and verify it no longer fails with the github-token error
  • Verify the upstream repo sync workflow completes successfully when triggered by a dispatch event

The actions/github-script steps fail with "Input required and not
supplied: github-token" when secrets.GIT_PAT is not configured.
Add fallback chain: secrets.GIT_PAT || secrets.GITHUB_TOKEN || github.token
to all three follow-merge sync workflows.
@stuckvgn stuckvgn force-pushed the fix/lsf-sync-github-token branch from 3d6ebb6 to dff0ce8 Compare March 17, 2026 05:43
@stuckvgn stuckvgn merged commit e248851 into main Mar 17, 2026
4 checks passed
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.

1 participant