If you create a repo called action, it cannot be update #8267

Closed
opened 2025-11-02 08:00:15 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @akkuman on GitHub (Dec 20, 2021).

Gitea Version

1.16.0+dev-717-g25677cdc5

Git Version

No response

Operating System

No response

How are you running Gitea?

https://try.gitea.io

Database

No response

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Description

I tried to fix the problem, but found that I could only fix it by disabling the repository that the user created called action.

you can see the demo https://try.gitea.io/Akkuman/action

it cannot be delete or update

Screenshots

No response

Originally created by @akkuman on GitHub (Dec 20, 2021). ### Gitea Version 1.16.0+dev-717-g25677cdc5 ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? https://try.gitea.io ### Database _No response_ ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Description I tried to fix the problem, but found that I could only fix it by disabling the repository that the user created called action. you can see the demo https://try.gitea.io/Akkuman/action it cannot be delete or update ### Screenshots _No response_
GiteaMirror added the type/bug label 2025-11-02 08:00:15 -06:00
Author
Owner

@zeripath commented on GitHub (Dec 20, 2021):

Yup this is because it posts to it are being conflicted with:

2cd1479e77/routers/web/web.go (L487-L489)

Two options;

  1. Make action a reserved name for repos
  2. Move the above endpoint elsewhere.

I think if we can move the above endpoint elsewhere and avoid a reserved name that would be useful. However we need to check the api.go router file to see if there are other conflicted routes that need to be addressed too.

@zeripath commented on GitHub (Dec 20, 2021): Yup this is because it posts to it are being conflicted with: https://github.com/go-gitea/gitea/blob/2cd1479e774f9bb28a598f6eb34262b996f49112/routers/web/web.go#L487-L489 Two options; 1. Make action a reserved name for repos 2. Move the above endpoint elsewhere. I think if we can move the above endpoint elsewhere and avoid a reserved name that would be useful. However we need to check the api.go router file to see if there are other conflicted routes that need to be addressed too.
Author
Owner

@lunny commented on GitHub (Dec 20, 2021):

How about change the router to <username>/-/action?

@lunny commented on GitHub (Dec 20, 2021): How about change the router to `<username>/-/action`?
Author
Owner

@zeripath commented on GitHub (Dec 20, 2021):

somewhat annoyingly - appears to be a valid repository name. Previously when we've discussed this we've considered using ! but one simple thing is just to make the POST /:username/action/:action simply
POST /:username

@zeripath commented on GitHub (Dec 20, 2021): somewhat annoyingly `-` appears to be a valid repository name. Previously when we've discussed this we've considered using `!` but one simple thing is just to make the POST /:username/action/:action simply POST /:username
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8267