Commit graph

976 commits

Author SHA1 Message Date
fr33domlover
da01fcf451 S2S: Fix bug: in *UndoF, when unresolving ticket, ticketStatus wasn't updated 2020-08-06 13:18:38 +00:00
fr33domlover
be3cf50283 C2S: Fix bug: undoC: When deleting TicketResolve, ticketStatus wasn't updated 2020-08-06 07:14:06 +00:00
fr33domlover
9f34106a87 Client: Add forms for resolving and unresolving a ticket/MR 2020-08-05 20:41:33 +00:00
fr33domlover
5a0c46ad5c GET ticket handlers: Provide 'resolvedBy', set to the Resolve activity's ID URI 2020-08-05 12:43:04 +00:00
fr33domlover
de5d24edca When grabbing ticket/patch from DB, grab the TicketResolve* record too 2020-08-05 11:04:00 +00:00
fr33domlover
7a74dcc55e Web.ActivityPub: Allow to specify 'resolved' and 'resolvedBy' for 'Ticket' 2020-08-05 10:11:16 +00:00
fr33domlover
9317e514b2 S2S unresolve, C2S resolve & unresolve, use C2S in the UI buttons 2020-08-05 08:28:58 +00:00
fr33domlover
7f106023b0 S2S: Implement inbox handlers for Resolve activity 2020-07-28 09:35:27 +00:00
fr33domlover
58c0719370 Web.ActivityPub: Add a Resolve activity 2020-07-23 14:27:11 +00:00
fr33domlover
1bd7995bb5 DB: Fix migration 173 for future instances to avoid the RemoteCollection bug 2020-07-23 13:38:46 +00:00
fr33domlover
ac9c79c761 DB: RemoteCollection was referring to itself accidentally, add migration to fix 2020-07-23 13:33:54 +00:00
fr33domlover
b050c9225d Web.ActivityPub: Add 'currentVersion' property to 'Patch' type 2020-07-23 10:47:35 +00:00
fr33domlover
c1f0722c21 C2S: createTicketC: Allow to submit MRs i.e. Ticket with a Patch attached 2020-07-22 13:00:48 +00:00
fr33domlover
fd8405e741 S2S: repoCreateTicketF: Store a Patch record in DB, to have a local copy 2020-07-21 10:03:51 +00:00
fr33domlover
029fce58a4 S2S: Repos now accept remotely hosted patches via Create/Ticket 2020-07-21 09:39:36 +00:00
fr33domlover
f286f35a87 S2S: Add repo patch support to checkCreateTicket 2020-07-19 12:48:39 +00:00
fr33domlover
f7c0807775 C2S: offerTicketC: Support offering a patch to a repo 2020-07-16 11:30:22 +00:00
fr33domlover
3e7e885300 S2S: Implement patch submission via repoOfferTicketF 2020-07-16 08:22:13 +00:00
fr33domlover
6d4d77255f S2S: Prepare Offer/Ticket parsing code for handling a remote patch/MR 2020-07-15 13:00:58 +00:00
fr33domlover
c78becaf5e S2S: projectCreateTicketF: Refactor to use new utils 2020-07-15 11:20:11 +00:00
fr33domlover
e46bcac559 S2S: sharerCreateTicketF: Tweak to use the new utils 2020-07-15 10:14:41 +00:00
fr33domlover
1a8ecb5995 S2S: Refactor projectOfferTicketF to use the new utils 2020-07-15 09:58:59 +00:00
fr33domlover
58e88d1e1b Upgrade sharerOfferTicketF to new utils 2020-07-15 08:00:08 +00:00
fr33domlover
75c0bc0939 Web.ActivityPub: Ticket attachment's Offer object can be either URI or a Patch
This will allow to use this representation for Offer and Create activities.
When creating a new MR, the inner Offer's 'object' is a 'Patch' object. When
serving an existing hosted MR, the inner Offer's 'object' is just a URI
pointing to the patch.
2020-07-14 11:25:37 +00:00
fr33domlover
6d80b1e4f1 Web.ActivityPub: In MR, the 'object' of the 'Offer' is a 'Patch' URI
Instead of an 'OrderedCollection' of the versions
2020-07-14 11:10:43 +00:00
fr33domlover
216aaa72ee Web.ActivityPub: Add PatchLocal type similar to TicketLocal 2020-07-14 09:56:13 +00:00
fr33domlover
fa3348513a For latest-version patches, provide a 'previousVersions' list 2020-07-14 08:50:57 +00:00
fr33domlover
a06d273107 C2S: Implement offerDepC, allowing to create ticket dependencies 2020-07-13 13:43:20 +00:00
fr33domlover
90086f1329 In audience parsing, provide version without bcc & list hosts for inbox fwding 2020-07-12 11:17:12 +00:00
fr33domlover
2a6bba89d5 C2S: Reimplement offerTicketC using the new tools 2020-07-07 07:26:51 +00:00
fr33domlover
511c3c60db C2S: In yesod authorization check, support OAuth2 as login method 2020-07-06 08:01:02 +00:00
fr33domlover
d392a37707 Rename InboxR to InboxDebugR, much clearer that way 2020-07-02 13:34:38 +00:00
fr33domlover
5d25aba239 C2S: Implement real C2S access via outbox POSTing and OAuth2 2020-07-02 13:21:59 +00:00
fr33domlover
a0325da028 S2S: Implement projectOfferDepF and repoOfferDepF 2020-06-22 11:29:30 +00:00
fr33domlover
5cf105fafb Move checkDepAndTarget from Vervis.Federation.Ticket to Vervis.Ticket
I'm moving it there because it's going to be used in C2S too, in offerDepC.
2020-06-21 12:31:11 +00:00
fr33domlover
4fc50f0870 Move hostIsLocal from Vervis.ActivityPub to Yesod.ActivityPub 2020-06-21 12:29:37 +00:00
fr33domlover
2cddadd679 sharerOfferDepF: If parent is remote and child is mine, record TicketDepOffer 2020-06-21 09:06:02 +00:00
fr33domlover
bc4248d7ca S2S: Handle remote dep in sharerAcceptF
If sharer receives Accept on an Offer/Dep where the sharer hosts the child
ticket, it records a RemoteTicketDependency and runs inbox forwarding to ticket
followers. But this relies on a TicketDependencyOffer record already existing.
I'll take care of that in the next patches.

sharerAcceptF and sharerRejectF now use the insertToInbox from
Vervis.Federation.Util instead of their own copies of it, which were identical
anyway. Perhaps gradually all the inbox insertion in all S2S handlers will
switch to using that function.
2020-06-21 08:02:05 +00:00
fr33domlover
a2468c52fd Prepare for ticket dependency federation
To be honest, this is a huge patch that changes tons of stuff and probably
should have been broken up into small changes. But I already had the codebase
not building, so... just did all of this at once :P

Basically this patch does the following:

- DB migrations for ticket dependency related tables, e.g. allowing a remote
  author and a remote child
- Allowing S2S handlers to provide an async continued processing function,
  which is executed and the result then added to the debug page
- Most UI and functionality related to ticket deps is disabled, new
  implementation being added gradually via ActivityPub
- Improvements to AP tools, e.g. allow to specify multiple hosts for approved
  forwarding when sending out an activity, and allow to specify audience of
  software-authored activities using a convenient human-friendly structure
- Implementation of S2S sharerOfferDepF which creates a dependency under a
  sharer-hosted ticket/patch and sends back an Accept
2020-06-18 10:38:04 +00:00
fr33domlover
854d35fd9b C2S: Support following a sharer-patch and repo-patch 2020-05-28 07:48:39 +00:00
fr33domlover
3fb529325d S2S: Support commenting on sharer-patch and repo-patch 2020-05-27 14:07:02 +00:00
fr33domlover
cf946e0326 S2S: Support unfollowing sharer-patch and repo-patch
- Sharer-patch was already working due to the shared DB tabled
- Repo-patch support added
- Fixed a bug in following project-tickets: It allowed to follow a
  sharer-ticket by sending the Follow to the project. Now, the project allows
  to follow only the project-tickets, and refuses to handle a sharer-ticket.
2020-05-27 11:59:53 +00:00
fr33domlover
c7b6ad643b S2S: Support following sharer-patch and repo-patch
Also fixed a bug in which trying to follow a ticket with nonexistent
ltkhid/talkhid would result with 404 as if the actor inbox is nonexistent. Now,
there's a friendly message reported.
2020-05-27 11:39:19 +00:00
fr33domlover
06a051d2e5 Support addressing, delivery and forwarding for sharer-patches and repo-patches 2020-05-27 10:38:28 +00:00
fr33domlover
d9c00cba1f Add repo-hosted patch routes and GET handlers 2020-05-26 14:51:11 +00:00
fr33domlover
e29233a59f Rename RepoPatchR to RepoCommitR, we'll use the old name for merge requests 2020-05-26 08:54:21 +00:00
fr33domlover
ad8c0ce8b4 Return sorted PatchId list from the get*Patch functions 2020-05-26 08:41:02 +00:00
fr33domlover
e68a659221 Support forwarding activities from repo actors 2020-05-25 13:36:34 +00:00
fr33domlover
17e59af1c4 AP: In getSharerPatchR, provide the list of patch versions, latest first 2020-05-25 12:39:25 +00:00
fr33domlover
c63479470e Add patch version route and GET handler, serving a specific patch file 2020-05-25 09:40:48 +00:00