Scheduled automation fails when a non-default branch is checked out locally
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 11.2k
- Forks
- 1.9k
- Avg merge
- 14h 16m
- Merged PRs (30d)
- 6
Description
Describe the bug
A scheduled repository automation fails when the associated local clone is currently checked out to a branch other than the workflow/default branch. The failure instructs the user to switch the local clone back to the expected branch before rerunning the workflow.
A scheduled automation should not depend on whichever branch happens to be checked out in a mutable local working copy. This makes schedules unexpectedly brittle and allows unrelated local development activity to break them.
Affected version
No response
Steps to reproduce the behavior
- Configure a scheduled automation for a repository while its workflow/default branch is selected.
- In the associated local clone, check out a different branch for unrelated work.
- Allow the scheduled automation to run.
- Observe that it fails because the workflow/default branch is not currently checked out locally.
Expected behavior
Scheduled automations should run against the configured workflow branch or repository default branch regardless of the local clone's currently checked-out branch. If a local checkout is required, Copilot should use an isolated worktree/clone or safely resolve the configured branch without requiring the user's active working tree to switch branches.
Additional context
The visible error explicitly says the workflow branch is not checked out and asks the user to switch branches in the local clone. Identifying repository, branch, organization, and automation names have been intentionally omitted. The original screenshots contain those details and should not be attached without redaction.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Start by reproducing a scheduled automation with a non-default branch checked out locally, then trace the CLI's handling of the configured workflow or default branch and local working copy. Done means the automation runs without requiring the user's active checkout to switch branches, with coverage for the reported scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git
- Domain
- cli, developer-experience
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100