From 7b856c643032efe01953f9d01a201a1581e32213 Mon Sep 17 00:00:00 2001 From: slugb0t Date: Tue, 5 Nov 2024 11:16:33 -0800 Subject: [PATCH] Squashed commit of the following: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 1bd8d1c903e534874e9abf27c1888ddd90233529 Author: slugb0t Date: Tue Nov 5 11:08:12 2024 -0800 fix: :bug: check license content all times commit 2a86142a1ad2a2f39935c79dffef0bff7bf9ba41 Merge: 0633f39 be31908 Author: Dorian Portillo Date: Tue Nov 5 10:26:45 2024 -0800 Merge branch 'main' into staging commit 0633f394dab8ec2413c79ed57af33e62f45f2a4f Author: slugb0t Date: Tue Nov 5 10:23:15 2024 -0800 docs: :memo: update changelog commit 73075f0dda895f9224766544ef6b3e7711640b6f Author: slugb0t Date: Tue Nov 5 09:55:32 2024 -0800 chore: :loud_sound: :hammer: remove logs commit 5a3d124c94c8d7ab5f6ad13219f50ffc52da869d Author: slugb0t Date: Fri Nov 1 15:53:25 2024 -0700 refactor: :recycle: remove import commit f22515e0df075b7adb1b442027c2ebb7e8952fb9 Author: slugb0t Date: Fri Nov 1 14:10:50 2024 -0700 feat: :fix: redirect to login if not signed in commit 07c61bc106ca1b7c2dc0459b142b0533803071c5 Author: slugb0t Date: Fri Nov 1 13:43:29 2024 -0700 refacotr: :recycle: update protectRoute to redirect to login when no user or session commit 26d715b94083d6cb3a83a4e35fd4c2a8d10480fe Author: slugb0t Date: Fri Nov 1 13:11:22 2024 -0700 refactor: :recycle: safety checks for protected middleware commit 45d8f15f8ccfd45d968339e0843de76c91f663b7 Author: Dorian Portillo Date: Fri Nov 1 12:30:41 2024 -0700 refactor: ♻️ 🐛 Codefair 3.1.0 (#89) * fix: :bug: patch removing pull_request.closed bug on metadata pr merge * fix: :bug: don't update firstPublished in the codemeta file + better logs * fix: :bug: patch error on reading db entry when it doesn't exist * chore: :loud_sound: better log on successful Zenodo publish * style: :art: margins between text and icon * feat: :sparkles: links to the list of tools used for codefair in /codefair * refactor: :sparkles: :recycle: abstract the license validation fn * doc: :bookmark: update changelog * feat: :sparkles: :recycle: abstraction to zenodo workflow * wip: :construction: abstracting zenodo workflow * feat: :sparkles: add help link in the Zenodo release page * refactor: :recycle: :sparkles: abstract out github release functions * refactor: :loud_sound: :recycle: improve error tracing in metadata file * chore: :hammer: remove todo * refactor: :sparkles: :recycle: abstracted Zenodo workflow (bot) * wip: :construction: save custom license content when no assertion is provided * ✨ feat: add support for custom licenses (#90) * ✨ feat: add support for custom licenses * 🐛 fix: reset citation license field * 🐛 fix: update zenodo workflow for custom licenses * fix: :bug: license is valid with custom license * feat: :sparkles: custom license template * ✨ feat: update codemeta, license and cwl ui paths (#91) * ✨ feat: update meta paths for consistency * 🚚 fix: updatel icense request path * ✨ feat: add support for custom license title (#92) * refactor: :recycle: :sparkles: new patches for license, cwl, metadata UI's * refactor: :sparkles: :recycle: apply migrations from UI to bot * feat: :sparkles: request custom license title from user * refactor: :recycle: hide message box when custom license title is blank * refactor: :recycle: issue dashboard requests custom title * feat: ✨ Saving custom title (#93) * feat: :sparkles: save custom title option * refactor: :recyle: reuse saveLicenseDraft for storing custom license title * refactor: :recycle: join draft and save title buttons together * refactor: :recycle: use naive-ui's properties for styling * chore: :hammer: remove typo * chore: :hammer: remove unused variables * feat: :sparkles: toasts for custom title saved button * refactor: :recycle: function rename * feat: :sparkles: create Zenodo metadata fn handles custom licenses * feat: :sparkles: custom license reference for archival workflow * refactor: :recycle: stop creating identifiers for new db entries * refactor: :recycle: :bug: revert allowing custom licenses for zenodo * refactor: ♻️ Custom License Support (#94) * refactor: :recycle: :sparkles: custom title saved updates dashboard, disable create release btn when custom license * refactor: :recycle: block progress of fair release if license is custom * feat: :sparkles: listener for when custom license title is saved through UI * feat: :sparkles: prevent fair release if not fair compliant * refactor: :recycle: improve license validation and update template text for custom licenses * refactor: :recycle: re-render issue from ui side * refactor: :recycle: update to message explaining custom licenses * db calls running in parallel * fix: :bug: prevent Zendo section from being seen when the license is custom * fix: :bug: trim license content before comparison --------- Co-authored-by: Sanjay Soundarajan commit 604e4db38ab7f248bf0ee6f397717138fe4bbb77 Author: slugb0t Date: Thu Oct 17 10:52:34 2024 -0700 merge: :twisted_rightwards_arrows: merge main to staging --- bot/license/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bot/license/index.js b/bot/license/index.js index 66e56128..2aa88101 100644 --- a/bot/license/index.js +++ b/bot/license/index.js @@ -198,6 +198,10 @@ function validateLicense(licenseRequest, existingLicense) { } } + if (licenseContent !== "") { + licenseContentEmpty = false; + } + return { licenseId, licenseContent, licenseContentEmpty }; }