diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-12-10 14:21:43 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-12-11 11:50:40 +0300 |
commit | 8cee15bef7f093e012e3492b7e95165ce60731bb (patch) | |
tree | 9aa88dcabfbc25b027515f5b53539671dcc2a563 | |
parent | f58b02f2ecc9329174f28a1bd58cd256ec61ab42 (diff) |
hooks: Document transaction fields for HooksPayload
The transaction fields for the HooksPayload are currently missing
documentation, which this commit adds.
-rw-r--r-- | internal/git/hooks_payload.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/internal/git/hooks_payload.go b/internal/git/hooks_payload.go index 5bc1b193b..886a17f8a 100644 --- a/internal/git/hooks_payload.go +++ b/internal/git/hooks_payload.go @@ -40,8 +40,12 @@ type HooksPayload struct { // Gitaly's internal socket. InternalSocketToken string `json:"internal_socket_token"` - Transaction *metadata.Transaction `json:"transaction"` - Praefect *metadata.PraefectServer `json:"praefect"` + // Transaction is used to identify a reference transaction. This is an optional field -- if + // it's not set, no transactional voting will happen. + Transaction *metadata.Transaction `json:"transaction"` + // Praefect is used to identify the Praefect server which is hosting the transaction. This + // field must be set if and only if `Transaction` is. + Praefect *metadata.PraefectServer `json:"praefect"` } // jsonHooksPayload wraps the HooksPayload such that we can manually encode the |