github / github/copilot-cli

Scheduled automation fails when a non-default branch is checked out locally

未关闭
#4,810 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

triage
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

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
  1. Configure a scheduled automation for a repository while its workflow/default branch is selected.
  2. In the associated local clone, check out a different branch for unrelated work.
  3. Allow the scheduled automation to run.
  4. 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.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

未指定源文件或测试。首先,在本地检出一个非默认分支的情况下复现一次计划自动化,然后跟踪 CLI 对已配置 workflow 或默认分支以及本地工作副本的处理。完成标准是:自动化可以运行,而不要求用户当前的 checkout 切换分支,并且为所报告的场景提供 coverage。

由索引模型根据 Issue 内容生成。

评估

技术栈
git
领域
cli, developer-experience
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
活跃
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。