-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathconventionalCommit.ts
More file actions
44 lines (40 loc) · 865 Bytes
/
conventionalCommit.ts
File metadata and controls
44 lines (40 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
* Conventional commit module.
*
* Categorize changes of a path using the Conventional Commit standard like `fix`.
*
* Here all as functions. But rewriting all as classes might be lower lift and okay.
* Maybe first pass it just rewriting class.method calls in tests (as a new test file) as function
calls with data.
*/
import { CONVENTIONAL_TYPE } from "../lib/constants";
const CI_CRITERIA = {
dirs: {
// includes: [],
// startsWith: [],
equals: [
".circleci",
".github/workflows",
],
},
// extensions: {
// equals: [],
// },
names: {
includes: [
"netlify.toml",
"travis.yml",
"tox.ini",
],
// startsWith: [],
// equals: [],
},
};
function related(criteria) {
return true;
}
function main() {
if (related(CI_CRITERIA) === true) {
return CONVENTIONAL_TYPE.CI;
}
}