MCPcopy Index your code
hub / github.com/nodejs/nodejs.org / fetchAuthor

Function fetchAuthor

apps/site/scripts/release-post/index.mjs:124–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122};
123
124const 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
139const fetchChangelog = version => {
140 const parts = version.split('.');

Callers 1

fetchDocsFunction · 0.85

Calls 3

fetchChangelogFunction · 0.85
findAuthorLoginFunction · 0.85
requestFunction · 0.85

Tested by

no test coverage detected