Skip to content

Commit

Permalink
Merge branch 'main' into git-node-release-promote
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Aug 28, 2024
2 parents 0196904 + a8529ed commit 423aba8
Show file tree
Hide file tree
Showing 19 changed files with 423 additions and 213 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## [5.4.0](https://github.com/nodejs/node-core-utils/compare/v5.3.1...v5.4.0) (2024-08-07)


### Features

* use sec release template in PR description ([#832](https://github.com/nodejs/node-core-utils/issues/832)) ([25ea992](https://github.com/nodejs/node-core-utils/commit/25ea9923c6cff813766678332130a8c4fdf93edb))


### Bug Fixes

* **git-node:** ignore codecov check suite ([#838](https://github.com/nodejs/node-core-utils/issues/838)) ([d796dd5](https://github.com/nodejs/node-core-utils/commit/d796dd5eac383177624a2c4b9284770c99ec3968))
* handle dependencies empty on sec release blog ([#828](https://github.com/nodejs/node-core-utils/issues/828)) ([987aaca](https://github.com/nodejs/node-core-utils/commit/987aacaded33e94548cb22904c7fb828fd73e804))
* listr overriding parent task ([#836](https://github.com/nodejs/node-core-utils/issues/836)) ([88c31eb](https://github.com/nodejs/node-core-utils/commit/88c31eb6bbea0ec44797c7287bafad2678d5ea46))

## [5.3.1](https://github.com/nodejs/node-core-utils/compare/v5.3.0...v5.3.1) (2024-07-03)


Expand Down
2 changes: 2 additions & 0 deletions components/git/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ async function main(state, argv, cli, dir) {
if (state === PREPARE) {
const release = new ReleasePreparation(argv, cli, dir);

await release.prepareLocalBranch();

if (release.warnForWrongBranch()) return;

// If the new version was automatically calculated, confirm it.
Expand Down
17 changes: 17 additions & 0 deletions components/git/security.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ const securityOptions = {
'post-release': {
describe: 'Create the post-release announcement',
type: 'boolean'
},
cleanup: {
describe: 'cleanup the security release.',
type: 'boolean'
}
};

Expand Down Expand Up @@ -81,6 +85,9 @@ export function builder(yargs) {
).example(
'git node security --post-release',
'Create the post-release announcement on the Nodejs.org repo'
).example(
'git node security --cleanup',
'Cleanup the security release. Merge the PR and close H1 reports'
);
}

Expand Down Expand Up @@ -112,6 +119,9 @@ export function handler(argv) {
if (argv['post-release']) {
return createPostRelease(argv);
}
if (argv.cleanup) {
return cleanupSecurityRelease(argv);
}
yargsInstance.showHelp();
}

Expand Down Expand Up @@ -167,6 +177,13 @@ async function startSecurityRelease() {
return release.start();
}

async function cleanupSecurityRelease() {
const logStream = process.stdout.isTTY ? process.stdout : process.stderr;
const cli = new CLI(logStream);
const release = new PrepareSecurityRelease(cli);
return release.cleanup();
}

async function syncSecurityRelease(argv) {
const logStream = process.stdout.isTTY ? process.stdout : process.stderr;
const cli = new CLI(logStream);
Expand Down
16 changes: 15 additions & 1 deletion lib/ci/build-types/citgm_comparison_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export class CITGMComparisonBuild {
const { failures: comparisonFailures } = comparisonBuild.results;

const failures = {};
let allPlatformFailures;
for (const platform in comparisonFailures) {
// Account for no failure on this platform, or different platform.
if (!Object.prototype.hasOwnProperty.call(baseFailures, platform)) {
Expand All @@ -66,11 +67,18 @@ export class CITGMComparisonBuild {
if (newFailures.length !== 0) {
result = statusType.FAILURE;
}

if (allPlatformFailures === undefined) {
allPlatformFailures = newFailures;
} else if (allPlatformFailures.length > 0) {
allPlatformFailures = allPlatformFailures.filter(f => {
return newFailures.includes(f);
});
}
failures[platform] = newFailures;
}

this.results.failures = failures;
this.results.allPlatformFailures = allPlatformFailures;
this.result = result;

return result;
Expand Down Expand Up @@ -124,6 +132,12 @@ export class CITGMComparisonBuild {
const str = `${totalFailures} failures in ${cID} not present in ${bID}`;
cli.log(`${statusType.FAILURE}: ${str}\n\n`);
console.table(output);
if (
results.allPlatformFailures &&
results.allPlatformFailures.length) {
const failures = results.allPlatformFailures.join(', ');
console.warn(`These modules failed in all platforms: ${failures}`);
}
}

formatAsJson() {
Expand Down
7 changes: 4 additions & 3 deletions lib/pr_checker.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const GITHUB_SUCCESS_CONCLUSIONS = ['SUCCESS', 'NEUTRAL', 'SKIPPED'];
const FAST_TRACK_RE = /^Fast-track has been requested by @(.+?)\. Please 👍 to approve\.$/;
const FAST_TRACK_MIN_APPROVALS = 2;
const GIT_CONFIG_GUIDE_URL = 'https://github.com/nodejs/node/blob/99b1ada/doc/guides/contributing/pull-requests.md#step-1-fork';
const IGNORED_CHECK_SLUGS = ['dependabot', 'codecov'];

// eslint-disable-next-line no-extend-native
Array.prototype.findLastIndex ??= function findLastIndex(fn) {
Expand Down Expand Up @@ -373,9 +374,9 @@ export default class PRChecker {

// GitHub new Check API
for (const { status, conclusion, app } of checkSuites.nodes) {
if (app && app.slug === 'dependabot') {
// Ignore Dependabot check suites. They are expected to show up
// sometimes and never complete.
if (app && IGNORED_CHECK_SLUGS.includes(app.slug)) {
// Ignore Dependabot and Codecov check suites.
// They are expected to show up sometimes and never complete.
continue;
}

Expand Down
Loading

0 comments on commit 423aba8

Please sign in to comment.