Skip to content

Commit 91777c7

Browse files
committed
build: add "[security]" to the PR title when appropriate
1 parent 1274f3e commit 91777c7

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎build-automation.mjs‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ const nodeKeys = readFileSync(resolve(import.meta.dirname, 'keys', 'node.keys'))
1111

1212
const updatedVersions = [];
1313

14+
let isSecurity = true;
15+
1416
try {
1517
console.log(
1618
`Found major versions in versions.json: ${Object.keys(supportedVersions).join(', ')}`,
@@ -127,6 +129,7 @@ try {
127129
} else if (latestVersion.version !== localVersion) {
128130
console.log(`\t${variant}: updating to ${latestVersion.version}`);
129131
updatedVersions.push(latestVersion.version);
132+
isSecurity &= latestVersion.security;
130133
writeFileSync(dockerfilePath, dockerfileOutput);
131134
} else {
132135
console.warn(
@@ -139,7 +142,7 @@ try {
139142
// Let the GitHub Action library set the GITHUB_ENV file rather than manually handling it
140143
exportVariable(
141144
'NODE_PR_TITLE',
142-
`feat: Node.js ${[...new Set(updatedVersions)].join(', ')}`,
145+
`feat${isSecurity ? '[security]' : ''}: Node.js ${[...new Set(updatedVersions)].join(', ')}`,
143146
);
144147
} else {
145148
console.log('No Pull Request will be created.');

0 commit comments

Comments
 (0)