Skip to content

Commit 4f7da79

Browse files
committed
topic get -> topic list
1 parent b960195 commit 4f7da79

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

USAGE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,11 @@ SUBCOMMANDS:
269269
### Topic Get
270270

271271
```
272-
gut-topic-get 0.1.0
273-
Get topics for all repositories that match a regex
272+
gut-topic-list 0.1.0
273+
List topics for all repositories that match a regex
274274
275275
USAGE:
276-
gut topic get [OPTIONS]
276+
gut topic list [OPTIONS]
277277
278278
FLAGS:
279279
-h, --help Prints help information

docs/docs/usage/common-commands.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ gut topic add -o myorg -r ".*-service$" -t microservice backend
154154
# Set topics (replaces existing)
155155
gut topic set -o myorg -r "^lang-sme" -t language sami production
156156

157-
# Get current topics
158-
gut topic get -o myorg -r ".*"
157+
# List current topics
158+
gut topic list -o myorg -r ".*"
159159

160160
# Apply script to repos with specific topic
161161
gut topic apply -o myorg -t backend -s deploy.sh

docs/docs/usage/overview.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,11 @@ gut set permission -o <org> -t team-slug \
231231

232232
Topics are GitHub repository tags that help organize and discover repositories.
233233

234-
### topic get
235-
Get topics for all repositories that match a pattern.
234+
### topic list
235+
List topics for all repositories that match a pattern.
236236

237237
```bash
238-
gut topic get -o <org> -r "<regex>"
238+
gut topic list -o <org> -r "<regex>"
239239
```
240240

241241
### topic set

src/commands/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ pub mod template;
6060
pub mod topic;
6161
pub mod topic_add;
6262
pub mod topic_apply;
63-
pub mod topic_get;
6463
pub mod topic_helper;
64+
pub mod topic_list;
6565
pub mod topic_set;
6666
pub mod transfer;
6767
pub mod workflow;

src/commands/topic.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
use super::topic_add::*;
22
use super::topic_apply::*;
3-
use super::topic_get::*;
3+
use super::topic_list::*;
44
use super::topic_set::*;
55
use anyhow::Result;
66
use clap::Parser;
77

88
#[derive(Debug, Parser)]
9-
/// Add, get, set or apply a script by topic
9+
/// Add, list, set or apply a script by topic
1010
pub struct TopicArgs {
1111
#[command(subcommand)]
1212
command: TopicCommand,
@@ -24,16 +24,16 @@ pub enum TopicCommand {
2424
Add(TopicAddArgs),
2525
#[command(name = "apply")]
2626
Apply(TopicApplyArgs),
27-
#[command(name = "get")]
28-
Get(TopicGetArgs),
27+
#[command(name = "list", alias = "get")]
28+
List(TopicListArgs),
2929
#[command(name = "set")]
3030
Set(TopicSetArgs),
3131
}
3232

3333
impl TopicCommand {
3434
pub fn run(&self) -> Result<()> {
3535
match self {
36-
Self::Get(args) => args.run(),
36+
Self::List(args) => args.run(),
3737
Self::Set(args) => args.run(),
3838
Self::Add(args) => args.run(),
3939
Self::Apply(args) => args.run(),
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ use rayon::prelude::*;
88
use serde_json::json;
99

1010
#[derive(Debug, Parser)]
11-
/// Get topics for all repositories that match a regex
12-
pub struct TopicGetArgs {
11+
/// List topics for all repositories that match a regex
12+
pub struct TopicListArgs {
1313
#[arg(long, short, alias = "organisation", conflicts_with = "all_owners")]
1414
/// Target owner (organisation or user) name
1515
///
@@ -31,7 +31,7 @@ struct RepoTopics {
3131
topics: Vec<String>,
3232
}
3333

34-
impl TopicGetArgs {
34+
impl TopicListArgs {
3535
pub fn run(&self) -> Result<()> {
3636
common::run_for_owners(
3737
self.all_owners,

0 commit comments

Comments
 (0)