mirror of
https://gitea.com/gitea/tea.git
synced 2026-06-06 03:08:44 +02:00
Move sdk from code.gitea.io/sdk/gitea to gitea.dev/sdk (#1006)
Reviewed-on: https://gitea.com/gitea/tea/pulls/1006 Reviewed-by: Zettat123 <39446+zettat123@noreply.gitea.com>
This commit is contained in:
@@ -56,7 +56,7 @@ func runVariablesDelete(ctx stdctx.Context, cmd *cli.Command) error {
|
||||
}
|
||||
}
|
||||
|
||||
_, err = client.DeleteRepoActionVariable(c.Owner, c.Repo, variableName)
|
||||
_, err = client.Actions.DeleteRepoVariable(ctx, c.Owner, c.Repo, variableName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ func RunVariablesList(ctx stdctx.Context, cmd *cli.Command) error {
|
||||
|
||||
if name := cmd.String("name"); name != "" {
|
||||
// Get specific variable
|
||||
variable, _, err := client.GetRepoActionVariable(c.Owner, c.Repo, name)
|
||||
variable, _, err := client.Actions.GetRepoVariable(ctx, c.Owner, c.Repo, name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
package variables
|
||||
|
||||
import (
|
||||
stdctx "context"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
@@ -94,6 +93,6 @@ func TestRunVariablesListRequiresRepoContext(t *testing.T) {
|
||||
}
|
||||
require.NoError(t, cmd.Set("login", "test"))
|
||||
|
||||
err = RunVariablesList(stdctx.Background(), cmd)
|
||||
err = RunVariablesList(t.Context(), cmd)
|
||||
require.ErrorContains(t, err, "remote repository required")
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ func runVariablesSet(ctx stdctx.Context, cmd *cli.Command) error {
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = client.CreateRepoActionVariable(c.Owner, c.Repo, variableName, variableValue)
|
||||
_, err = client.Actions.CreateRepoVariable(ctx, c.Owner, c.Repo, variableName, variableValue)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user