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