Skip to content

Commit 75c30c1

Browse files
committed
chore: remove fast-tracking from code-and-learn
Signed-off-by: avivkeller <me@aviv.sh>
1 parent e10d666 commit 75c30c1

3 files changed

Lines changed: 1 addition & 74 deletions

File tree

‎lib/pr_checker.js‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,15 +194,11 @@ export default class PRChecker {
194194
const labels = pr.labels.nodes.map((l) => l.name);
195195

196196
let isFastTracked = labels.includes('fast-track');
197-
const isCodeAndLearn = labels.includes('code-and-learn');
198197
const isSemverMajor = labels.includes('semver-major');
199198
// NOTE: a semver-major PR with fast-track should have either one of
200199
// these labels removed because that doesn't make sense
201200
if (isFastTracked) {
202201
cli.info('This PR is being fast-tracked');
203-
} else if (isCodeAndLearn) {
204-
cli.info('This PR is being fast-tracked because ' +
205-
'it is from a Code and Learn event');
206202
}
207203

208204
if (approved.length === 0 || requestedChanges.length > 0) {
@@ -273,7 +269,7 @@ export default class PRChecker {
273269
};
274270

275271
if (approved.length >= 2) {
276-
if (isFastTracked || isCodeAndLearn) {
272+
if (isFastTracked) {
277273
return true;
278274
}
279275
if (timeLeftMulti < 0) {

‎test/fixtures/code_and_learn_pr.json‎

Lines changed: 0 additions & 23 deletions
This file was deleted.

‎test/unit/pr_checker.test.js‎

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -562,52 +562,6 @@ describe('PRChecker', () => {
562562
cli.assertCalledWith(expectedLogs);
563563
});
564564

565-
it('should fast track code-and-learn PRs', () => {
566-
const cli = new TestCLI();
567-
568-
const expectedLogs = {
569-
ok:
570-
[['Approvals: 4'],
571-
['- Foo User (@foo): https://github.com/nodejs/node/pull/16438#pullrequestreview-71480624'],
572-
['- Quux User (@Quux): LGTM'],
573-
['- Baz User (@Baz): https://github.com/nodejs/node/pull/16438#pullrequestreview-71488236'],
574-
['- Bar User (@bar) (TSC): lgtm']],
575-
info:
576-
[['This PR was created on Fri, 30 Nov 2018 17:50:44 GMT'],
577-
['This PR is being fast-tracked because ' +
578-
'it is from a Code and Learn event']
579-
]
580-
};
581-
582-
const pr = Object.assign({}, firstTimerPR, {
583-
createdAt: LT_48H,
584-
labels: {
585-
nodes: [
586-
{ name: 'code-and-learn' }
587-
]
588-
}
589-
});
590-
591-
const data = {
592-
pr,
593-
reviewers: allGreenReviewers,
594-
comments: commentsWithCI,
595-
reviews: approvingReviews,
596-
commits: [],
597-
collaborators,
598-
authorIsNew: () => true,
599-
getThread() {
600-
return PRData.prototype.getThread.call(this);
601-
}
602-
};
603-
const checker = new PRChecker(cli, data, {}, argv);
604-
605-
cli.clearCalls();
606-
const status = checker.checkReviewsAndWait(new Date(NOW));
607-
assert(status);
608-
cli.assertCalledWith(expectedLogs);
609-
});
610-
611565
it('should check the last fast-track request comment', () => {
612566
const cli = new TestCLI();
613567

0 commit comments

Comments
 (0)