Skip to content

Commit

Permalink
Fix: Add logic to display only the main body of the template in the i…
Browse files Browse the repository at this point in the history
…ssue body
  • Loading branch information
KBandipo authored and Ifycode committed Dec 10, 2024
1 parent 68594ed commit e43961a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions @dev-client/views/@plugin_githubsync/githubsync.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e43961a

Please sign in to comment.