come up with #9452 in v1.12 ref https://github.com/go-gitea/gitea/pull/9452#issuecomment-640319866