mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 11:01:25 +01:00
fix: name team repository arguments and release assets consistently
Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
2 files changed
+3
-3
No files matched your search
@@ -25,7 +25,7 @@ func (a *application) releaseAssetCommand() *cobra.Command {
|
|||||||
group := &cobra.Command{
|
group := &cobra.Command{
|
||||||
Use: "asset",
|
Use: "asset",
|
||||||
Short: "Manage release assets",
|
Short: "Manage release assets",
|
||||||
Long: "List, upload, download, rename and delete the files attached to a release. Assets are named by name or ID.",
|
Long: "List, upload, download, rename and delete the files attached to a release. Assets are addressed by name or ID.",
|
||||||
}
|
}
|
||||||
group.AddCommand(a.assetListCommand(), a.releaseUploadCommand(), a.releaseDownloadCommand(), a.assetEditCommand(), a.assetDeleteCommand())
|
group.AddCommand(a.assetListCommand(), a.releaseUploadCommand(), a.releaseDownloadCommand(), a.assetEditCommand(), a.assetDeleteCommand())
|
||||||
return group
|
return group
|
||||||
|
|||||||
@@ -658,7 +658,7 @@ func (a *application) teamRepoAccessCommand(grant bool) *cobra.Command {
|
|||||||
delete(annotations, "tea.confirm")
|
delete(annotations, "tea.confirm")
|
||||||
}
|
}
|
||||||
return &cobra.Command{
|
return &cobra.Command{
|
||||||
Use: verb + " <team> <repo>...", Short: short, Args: usageArgs(cobra.MinimumNArgs(2)), Example: example, Annotations: annotations,
|
Use: verb + " <team> <repository>...", Short: short, Args: usageArgs(cobra.MinimumNArgs(2)), Example: example, Annotations: annotations,
|
||||||
Long: short + ` of its organization. Name the repositories alone, such as service, or as ORG/NAME;
|
Long: short + ` of its organization. Name the repositories alone, such as service, or as ORG/NAME;
|
||||||
repositories of other owners cannot be granted to a team.`,
|
repositories of other owners cannot be granted to a team.`,
|
||||||
ValidArgsFunction: a.completeTeamThen(func(ctx context.Context, t target, team services.Team) ([]cobra.Completion, error) {
|
ValidArgsFunction: a.completeTeamThen(func(ctx context.Context, t target, team services.Team) ([]cobra.Completion, error) {
|
||||||
@@ -671,7 +671,7 @@ repositories of other owners cannot be granted to a team.`,
|
|||||||
}),
|
}),
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
if cmd.Flags().Changed("repo") {
|
if cmd.Flags().Changed("repo") {
|
||||||
return clierr.Wrap(clierr.Usage, fmt.Errorf("--repo is not used by %s; name the repositories as arguments: %s <team> <repo>", cmd.CommandPath(), cmd.CommandPath()))
|
return clierr.Wrap(clierr.Usage, fmt.Errorf("--repo is not used by %s; name the repositories as arguments: %s <team> <repository>", cmd.CommandPath(), cmd.CommandPath()))
|
||||||
}
|
}
|
||||||
_, service, team, err := a.team(cmd, args[0])
|
_, service, team, err := a.team(cmd, args[0])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in new issue
Block a user