DeleteFile action results in 404 when file exists
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 28/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- github, github-actions, javascript, typescript
Línea de trabajo
Start with the getContent and deleteFile calls shown in the issue, then compare their path, branch, and SHA values with the working curl request. Check how github-script version 6.4 sends these parameters. Done means deletion succeeds on my_branch or the request mismatch is isolated and documented.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
I am using the deleteFile action in one of my pipelines, the idea is to perform some cleanup after some tasks are successfully done. I am following the documentation of the method, I put all the required fields, but when is running I get a 404, file does not exist, even though the file is there. Is there something I am missing? when deleting using curl(same parameters) it works just fine. Unfortunately I can't share screenshots since is a private repo.
To Reproduce
Steps to reproduce the behavior:
I get the sha of the file I want to delete:
const file = await github.rest.repos.getContent({
owner: context.repo.owner,
repo: context.repo.repo,
path: "${{ path1 }}/${{ path2 }}/file",
ref: "my_branch"
and then I run the delete:
github.rest.repos.deleteFile({
owner: context.repo.owner,
repo: context.repo.repo,
path: "${{ path1 }}/${{ path2 }}/file",
message: "Delete file",
sha: file.data.sha,
branch: "my_branch"
Expected behavior
File is deleted on the specific branch.
Desktop (please complete the following information):
- OS: Ubuntu
Additional context
I am using version 6.4
- Lenguaje dominante
- TypeScript
- Estrellas
- 5k
- Forks
- 586
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de actions/github-script
-
Dificultad 3/5 1-2 días Aptitud para principiantes 48/100
actions/github-script#728 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
actions/github-script#727 · 1 reacción ·
-
{ Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 10/100
actions/github-script#724 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
actions/github-script#723 · 1 comentario ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
actions/github-script#714 · 1 comentario · 4 reacciones ·
Todos los issues de actions/github-script
Issues similares
-
blocklist removal
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
MetaMask/eth-phishing-detect#296544 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
pastelsky/bundlephobia#1122 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100