[Issue #1] Add Actions logs commands using existing Gitea 1.25 API #2
@@ -33,12 +33,12 @@ func RunActionJobs(ctx stdctx.Context, cmd *cli.Command) error {
|
|||||||
c.Ensure(context.CtxRequirement{RemoteRepo: true})
|
c.Ensure(context.CtxRequirement{RemoteRepo: true})
|
||||||
|
|
||||||
if cmd.Args().Len() < 1 {
|
if cmd.Args().Len() < 1 {
|
||||||
return fmt.Errorf("Run ID is required")
|
return fmt.Errorf("run ID is required")
|
||||||
}
|
}
|
||||||
|
|
||||||
runID, err := utils.ArgToIndex(cmd.Args().First())
|
runID, err := utils.ArgToIndex(cmd.Args().First())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("Invalid run ID: %w", err)
|
return fmt.Errorf("invalid run ID: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
client := api.NewClient(c.Login)
|
client := api.NewClient(c.Login)
|
||||||
|
|||||||
@@ -32,12 +32,12 @@ func RunActionLogs(ctx stdctx.Context, cmd *cli.Command) error {
|
|||||||
c.Ensure(context.CtxRequirement{RemoteRepo: true})
|
c.Ensure(context.CtxRequirement{RemoteRepo: true})
|
||||||
|
|
||||||
if cmd.Args().Len() < 1 {
|
if cmd.Args().Len() < 1 {
|
||||||
return fmt.Errorf("Job ID is required")
|
return fmt.Errorf("job ID is required")
|
||||||
}
|
}
|
||||||
|
|
||||||
jobID, err := utils.ArgToIndex(cmd.Args().First())
|
jobID, err := utils.ArgToIndex(cmd.Args().First())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("Invalid job ID: %w", err)
|
return fmt.Errorf("invalid job ID: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
client := api.NewClient(c.Login)
|
client := api.NewClient(c.Login)
|
||||||
|
|||||||
Reference in New Issue
Block a user