Skip to content

Commit e0cc49a

Browse files
committed
Merge branch 'dev'
2 parents 821af0f + 8cd861c commit e0cc49a

8 files changed

Lines changed: 5900 additions & 4704 deletions

File tree

.github/workflows/develop.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@ jobs:
88
build:
99
timeout-minutes: 20
1010
name: Check
11-
runs-on: ubuntu-18.04
11+
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v1
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-node@v2
15+
with:
16+
node-version: '20.x'
1417

1518
- name: install dependencies
1619
run: npm install

.github/workflows/prtitle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
main:
11-
runs-on: ubuntu-18.04
11+
runs-on: ubuntu-latest
1212
steps:
1313
- uses: amannn/action-semantic-pull-request@v1.1.1
1414
env:

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- uses: actions/checkout@v2
1212
- uses: actions/setup-node@v2
1313
with:
14-
node-version: '14.x'
14+
node-version: '20.x'
1515
registry-url: 'https://registry.npmjs.org'
1616
- run: npm install
1717
- run: npm run test

index.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const langParser = (pattern, string) => {
22
const matchyear = /yearly/.test(string);
33
const matchweek = /weekly/.test(string);
4+
const matchmonth = /monthly/.test(string);
45
const matchquarter = /quarterly/.test(string);
56
if (matchyear) {
67
return pattern.map((e, idx) => {
@@ -29,6 +30,19 @@ const langParser = (pattern, string) => {
2930
});
3031
}
3132

33+
if (matchmonth) {
34+
pattern[4] = '*/1';
35+
pattern[3] = pattern[5] !== '*' ? '*' : '1';
36+
let changed = false;
37+
return pattern.map((e, idx) => {
38+
if (idx < 3 && e === '*' && !changed) {
39+
return 0;
40+
}
41+
changed = true;
42+
return e;
43+
});
44+
}
45+
3246
if (matchquarter) {
3347
pattern[4] = '*/3';
3448
let changed = false;

0 commit comments

Comments
 (0)