rename fgj to fj
Module path, binary name, config dir, help text, and docs all updated from fgj-sid/fgj to fj.
This commit is contained in:
parent
a6cf9a7096
commit
bc43f6e5a5
34 changed files with 479 additions and 479 deletions
|
|
@ -10,8 +10,8 @@ import (
|
|||
"code.gitea.io/sdk/gitea"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"forgejo.zerova.net/public/fgj-sid/internal/api"
|
||||
"forgejo.zerova.net/public/fgj-sid/internal/config"
|
||||
"forgejo.zerova.net/public/fj/internal/api"
|
||||
"forgejo.zerova.net/public/fj/internal/config"
|
||||
)
|
||||
|
||||
// ActionRun represents a workflow run
|
||||
|
|
@ -99,13 +99,13 @@ var runListCmd = &cobra.Command{
|
|||
Short: "List recent workflow runs",
|
||||
Long: "List recent workflow runs for a repository.",
|
||||
Example: ` # List recent workflow runs
|
||||
fgj actions run list
|
||||
fj actions run list
|
||||
|
||||
# List runs with a custom limit
|
||||
fgj actions run list -L 50
|
||||
fj actions run list -L 50
|
||||
|
||||
# Output as JSON
|
||||
fgj actions run list --json`,
|
||||
fj actions run list --json`,
|
||||
RunE: runRunList,
|
||||
}
|
||||
|
||||
|
|
@ -114,16 +114,16 @@ var runViewCmd = &cobra.Command{
|
|||
Short: "View a workflow run",
|
||||
Long: "View details about a specific workflow run.",
|
||||
Example: ` # View a workflow run
|
||||
fgj actions run view 123
|
||||
fj actions run view 123
|
||||
|
||||
# View with job details
|
||||
fgj actions run view 123 -v
|
||||
fj actions run view 123 -v
|
||||
|
||||
# View logs for a specific job
|
||||
fgj actions run view 123 --job 456 --log
|
||||
fj actions run view 123 --job 456 --log
|
||||
|
||||
# View only failed logs
|
||||
fgj actions run view 123 --log-failed`,
|
||||
fj actions run view 123 --log-failed`,
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: runRunView,
|
||||
}
|
||||
|
|
@ -133,10 +133,10 @@ var runWatchCmd = &cobra.Command{
|
|||
Short: "Watch a workflow run",
|
||||
Long: "Poll a workflow run until it completes.",
|
||||
Example: ` # Watch a run until it completes
|
||||
fgj actions run watch 123
|
||||
fj actions run watch 123
|
||||
|
||||
# Watch with a custom polling interval
|
||||
fgj actions run watch 123 -i 10s`,
|
||||
fj actions run watch 123 -i 10s`,
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: runRunWatch,
|
||||
}
|
||||
|
|
@ -146,7 +146,7 @@ var runRerunCmd = &cobra.Command{
|
|||
Short: "Rerun a workflow run",
|
||||
Long: "Trigger a rerun for a specific workflow run.",
|
||||
Example: ` # Rerun a failed workflow run
|
||||
fgj actions run rerun 123`,
|
||||
fj actions run rerun 123`,
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: runRunRerun,
|
||||
}
|
||||
|
|
@ -156,7 +156,7 @@ var runCancelCmd = &cobra.Command{
|
|||
Short: "Cancel a workflow run",
|
||||
Long: "Cancel a running workflow run.",
|
||||
Example: ` # Cancel a running workflow
|
||||
fgj actions run cancel 123`,
|
||||
fj actions run cancel 123`,
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: runRunCancel,
|
||||
}
|
||||
|
|
@ -173,13 +173,13 @@ var workflowListCmd = &cobra.Command{
|
|||
Short: "List workflows",
|
||||
Long: "List all workflows in a repository.",
|
||||
Example: ` # List all workflows
|
||||
fgj actions workflow list
|
||||
fj actions workflow list
|
||||
|
||||
# List workflows as JSON
|
||||
fgj actions workflow list --json
|
||||
fj actions workflow list --json
|
||||
|
||||
# List workflows for a specific repo
|
||||
fgj actions workflow list -R owner/repo`,
|
||||
fj actions workflow list -R owner/repo`,
|
||||
RunE: runWorkflowList,
|
||||
}
|
||||
|
||||
|
|
@ -188,10 +188,10 @@ var workflowViewCmd = &cobra.Command{
|
|||
Short: "View a workflow",
|
||||
Long: "View details about a specific workflow. You can specify the workflow by name or filename.",
|
||||
Example: ` # View a workflow by filename
|
||||
fgj actions workflow view ci.yml
|
||||
fj actions workflow view ci.yml
|
||||
|
||||
# View as JSON
|
||||
fgj actions workflow view ci.yml --json`,
|
||||
fj actions workflow view ci.yml --json`,
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: runWorkflowView,
|
||||
}
|
||||
|
|
@ -201,10 +201,10 @@ var workflowRunCmd = &cobra.Command{
|
|||
Short: "Run a workflow",
|
||||
Long: "Trigger a workflow_dispatch event for a workflow. The workflow must support the workflow_dispatch trigger.",
|
||||
Example: ` # Trigger a workflow on the default branch
|
||||
fgj actions workflow run deploy.yml
|
||||
fj actions workflow run deploy.yml
|
||||
|
||||
# Trigger on a specific branch with input parameters
|
||||
fgj actions workflow run deploy.yml -r staging -f environment=staging -f version=1.2.3`,
|
||||
fj actions workflow run deploy.yml -r staging -f environment=staging -f version=1.2.3`,
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: runWorkflowRun,
|
||||
}
|
||||
|
|
@ -214,7 +214,7 @@ var workflowEnableCmd = &cobra.Command{
|
|||
Short: "Enable a workflow",
|
||||
Long: "Enable a workflow so it can be triggered.\n\nNote: This feature requires Forgejo 15.0+ or Gitea 1.24+.\nFor older versions, use the web UI to enable workflows.",
|
||||
Example: ` # Enable a workflow
|
||||
fgj actions workflow enable ci.yml`,
|
||||
fj actions workflow enable ci.yml`,
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: runWorkflowEnable,
|
||||
}
|
||||
|
|
@ -224,7 +224,7 @@ var workflowDisableCmd = &cobra.Command{
|
|||
Short: "Disable a workflow",
|
||||
Long: "Disable a workflow so it cannot be triggered.\n\nNote: This feature requires Forgejo 15.0+ or Gitea 1.24+.\nFor older versions, use the web UI to disable workflows.",
|
||||
Example: ` # Disable a workflow
|
||||
fgj actions workflow disable ci.yml`,
|
||||
fj actions workflow disable ci.yml`,
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: runWorkflowDisable,
|
||||
}
|
||||
|
|
@ -241,10 +241,10 @@ var actionsSecretListCmd = &cobra.Command{
|
|||
Short: "List repository secrets",
|
||||
Long: "List all secrets for a repository.",
|
||||
Example: ` # List all secrets
|
||||
fgj actions secret list
|
||||
fj actions secret list
|
||||
|
||||
# List secrets for a specific repo
|
||||
fgj actions secret list -R owner/repo`,
|
||||
fj actions secret list -R owner/repo`,
|
||||
RunE: runActionsSecretList,
|
||||
}
|
||||
|
||||
|
|
@ -253,10 +253,10 @@ var actionsSecretCreateCmd = &cobra.Command{
|
|||
Short: "Create or update a repository secret",
|
||||
Long: "Create or update a secret for Forgejo Actions. The secret value will be read from stdin.",
|
||||
Example: ` # Create a secret (will prompt for value)
|
||||
fgj actions secret create DEPLOY_TOKEN
|
||||
fj actions secret create DEPLOY_TOKEN
|
||||
|
||||
# Create a secret for a specific repo
|
||||
fgj actions secret create API_KEY -R owner/repo`,
|
||||
fj actions secret create API_KEY -R owner/repo`,
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: runActionsSecretCreate,
|
||||
}
|
||||
|
|
@ -266,7 +266,7 @@ var actionsSecretDeleteCmd = &cobra.Command{
|
|||
Short: "Delete a repository secret",
|
||||
Long: "Delete a secret from Forgejo Actions.",
|
||||
Example: ` # Delete a secret
|
||||
fgj actions secret delete DEPLOY_TOKEN`,
|
||||
fj actions secret delete DEPLOY_TOKEN`,
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: runActionsSecretDelete,
|
||||
}
|
||||
|
|
@ -283,10 +283,10 @@ var actionsVariableListCmd = &cobra.Command{
|
|||
Short: "List repository variables",
|
||||
Long: "List all variables for a repository.",
|
||||
Example: ` # List all variables
|
||||
fgj actions variable list
|
||||
fj actions variable list
|
||||
|
||||
# List variables for a specific repo
|
||||
fgj actions variable list -R owner/repo`,
|
||||
fj actions variable list -R owner/repo`,
|
||||
RunE: runActionsVariableList,
|
||||
}
|
||||
|
||||
|
|
@ -295,7 +295,7 @@ var actionsVariableGetCmd = &cobra.Command{
|
|||
Short: "Get a repository variable",
|
||||
Long: "Get the value of a specific repository variable.",
|
||||
Example: ` # Get a variable value
|
||||
fgj actions variable get ENVIRONMENT`,
|
||||
fj actions variable get ENVIRONMENT`,
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: runActionsVariableGet,
|
||||
}
|
||||
|
|
@ -305,10 +305,10 @@ var actionsVariableCreateCmd = &cobra.Command{
|
|||
Short: "Create a repository variable",
|
||||
Long: "Create a new variable for Forgejo Actions.",
|
||||
Example: ` # Create a variable
|
||||
fgj actions variable create ENVIRONMENT production
|
||||
fj actions variable create ENVIRONMENT production
|
||||
|
||||
# Create a variable for a specific repo
|
||||
fgj actions variable create NODE_VERSION 20 -R owner/repo`,
|
||||
fj actions variable create NODE_VERSION 20 -R owner/repo`,
|
||||
Args: cobra.ExactArgs(2),
|
||||
RunE: runActionsVariableCreate,
|
||||
}
|
||||
|
|
@ -318,7 +318,7 @@ var actionsVariableUpdateCmd = &cobra.Command{
|
|||
Short: "Update a repository variable",
|
||||
Long: "Update an existing variable for Forgejo Actions.",
|
||||
Example: ` # Update a variable
|
||||
fgj actions variable update ENVIRONMENT staging`,
|
||||
fj actions variable update ENVIRONMENT staging`,
|
||||
Args: cobra.ExactArgs(2),
|
||||
RunE: runActionsVariableUpdate,
|
||||
}
|
||||
|
|
@ -328,7 +328,7 @@ var actionsVariableDeleteCmd = &cobra.Command{
|
|||
Short: "Delete a repository variable",
|
||||
Long: "Delete a variable from Forgejo Actions.",
|
||||
Example: ` # Delete a variable
|
||||
fgj actions variable delete ENVIRONMENT`,
|
||||
fj actions variable delete ENVIRONMENT`,
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: runActionsVariableDelete,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue