From 13c208100406a4668c10a06129d1b4c4f38f43ef Mon Sep 17 00:00:00 2001 From: Chris Wilkinson Date: Thu, 2 May 2024 13:22:11 +0100 Subject: [PATCH] Enable requests for SocArXiv preprint reviews Refs #1685, https://github.com/PREreview/coar-notify/commit/2b98bac6b3adfe84b6420a6dea58d6504a7f478f --- src/review-request.ts | 15 ++++++++++++++- test/fc.ts | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/review-request.ts b/src/review-request.ts index 6adec331b..75482a977 100644 --- a/src/review-request.ts +++ b/src/review-request.ts @@ -15,6 +15,7 @@ import type { PreprintId, PsyarxivPreprintId, ScieloPreprintId, + SocarxivPreprintId, } from './types/preprint-id' export type ReviewRequest = IncompleteReviewRequest | CompletedReviewRequest @@ -28,6 +29,7 @@ export type ReviewRequestPreprintId = | OsfPreprintsPreprintId | PsyarxivPreprintId | ScieloPreprintId + | SocarxivPreprintId export interface IncompleteReviewRequest { readonly status: 'incomplete' @@ -105,6 +107,17 @@ export const saveReviewRequest = ( export function isReviewRequestPreprintId(preprint: PreprintId): preprint is ReviewRequestPreprintId { return match(preprint.type) - .with('arxiv', 'biorxiv', 'ecoevorxiv', 'edarxiv', 'medrxiv', 'osf-preprints', 'psyarxiv', 'scielo', () => true) + .with( + 'arxiv', + 'biorxiv', + 'ecoevorxiv', + 'edarxiv', + 'medrxiv', + 'osf-preprints', + 'psyarxiv', + 'scielo', + 'socarxiv', + () => true, + ) .otherwise(() => false) } diff --git a/test/fc.ts b/test/fc.ts index f9e94b1d7..bc0c6672b 100644 --- a/test/fc.ts +++ b/test/fc.ts @@ -822,6 +822,7 @@ export const reviewRequestPreprintId = (): fc.Arbitrary osfPreprintsPreprintId(), psyarxivPreprintId(), scieloPreprintId(), + socarxivPreprintId(), ) export const notAReviewRequestPreprintId = (): fc.Arbitrary> => @@ -838,7 +839,6 @@ export const notAReviewRequestPreprintId = (): fc.Arbitrary