Skip to content

Commit ebd7e62

Browse files
committed
feat: change default strategy from pr to commit
Also rename remaining "cq" references to "issuebot" in source code.
1 parent 029b1a9 commit ebd7e62

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ issuebot --local --command "./my-issue-handler.sh {prompt}"
7070
| `--org` | | GitHub org to watch (all non-archived source repos) |
7171
| `--repo` | | Single `owner/repo` to watch |
7272
| `--label` | | Only process issues with this label (default: all open issues) |
73-
| `--strategy` | `pr` | Git strategy: `pr` (branch + PR) or `commit` (push to default branch) |
73+
| `--strategy` | `commit` | Git strategy: `pr` (branch + PR) or `commit` (push to default branch) |
7474
| `--interval` | `30s` | Polling interval |
7575
| `--workers` | `5` | Max concurrent repo workers |
7676
| `--workspace` | `~/.issuebot/repos` | Directory for cloned repos |

cmd/watch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ func runWatch(cmd *cobra.Command, args []string) error {
164164
target = cfg.Repo
165165
}
166166

167-
slog.Info("starting cq",
167+
slog.Info("starting issuebot",
168168
"target", target, "label", cfg.Label,
169169
"strategy", cfg.Strategy, "interval", cfg.Interval,
170170
"workers", cfg.Workers,

internal/config/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ var issueConfigRe = regexp.MustCompile(`(?s)<!--\s*issuebot\s*\n(.*?)\n-->`)
4242
func DefaultCLIConfig() CLIConfig {
4343
return CLIConfig{
4444
Label: "",
45-
Strategy: "pr",
45+
Strategy: "commit",
4646
Interval: 30 * time.Second,
4747
Workers: 5,
4848
MaxRetries: 3,
@@ -62,7 +62,7 @@ func ParseIssueConfig(body string) IssueConfig {
6262
}
6363

6464
if err := yaml.Unmarshal([]byte(m[1]), &cfg); err != nil {
65-
slog.Warn("malformed cq config in issue body", "error", err)
65+
slog.Warn("malformed issuebot config in issue body", "error", err)
6666
}
6767

6868
return cfg

internal/config/config_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func TestDefaultConfig(t *testing.T) {
8282
got interface{}
8383
want interface{}
8484
}{
85-
{"strategy", cfg.Strategy, "pr"},
85+
{"strategy", cfg.Strategy, "commit"},
8686
{"interval", cfg.Interval, 30 * time.Second},
8787
{"workers", cfg.Workers, 5},
8888
{"max-retries", cfg.MaxRetries, 3},
@@ -134,8 +134,8 @@ func TestResolveStrategy_FallbackToCLI(t *testing.T) {
134134
cli := DefaultCLIConfig()
135135

136136
issue := IssueConfig{}
137-
if got := ResolveStrategy(cli, issue); got != "pr" {
138-
t.Errorf("got %q, want %q", got, "pr")
137+
if got := ResolveStrategy(cli, issue); got != "commit" {
138+
t.Errorf("got %q, want %q", got, "commit")
139139
}
140140
}
141141

0 commit comments

Comments
 (0)