Skip to content

Commit 22f1f71

Browse files
committed
feat(git-node): add backport reviewers to metadata
1 parent f70b2f5 commit 22f1f71

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

lib/metadata_gen.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,11 @@ export default class MetadataGenerator {
4848
meta.unshift(`Backport-PR-URL: ${prUrl}`);
4949
meta.unshift(`PR-URL: ${altPrUrl}`);
5050
} else {
51-
// Reviews are only added here as backports should not contain reviews
52-
// for the backport itself in the metadata
5351
meta.unshift(`PR-URL: ${prUrl}`);
54-
meta.push(
55-
...reviewedBy.map((r) => `Reviewed-By: ${r.reviewer.getContact()}`)
56-
);
5752
}
53+
meta.push(
54+
...reviewedBy.map((r) => `Reviewed-By: ${r.reviewer.getContact()}`)
55+
);
5856
meta.push(''); // creates final EOL
5957
return meta.join('\n');
6058
}

test/unit/metadata_gen.test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ const backportExpected = `PR-URL: https://github.com/nodejs/node/pull/29995
4545
Backport-PR-URL: https://github.com/nodejs/node/pull/30072
4646
Fixes: https://github.com/nodejs/build/issues/1961
4747
Refs: https://github.com/nodejs/node/commit/53ca0b9ae145c430842bf78e553e3b6cbd2823aa#commitcomment-35494896
48+
Reviewed-By: Foo User <[email protected]>
49+
Reviewed-By: Quux User <[email protected]>
50+
Reviewed-By: Baz User <[email protected]>
51+
Reviewed-By: Bar User <[email protected]>
4852
`;
4953

5054
const selfRefData = Object.assign({}, data, { pr: selfRefPR });

0 commit comments

Comments
 (0)