Closed
Description
strconv.ParseInt: parsing "number": invalid syntax
Steps to reproduce:
- Create a repository with actions enabled
- Create a file
/.gitea/workflows
with the contentnot a number
- Create a file
/.github/workflows
with the contentnot a number
- Open the page
/<owner>/<repo>/actions
- If no error is shown, refresh the page multiple times until an error occurs
The reason is this code
gitea/modules/actions/workflows.go
Lines 47 to 50 in ce9978b
which fails in line 179
gitea/modules/git/batch_reader.go
Lines 152 to 181 in ce9978b
If the error occurs the code tries to parse not a number
as output of the batch reader. A normal output looks like 8b2bfd3a117fcb7ae93f93616cb2f7a9706c513a tree 104
. I don't know how the content of a file can be present here. And even worse is that it does not fail every time. If I create only one workflows
file it does not fail but that may just be a timing issue.
Git Version
2.43.0, non-gogit