Merge pull request '[gitea] week 2024-32 cherry pick (gitea/main -> forgejo)' (#4801) from earl-warren/wcp/2024-32 into forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4801
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
This commit is contained in:
Earl Warren 2024-08-06 05:47:20 +00:00
commit 517637137c
46 changed files with 661 additions and 179 deletions

View file

@ -19,7 +19,7 @@ func TestAPIUserVariables(t *testing.T) {
session := loginUser(t, "user1")
token := getTokenForLoggedInUser(t, session, auth_model.AccessTokenScopeWriteUser)
t.Run("CreateRepoVariable", func(t *testing.T) {
t.Run("CreateUserVariable", func(t *testing.T) {
cases := []struct {
Name string
ExpectedStatus int
@ -70,7 +70,7 @@ func TestAPIUserVariables(t *testing.T) {
}
})
t.Run("UpdateRepoVariable", func(t *testing.T) {
t.Run("UpdateUserVariable", func(t *testing.T) {
variableName := "test_update_var"
url := fmt.Sprintf("/api/v1/user/actions/variables/%s", variableName)
req := NewRequestWithJSON(t, "POST", url, api.CreateVariableOption{