From e43961aa12d76f3f18d0452e84a45376cb86f2dc Mon Sep 17 00:00:00 2001 From: KBandipo~ Date: Wed, 4 Dec 2024 00:03:52 +0100 Subject: [PATCH] Fix: Add logic to display only the main body of the template in the issue body --- @dev-client/views/@plugin_githubsync/githubsync.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/@dev-client/views/@plugin_githubsync/githubsync.js b/@dev-client/views/@plugin_githubsync/githubsync.js index 171fc78..1c6f683 100644 --- a/@dev-client/views/@plugin_githubsync/githubsync.js +++ b/@dev-client/views/@plugin_githubsync/githubsync.js @@ -87,6 +87,14 @@ issueTemplatesDropdownSelect.addEventListener('change', async (e) => { throw new Error(`Failed to fetch template content: ${response.statusText}`); } let content = await response.text(); + + if (content.startsWith('---')) { + const findIndex = content.indexOf('---', 3); + if (findIndex !== -1) { + content = content.slice(findIndex + 3).trim(); + } + } + issueBodyInput.value = content; } catch (error) { console.log('Error fetching template content:', error);