Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] [API] repoCreateFile return 500 if branch not exist #10982

Closed
6543 opened this issue Apr 6, 2020 · 3 comments · Fixed by #11791
Closed

[Bug] [API] repoCreateFile return 500 if branch not exist #10982

6543 opened this issue Apr 6, 2020 · 3 comments · Fixed by #11791
Labels
Milestone

Comments

@6543
Copy link
Member

6543 commented Apr 6, 2020

as title

try: curl -X POST "https://try.gitea.io/api/v1/repos/abcKing/repo_uninit/contents/README.md?token=yourtocken" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"author\": { \"email\": \"[email protected]\", \"name\": \"string\" }, \"branch\": \"string\", \"committer\": { \"email\": \"[email protected]\", \"name\": \"string\" }, \"content\": \"c3RyaW5nCg==\", \"dates\": { \"author\": \"2020-04-06T01:37:35.137Z\", \"committer\": \"2020-04-06T01:37:35.137Z\" }, \"message\": \"string\"}"

It return:

{
  "message": "branch does not exist [name: string]",
  "url": "https://try.gitea.io/api/swagger"
}

Gitea Version: 1.12.0+dev-89-gb264c3039

@6543 6543 changed the title [Bug] [API] repoCreateFile return 500 if branch not set as option [Bug] [API] repoCreateFile return 500 if branch not exist Apr 6, 2020
@6543
Copy link
Member Author

6543 commented Apr 6, 2020

Expecting 404 or 422

@stale
Copy link

stale bot commented Jun 5, 2020

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale stale bot added the issue/stale label Jun 5, 2020
@6543
Copy link
Member Author

6543 commented Jun 7, 2020

tested - still exist

@stale stale bot removed the issue/stale label Jun 7, 2020
@lafriks lafriks added this to the 1.12.0 milestone Jun 7, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants