github / github/docs

Behavior of `branches` filter on existing branches

Aberta Para iniciantes
#42,813 9 comentários 0 reações 0 responsáveis Ver no GitHub
content github_actions never-stale
Linguagem predominante
TypeScript
Estrelas
20.8k
Forks
68.7k
Merge médio
13h 17min
PRs com merge (30d)
110

Descrição

### Code of Conduct

- [x] I have read and agree to the GitHub Docs project's [Code of Conduct](https://github.com/github/docs/blob/main/.github/CODE_OF_CONDUCT.md)

### What article on docs.github.com is affected?

https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax

### What part(s) of the article would you like to see updated?

These to parts that describe using a `branches` filter:

- [on..](https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#onpull_requestpull_request_targetbranchesbranches-ignore)
- [on.push.](https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#onpushbranchestagsbranches-ignoretags-ignore)

### Additional information

I just lost about 5 hours trying a large variety of variations and reviewing the docs related to `branches` filters on GitHub Actions. Here is what I discovered, and I believe this important fact is nowhere in the docs and should be:

```
When a workflow is put in place that has a `branches` filter, or modified
to add additional branches to an existing `branches` filter, any matching
branches that already existed PRIOR to this modification are NOT eligible
to trigger the workflow.

Only new branches added AFTER the workflow is in place, with matching
branch names, can trigger the workflow.
```

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Comece pelo artigo vinculado sobre a sintaxe de workflow e revise as seções dos filtros de branches de pull_request e push. Atualize a documentação para explicar como os branches existentes que correspondem se comportam quando um workflow ou filtro é adicionado, preservando as orientações ao redor. A tarefa estará concluída quando o comportamento relatado estiver claramente documentado em ambas as seções relevantes.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
github-actions
Domínio
ci-cd, documentation
Tipo de issue
Documentação
Dificuldade
2/5
Tempo estimado
1-3 horas
Status de atividade
Ativa
Clareza
Claramente especificada
Facilidade para iniciantes
78/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.