lint: find a bunch of issues
This commit is contained in:
parent
4c6de3ad2e
commit
a7e5dc5798
4 changed files with 11 additions and 11 deletions
|
|
@ -1052,9 +1052,9 @@ func runWorkflowEnable(cmd *cobra.Command, args []string) error {
|
|||
|
||||
if err != nil {
|
||||
if status == http.StatusNotFound && strings.Contains(err.Error(), "404") {
|
||||
return fmt.Errorf("failed to enable workflow: this feature requires Forgejo 15.0+ or Gitea 1.24+\n" +
|
||||
"Your instance does not support the workflow enable/disable API endpoints yet.\n" +
|
||||
"You can enable workflows via the web UI instead.")
|
||||
return fmt.Errorf("failed to enable workflow: this feature requires Forgejo 15.0+ or Gitea 1.24+. " +
|
||||
"Your instance does not support the workflow enable/disable API endpoints yet. " +
|
||||
"You can enable workflows via the web UI instead")
|
||||
}
|
||||
return fmt.Errorf("failed to enable workflow: %w", err)
|
||||
}
|
||||
|
|
@ -1097,9 +1097,9 @@ func runWorkflowDisable(cmd *cobra.Command, args []string) error {
|
|||
|
||||
if err != nil {
|
||||
if status == http.StatusNotFound && strings.Contains(err.Error(), "404") {
|
||||
return fmt.Errorf("failed to disable workflow: this feature requires Forgejo 15.0+ or Gitea 1.24+\n" +
|
||||
"Your instance does not support the workflow enable/disable API endpoints yet.\n" +
|
||||
"You can disable workflows via the web UI instead.")
|
||||
return fmt.Errorf("failed to disable workflow: this feature requires Forgejo 15.0+ or Gitea 1.24+. " +
|
||||
"Your instance does not support the workflow enable/disable API endpoints yet. " +
|
||||
"You can disable workflows via the web UI instead")
|
||||
}
|
||||
return fmt.Errorf("failed to disable workflow: %w", err)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ import (
|
|||
"text/tabwriter"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
"github.com/spf13/cobra"
|
||||
"codeberg.org/romaintb/fgj/internal/api"
|
||||
"codeberg.org/romaintb/fgj/internal/config"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var repoCmd = &cobra.Command{
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ import (
|
|||
"os"
|
||||
"strings"
|
||||
|
||||
"codeberg.org/romaintb/fgj/internal/git"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
"codeberg.org/romaintb/fgj/internal/git"
|
||||
)
|
||||
|
||||
var cfgFile string
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@ type Config struct {
|
|||
}
|
||||
|
||||
type HostConfig struct {
|
||||
Hostname string `yaml:"hostname"`
|
||||
Token string `yaml:"token"`
|
||||
User string `yaml:"user,omitempty"`
|
||||
Hostname string `yaml:"hostname"`
|
||||
Token string `yaml:"token"`
|
||||
User string `yaml:"user,omitempty"`
|
||||
GitProtocol string `yaml:"git_protocol,omitempty"`
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue