ci: add feat/copilot auto-sync, drop unused main→dev retarget#2
Merged
Conversation
Parameterized clone of auto-sync-upstream.yml that mirrors the upstream router-for-me/CLIProxyAPI:main into feat/copilot instead of remote-fix. Key differences from the existing workflow: - name: auto-sync-upstream-copilot - cron: '30 2 * * *' (offset 30m from auto-sync-upstream to avoid fighting over scheduler / log timing) - concurrency.group: auto-sync-upstream-copilot (isolated from the remote-fix sync; both can run in parallel safely) - TARGET_BRANCH=feat/copilot, PR_BRANCH=auto-sync/upstream-main-copilot - Downstream image build dispatched against ghcr-feat-copilot.yml - PR label: auto-sync-copilot (keeps copilot sync PRs distinct from the remote-fix sync stream) Lives only on the default branch (main); schedule events only fire from there, mirroring the existing precedent.
The workflow retargets every PR with base=main to base=dev. This
serves upstream router-for-me/CLIProxyAPI's main/dev branch model,
but this fork doesn't have a 'dev' branch — every main PR triggers
a failed run with:
Failed to retarget PR #N to dev: Validation Failed:
{"message":"Proposed base branch 'dev' was not found", ...}
The retarget itself fails (catch + return), so the PR base is left
intact — but every main PR shows a red 'retarget' check, which is
noise. Removing the file on the default branch disables the
pull_request_target trigger fork-wide.
This was referenced May 14, 2026
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.
Summary
Two related CI changes on the default branch:
1. New: `auto-sync-upstream-copilot.yml`
The existing auto-sync workflow only targets `remote-fix`. `feat/copilot` has to be hand-merged (last manual upstream merge `65aa351e`). Automating prevents drift.
Parameterized clone of `auto-sync-upstream.yml` with isolated identity:
Three paths (unchanged from the original):
Lives only on `main` — `schedule` events only fire from the default branch, matching the precedent set by `d87cdbcc` (which removed the duplicate of `auto-sync-upstream.yml` from `remote-fix`).
2. Drop: `auto-retarget-main-pr-to-dev.yml`
The workflow retargets every PR with `base=main` to `base=dev`. On the upstream repo (router-for-me/CLIProxyAPI) this makes sense — they have a main/dev branch model. This fork doesn't, so the API call fails with:
```
Failed to retarget PR #N to dev: Validation Failed:
{"message":"Proposed base branch 'dev' was not found", ...}
```
The retarget itself fails inside a catch block and returns early, so the PR base is left intact — but every main PR ends up with a red 'retarget' check. Removing the file on the default branch disables the `pull_request_target` trigger fork-wide.