ubiquibot / assistive-pricing

0 stars 10 forks source link

feat: command parsing #3

Closed gentlementlegen closed 4 months ago

gentlementlegen commented 4 months ago

Resolves https://github.com/ubiquibot/plugins-wishlist/issues/6

github-actions[bot] commented 4 months ago
Lines Statements Branches Functions
Coverage: 80%
80% (4/5) 100% (0/0) 66.66% (2/3)

JUnit

Tests Skipped Failures Errors Time
1 0 :zzz: 0 :x: 0 :fire: 3.836s :stopwatch:
Coverage Report (80%)
File% Stmts% Branch% Funcs% LinesUncovered Line #s
All files8010066.6680 
   main.ts8010066.66809
gentlementlegen commented 4 months ago

What is going on here

For this plugin to work, I had to spin up another db, which I guess makes sense since we were talking about splitting the data for each plugin. However this db is under my own credentials, for testing purposes. You can find some tests commands here https://github.com/Meniole/bot/issues/4#issuecomment-2102861633

In this case maybe having a simple Cloudflare KV would suffice as it just remembers a label list for a certain user (except billing manager / admins), which seems trivial enough to be stored within a key / value pair. I could have a look at this in a separate PR, I know that would make @0x4007 very happy.

In the meantime this gives the capability to:

Thank you @whilefoo for the heavy lifting.

0x4007 commented 4 months ago
  • removed defaultLabels in the configuration that was unused so far

They should be used to automatically populate a repository's labels with the "special" price related labels.

Do you recall when working on a new repository that you must toggle some label for the bot to populate the rest? @gentlementlegen

gentlementlegen commented 4 months ago

@0x4007 It is working that way, thought it would be redundant with the labels section which seems to contain the same value. See an example of configuration here. Wouldn't labels and defaultLabels be the exact same? Removed it because defaultLabels was never reference in the code either.