It would be interesting to have an RPC driver that lets you implement your own scm client. This could be useful when you need to test / implement a driver that is not currently supported, or when you need to customize or override how an existing driver behaves.
the rpc client will need to pass oauth1/2 credentials from the client to server. How do we do this in a generic and customizable way?
some of the abstractions in this library currently leak. Specifically we need to know how to create a netrc file for cloning (in Drone) and we use the driver name to determine the exact format. We would need to work around this. Also we use the driver name to decide whether or not to ignore certain webhook types. For example, GitHub may use a push webhook for tags, and ignore tag_create webhooks because we get more information from the push.
we will need to split parsing the webhook and validating the signature into separate methods. Doing this in a single function with a callback is not conducive to this rpc proposal.
ideally we would do simple REST rpc (I'd prefer not to pull in a giant dependency like grpc). We would probably have to come up with some sort of convention for how we want to handle routing, passing input parameters, etc. Maybe just simple jsonrpc?
The text was updated successfully, but these errors were encountered:
It would be interesting to have an RPC driver that lets you implement your own scm client. This could be useful when you need to test / implement a driver that is not currently supported, or when you need to customize or override how an existing driver behaves.
I have started an example branch here:
https://github.com/drone/go-scm/tree/rpc
Some challenges:
pushwebhook for tags, and ignoretag_createwebhooks because we get more information from the push.The text was updated successfully, but these errors were encountered: