INNER CODE UNIT · JavaScript
main
mlocati/docker-php-extension-installer · actions/check-new-issue/src/main.js:94
async function main()
{
try {
const token = core.getInput('token', {required: true, trimWhitespace: true});
const body = github.context.payload.issue.body;
const versionLine = extractVersionLine(body);
if (versionLine === null) {
core.notice('Issue template not applicable');
return;
}
console.log(`Version line: ${versionLine}`);
const version = extractVersion(versionLine);
console.log(`version: ${version}`);
const closeReason = getCloseReason(version, versionLine);
const octokit = github.getOctokit(token);
if (closeReason !== '') {
const { owner, repo } = github.context.repo;
await octokit.rest.issues.createComment({