From 47cee314b09a8199a381647299392b0be392546c Mon Sep 17 00:00:00 2001 From: Stan Rozenraukh Date: Fri, 5 May 2023 16:52:51 -0400 Subject: [PATCH] feat: comment diffs in go (#50) * chore: moving libs around * chore: moving things around and caching works * feat: fetch gh api concurrently * moving github versioning internally * move diff parsing to golang (easier to have tests here) --- frontend/components/DiffBlock.vue | 39 +-- server/cmd/server-nuxt/api.go | 6 +- server/cmd/server-nuxt/main.go | 32 +-- server/config.go | 26 +- server/github.go | 213 ---------------- server/go.mod | 1 + server/go.sum | 2 + server/internal/cache/context.go | 29 ++- server/{ => internal/errors}/errors.go | 4 +- server/internal/github/github.go | 238 ++++++++++++++++++ server/{ => internal/github}/params_test.go | 2 +- server/internal/github/review_model.go | 126 ++++++++++ server/internal/github/review_model_test.go | 24 ++ .../github/review_params.go} | 6 +- server/internal/github/types.go | 10 + server/model.go | 34 --- 16 files changed, 462 insertions(+), 330 deletions(-) delete mode 100644 server/github.go rename server/{ => internal/errors}/errors.go (94%) create mode 100644 server/internal/github/github.go rename server/{ => internal/github}/params_test.go (93%) create mode 100644 server/internal/github/review_model.go create mode 100644 server/internal/github/review_model_test.go rename server/{params.go => internal/github/review_params.go} (94%) create mode 100644 server/internal/github/types.go delete mode 100644 server/model.go diff --git a/frontend/components/DiffBlock.vue b/frontend/components/DiffBlock.vue index 950f03b..15142d3 100644 --- a/frontend/components/DiffBlock.vue +++ b/frontend/components/DiffBlock.vue @@ -1,5 +1,5 @@