| 110 | } |
| 111 | |
| 112 | async function loadTemplates() { |
| 113 | for (const template of Object.keys(templates)) { |
| 114 | |
| 115 | // For ES6 modules use: |
| 116 | // const fileUrl = import.meta.url; |
| 117 | // const __dirname = dirname(fileURLToPath(fileUrl)); |
| 118 | |
| 119 | const filePath = resolve(__dirname, resourcePath, templates[template].file); |
| 120 | const text = await readFile(filePath, 'utf-8'); |
| 121 | templates[template].text = text; |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | function getReleaseComment() { |
| 126 | const url = repositoryUrl + '/releases/tag/${nextRelease.gitTag}'; |