From 2bffd5c90edf22c0ba27dcbeb758036939f951a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= <76261501+zecakeh@users.noreply.github.com> Date: Wed, 22 May 2024 14:17:29 +0200 Subject: [PATCH] Fix GitLab's ready for review hook (#936) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix GitLab's ready for review hook As far back as I could go in the docs (GitLab 14.10), the keys for changes have been `previous` and `current`. There is a `draft` change that we can use directly instead of guessing from the title. The type of the value depends on the key of the change. Signed-off-by: Kévin Commaille * Add changelog Signed-off-by: Kévin Commaille --------- Signed-off-by: Kévin Commaille Co-authored-by: Will Hunt --- changelog.d/936.bugfix | 1 + src/Connections/GitlabRepo.ts | 12 ++++-------- src/Gitlab/WebhookTypes.ts | 6 +++--- 3 files changed, 8 insertions(+), 11 deletions(-) create mode 100644 changelog.d/936.bugfix diff --git a/changelog.d/936.bugfix b/changelog.d/936.bugfix new file mode 100644 index 00000000..d22b1cab --- /dev/null +++ b/changelog.d/936.bugfix @@ -0,0 +1 @@ +Fix GitLab's ready for review hook. \ No newline at end of file diff --git a/src/Connections/GitlabRepo.ts b/src/Connections/GitlabRepo.ts index ada2b235..f2b754ac 100644 --- a/src/Connections/GitlabRepo.ts +++ b/src/Connections/GitlabRepo.ts @@ -622,22 +622,18 @@ export class GitLabRepoConnection extends CommandConnection