Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"format": "prettier --check '**/*.{js,jsx,ts,tsx,json,css,md}'",
"format:fix": "prettier --write '**/*.{js,jsx,ts,tsx,json,css,md}'",
"dev": "nodemon --watch '**/*' --exec 'ts-node' src/index.ts",
"dev-win": "nodemon --watch \"**/*\" --exec \"ts-node\" src/index.ts",
"build": "npm run lint && npm run format && tsc",
"start": "node dist/index.js"
},
Expand Down
12 changes: 11 additions & 1 deletion src/lib/issue_closed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,21 @@ export const createNextIssue = async (context: IssuesContext, logger: Logger): P
const { client, author, clientTag } = metadata;
const data = { client, author, clientTag, stage };

const configFiles = await fg(`${MD_DIR}/${stage}-*/config.json`)
if (configFiles.length === 0) {
logger.error(`createNextIssue: No config.json file found for stage: ${stage}.`)
return null;
}

const configFile = await fs.readFile(configFiles[0], 'utf-8')
const config = JSON.parse(configFile)
const stageLabel = config.label

// add comment to original issue to highlight next steps
const nextIssueResponse = await context.octokit.issues.create({
owner,
repo,
title: `[project] ${clientTag}: Stage ${stage}/${MAX_STAGE} - REPLACE WITH LABEL`,
title: `[project] ${clientTag}: Stage ${stage}/${MAX_STAGE} - ${stageLabel}`,
body: template(data) + generateMetadata({ client, author, clientTag, stage }),
milestone: issue.milestone.number,
labels: issue.labels,
Expand Down
3 changes: 3 additions & 0 deletions src/stages/2-requirements/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"label": "Requirements"
}