Options approach for creating new CwtchBot #2

Open
decentral1se wants to merge 3 commits from decentral1se/cwtchbot:options-refactor into main
First-time contributor

Maybe nice to unify the same New... signature with this typical options approach.

NewCwtchBot("foo", "bar")
NewCwtchBotWithExperiments("foo", "bar", []string{"baz"})

👇

NewCwtchBot("foo", "bar", WithExperiments([]string{"baz"}))

🎺 This is a breaking change 🎺

Maybe nice to unify the same `New...` signature with this typical options approach. ```go NewCwtchBot("foo", "bar") NewCwtchBotWithExperiments("foo", "bar", []string{"baz"}) ``` 👇 ```go NewCwtchBot("foo", "bar", WithExperiments([]string{"baz"})) ``` 🎺 This is a breaking change 🎺
decentral1se added 2 commits 2023-06-11 22:19:17 +00:00
decentral1se force-pushed options-refactor from 1be0c9aa8f to 9fedfb83b0 2023-06-11 22:24:03 +00:00 Compare
sarah approved these changes 2023-06-16 21:10:18 +00:00
Owner

Thanks, this looks like a good change. Will merge this in when I do a CwtchBot pass in a couple of weeks (since this will require a fuzzbot update).

Thanks, this looks like a good change. Will merge this in when I do a CwtchBot pass in a couple of weeks (since this will require a fuzzbot update).
Owner
Actually https://git.openprivacy.ca/sarah/cwtchbot/src/branch/main/cmd/echobot/main.go will also need to be updated.
Author
First-time contributor

Cool, thanks for the review! Unsure where echobot needs updating due to it only using NewCwtchBot and not accepting experiment args? Was curious to take a stab at the fuzzbot code but can't seem to find it online here? Down to help on updates anyway, lemme know if that's handy.

Cool, thanks for the review! Unsure where `echobot` needs updating due to it only using `NewCwtchBot` and not accepting experiment args? Was curious to take a stab at the `fuzzbot` code but can't seem to find it online here? Down to help on updates anyway, lemme know if that's handy.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b decentral1se-options-refactor main
git pull options-refactor

Step 2:

Merge the changes and update on Gitea.
git checkout main
git merge --no-ff decentral1se-options-refactor
git push origin main
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sarah/cwtchbot#2
No description provided.