| 122 | }; |
| 123 | |
| 124 | const fetchAuthor = version => { |
| 125 | return fetchChangelog(version) |
| 126 | .then(section => findAuthorLogin(version, section)) |
| 127 | .then(author => request({ url: URLS.GITHUB_PROFILE(author), json: true })) |
| 128 | .then(({ name, login }) => { |
| 129 | if (process.env.GITHUB_OUTPUT) { |
| 130 | // If we are running in a GitHub runner, we need to store the username |
| 131 | // so that the PR can be assigned to them |
| 132 | appendFileSync(process.env.GITHUB_OUTPUT, `author=${login}\n`); |
| 133 | } |
| 134 | |
| 135 | return name; |
| 136 | }); |
| 137 | }; |
| 138 | |
| 139 | const fetchChangelog = version => { |
| 140 | const parts = version.split('.'); |
no test coverage detected