mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 04:09:29 +02:00
[FEAT] Don't allow modification to internal reference
- This a port of https://github.com/go-gitea/gitea/pull/31931 in a behavior-sense. None of the code was actually ported. - Follow up for #2834, now also don't allow modification. - Integration test added. - Unit test modified.
This commit is contained in:
parent
55d9c1bad3
commit
84e77c41fa
3 changed files with 15 additions and 2 deletions
|
@ -322,7 +322,8 @@ func runHookUpdate(c *cli.Context) error {
|
|||
return fail(ctx, fmt.Sprintf("The deletion of %s is skipped as it's an internal reference.", refFullName), "")
|
||||
}
|
||||
|
||||
return nil
|
||||
// If the new comment isn't empty it means modification.
|
||||
return fail(ctx, fmt.Sprintf("The modification of %s is skipped as it's an internal reference.", refFullName), "")
|
||||
}
|
||||
|
||||
func runHookPostReceive(c *cli.Context) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue