So we don't materialize the whole list multiple times especially when
paginating. Mostly written by Finto, I was just driving.
Co-authored-by: Fintan Halpenny <fintan.halpenny@gmail.com>
This commit allows us to e.g. convert the Set of DIDs we obtain from
assignee actions on cobs into a Set of Authors with their Aliases.
Also it introduces the `FromRadicleAction` trait which can be
implemented for any type of enum we get from the `radicle` create to
convert into a type which is better suited for us.
Removes also any calling the `alias` command in the `PatchTimeline` or
`IssueTimeline` since we already get the alias from the backend the
first time now.
This allows us for onboarding to e.g. fail if there is no profile around
and guide new users through identity creation.
Also it makes the tauri run function easier to understand
@fintan:
The API of the DraftStore needs some improvement and it can be easy to
do the wrong thing when trying to publish the changes to the published
cob reference
Based on this PSA we should apply any changes to the patch revisions
directly, instead of using the `DraftStore`
By restricting `img-src` in our CSP, we weren't allowing images from
e.g. https://github.com like CI badges to display.
With this change we allow users to add images from any `https`, `data`
or `blob` source, which is more user friendly.
`Show::All` which is the default value should return all values obtained
from `storage.repositories()`.
This commit adds a `Show::Contributor` enum variant to only get repos
that the user has forked, initialized or contributed in some way.
To start making the backend codebase more future proof, I started
introducing the hexagonal architecture concept, of having `Service`
traits that is the public API and inner traits like `Storage`,
`Metrics`, etc. that can be implemented by different adapters like
`Sqlite`.
This is a first development in this direction.
So far we only supported issue operations on the `activity_by_id`
command.
With this commit we separate the commands into a `activity_by_issue` and
`activity_by_patch` command that calls a generic `activity_by_id` trait
implementation.
`Operation` now takes as a generic either `cob/issue/Action.ts` or
`cob/patch/Action.ts`.
Also `Operation` now stores the array of all `Action` that happened on
said operation. I'm not entirely sure if this will help us in the
future, but it represents more closely the state of the relation between
an `Operation` and the cob `Actions`.
Also in the edge case that the front-end didn't update and the node just
stopped in between we fallback gracefully instead of returning an error
on the back-end.
Returns all commits for a specific repo.
Takes a `parent` argument as starting point for the git history.
Uses the `head` field of the project payload if not provided.
Instead of since and until timestamps uses cursor and take params to
paginate the commit history.