DeleteFile action results in 404 when file exists
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 28/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- github, github-actions, javascript, typescript
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- TypeScript
- Stelle
- 5k
- Fork
- 586
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di actions/github-script
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
actions/github-script#728 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
actions/github-script#727 · 1 reazione ·
-
{ Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 10/100
actions/github-script#724 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
actions/github-script#723 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
actions/github-script#714 · 1 commento · 4 reazioni ·