Git commit sha detection inconsistent between telemetry and actual operations

Aberta
#3,376 2 comentários 0 reações 1 responsável Ver no GitHub

@mbg já está trabalhando nisso.

Desde 19/12/2025.

Avaliação

Esta issue ainda não foi avaliada.

Descrição

See:

https://github.com/github/codeql-action/blob/cac5926de5e2c542638262c4e24527972023cdec/src/status-report.ts#L271-L272

vs:

https://github.com/github/codeql-action/blob/cac5926de5e2c542638262c4e24527972023cdec/src/git-utils.ts#L48-L69

So if the checkout is at a different sha from GITHUB_SHA then the two are different. In my case this made debugging very difficult because when I reran the workflow with debug logging enabled the telemetry calls were printed and showed me it reporting a different sha from the one that is actually used by the upload action.

I suspect this happened because the the telemetry was added later and we originally implemented the "sha of current checkout" behaviour so that it worked outside actions. Removing the "sha of current checkout" behaviour, or making it the lowest priority, feels like the "most correct" fix, but more risky than just changing the telemetry to use the getCommitOid function.

Linguagem predominante
TypeScript
Estrelas
1.6k
Forks
493
Merge médio
1d 13h
PRs com merge (30d)
44

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de github/codeql-action

Todas as issues de github/codeql-action

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

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