Skip to content

fix(ci): prevent v2 sync workflow failure when RELEASE_PAT is unset#1

Open
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-failing-github-actions-job-sync
Open

fix(ci): prevent v2 sync workflow failure when RELEASE_PAT is unset#1
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-failing-github-actions-job-sync

Conversation

Copilot AI commented Jun 16, 2026

Copy link
Copy Markdown

Please ensure you have read the contribution guide before creating a pull request.

Link to Issue or Description of Change

1. Link to an existing issue (if applicable):

2. Or, if no issue exists, describe the change:

If applicable, please follow the issue templates to provide as much detail as
possible.

Problem:
The scheduled Sync: main -> v2 Actions job failed in sync because actions/checkout@v6 required a token, but secrets.RELEASE_PAT was not available for that run. The workflow failed before any sync logic executed.

Solution:

  • Authentication fallback for checkout
    • Updated checkout token to use a safe fallback:
      • token: ${{ secrets.RELEASE_PAT || github.token }}
  • Authentication fallback for PR creation
    • Updated GH_TOKEN used by gh pr create to:
      • ${{ secrets.RELEASE_PAT || github.token }}
  • Scope
    • Change is isolated to .github/workflows/v2-sync.yml with no behavioral changes outside token resolution.
- uses: actions/checkout@v6
  with:
    ref: v2
    fetch-depth: 0
    token: ${{ secrets.RELEASE_PAT || github.token }}

- name: Create sync PR
  env:
    GH_TOKEN: ${{ secrets.RELEASE_PAT || github.token }}

Testing Plan

Please describe the tests that you ran to verify your changes. This is required
for all PRs that are not small documentation or typo fixes.

Unit Tests:

  • I have added or updated unit tests for my change.
  • All unit tests pass locally.

Please include a summary of passed pytest results.

Manual End-to-End (E2E) Tests:

Validated the workflow change logic by inspecting the failing run logs and ensuring the updated token expressions cover both secret-present and secret-absent cases in the same job paths.

Checklist

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have manually tested my changes end-to-end.
  • Any dependent changes have been merged and published in downstream modules.

Additional context

This failure mode is specific to token sourcing in Actions context. The fallback keeps PAT behavior when configured while allowing the workflow to proceed with github.token when PAT is unavailable.

Copilot AI changed the title [WIP] Fix failing GitHub Actions job sync fix(ci): prevent v2 sync workflow failure when RELEASE_PAT is unset Jun 16, 2026
Copilot AI requested a review from kerrrang9214-tech June 16, 2026 17:51
@kerrrang9214-tech kerrrang9214-tech marked this pull request as ready for review June 16, 2026 17:51
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