github / github/app

Scheduled workflows fail to launch on folder-backed (non-git) projects — runner aborts on git rev-parse

Abierto
#2,207 0 comentarios 0 reacciones 1 asignado Reclamado por @sarahbarili Ver en GitHub
Bugs
Lenguaje dominante
Sin datos de lenguaje
Estrellas
2.1k
Forks
153
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

### Affected version or release

GitHub Copilot desktop app on Windows (agentic harness v1.0.71). Exact app build unknown.

### Installation context

Local **folder-backed project** (a plain directory that is not a git repository; `member_repositories: []`). Workflow created in that project.

### What happened?

A scheduled workflow created in a folder-backed (non-git) project fails to launch. Both the on-demand run and the scheduled trigger abort immediately with:

```
Failed to read current branch from : git ["rev-parse", "--abbrev-ref", "HEAD"] failed: fatal: not a git repository (or any of the parent directories): .git
```

The saved workflow reports `"workspaceType": "branch"` even though the project is a plain folder with no git repo. An **interactive session** runs fine in the exact same folder — only the workflow runner hard-requires a git branch, so scheduled workflows are unusable for folder projects.

### Steps to reproduce

1. Create a project from a local folder that is **not** a git repository.
2. Create a scheduled workflow in that project (e.g. daily at 9am).
3. Trigger a run (on-demand "Run now", or wait for the schedule).
4. The run fails immediately with the `not a git repository` error above.

### Expected behavior

Workflows should launch in folder-backed projects the same way interactive sessions do (which already work in the same folder). The runner should not require `git rev-parse --abbrev-ref HEAD` to succeed when the project has no git repo — it should fall back to a branchless/folder session rather than aborting.

### Additional context

- Interactive sessions in the same folder work without issue; only the workflow runner fails.
- Saved workflow shows `workspaceType: "branch"` for a folder project, which looks like the root cause (branch workspace assumed regardless of project kind).
- Likely related to other non-git / folder session gaps tracked in the repo.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.