Skip to content

Commit 5983eb1

Browse files
committed
гит###
1 parent 0e1b112 commit 5983eb1

2 files changed

Lines changed: 17 additions & 16 deletions

File tree

tools/pull_request_hooks/autoLabel.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/** biome-ignore-all lint/suspicious/useIterableCallbackReturn: не знаю что тут писать даже */
12
import * as autoLabelConfig from './autoLabelConfig.js';
23

34
/**
Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
import { strict as assert } from "node:assert";
2-
import { get_updated_label_set } from "./autoLabel.js";
1+
import { strict as assert } from 'node:assert';
2+
import { get_updated_label_set } from './autoLabel.js';
33

44
const empty_pr = {
5-
action: "opened",
5+
action: 'opened',
66
pull_request: {
7-
body: "This PR will have no labels",
8-
title: "Pr with no labels",
7+
body: 'This PR will have no labels',
8+
title: 'Pr with no labels',
99
mergeable: true,
1010
},
1111
};
1212
const empty_label_set = await get_updated_label_set({
1313
github: null,
1414
context: { payload: empty_pr },
1515
});
16-
assert.equal(empty_label_set.length, 0, "No labels should be added");
16+
assert.equal(empty_label_set.length, 0, 'No labels should be added');
1717

1818
const cl = `
1919
My Awesome PR
@@ -24,10 +24,10 @@ refactor: refactored some code
2424
:/cl:
2525
`;
2626
const cl_pr = {
27-
action: "opened",
27+
action: 'opened',
2828
pull_request: {
2929
body: cl,
30-
title: "Awesome PR",
30+
title: 'Awesome PR',
3131
mergeable: false,
3232
},
3333
};
@@ -36,24 +36,24 @@ const cl_label_set = await get_updated_label_set({
3636
context: { payload: cl_pr },
3737
});
3838
assert.ok(
39-
cl_label_set.includes("Конфликты"),
40-
"Merge Conflict label should be added"
39+
cl_label_set.includes('Merge Conflict'),
40+
'Merge Conflict label should be added',
4141
);
42-
assert.ok(cl_label_set.includes("Фишка"), "Feature label should be added");
42+
assert.ok(cl_label_set.includes('Feature'), 'Feature label should be added');
4343
assert.ok(
44-
!cl_label_set.includes("Рефактор"),
45-
"Refactor label should not be added"
44+
!cl_label_set.includes('Refactor'),
45+
'Refactor label should not be added',
4646
);
4747

4848
const title_pr = {
49-
action: "opened",
49+
action: 'opened',
5050
pull_request: {
51-
title: "Logging is important",
51+
title: 'Logging is important',
5252
mergeable: true,
5353
},
5454
};
5555
const title_label_set = await get_updated_label_set({
5656
github: null,
5757
context: { payload: title_pr },
5858
});
59-
assert.ok(title_label_set.includes("Logging"), "Logging label should be added");
59+
assert.ok(title_label_set.includes('Logging'), 'Logging label should be added');

0 commit comments

Comments
 (0)