mirror of
https://gitea.com/gitea/tea.git
synced 2026-06-05 18:58:43 +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:
@@ -27,7 +27,7 @@ var CmdReleaseAttachmentCreate = cli.Command{
|
||||
Flags: flags.AllDefaultFlags,
|
||||
}
|
||||
|
||||
func runReleaseAttachmentCreate(_ stdctx.Context, cmd *cli.Command) error {
|
||||
func runReleaseAttachmentCreate(requestCtx stdctx.Context, cmd *cli.Command) error {
|
||||
ctx, err := context.InitCommand(cmd)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -46,7 +46,7 @@ func runReleaseAttachmentCreate(_ stdctx.Context, cmd *cli.Command) error {
|
||||
return fmt.Errorf("release tag needed to create attachment")
|
||||
}
|
||||
|
||||
release, err := releases.GetReleaseByTag(ctx.Owner, ctx.Repo, tag, client)
|
||||
release, err := releases.GetReleaseByTag(requestCtx, ctx.Owner, ctx.Repo, tag, client)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -59,7 +59,7 @@ func runReleaseAttachmentCreate(_ stdctx.Context, cmd *cli.Command) error {
|
||||
|
||||
filePath := filepath.Base(asset)
|
||||
|
||||
if _, _, err = ctx.Login.Client().CreateReleaseAttachment(ctx.Owner, ctx.Repo, release.ID, file, filePath); err != nil {
|
||||
if _, _, err = ctx.Login.Client().Releases.CreateReleaseAttachment(requestCtx, ctx.Owner, ctx.Repo, release.ID, file, filePath); err != nil {
|
||||
file.Close()
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user