Skip to content

Commit fd50435

Browse files
committed
adapt for milestone delivery repo
1 parent 67abbd1 commit fd50435

File tree

2 files changed

+9
-29
lines changed

2 files changed

+9
-29
lines changed

action.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,15 @@
1-
name: Read grant file
1+
name: Read milestone file
22
author: mmagician
33
description: 'Read file contents'
44
inputs:
55
path:
66
description: 'File path'
77
required: true
88
outputs:
9-
team_name:
10-
description: 'Team name'
11-
contact_name:
12-
description: 'Contact name'
13-
contact_email:
14-
description: 'Contact email'
15-
project_name:
16-
description: 'Project name'
17-
address:
18-
description: 'Registered address of legal entity'
19-
total_cost_btc:
20-
description: 'Total cost, BTC'
21-
total_cost_dai:
22-
description: 'Total cost, DAI'
9+
pr_link:
10+
description: 'Link to application PR'
11+
milestone_number:
12+
description: 'Milestone number'
2313
runs:
2414
using: 'node12'
2515
main: 'dist/index.js'

index.js

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,13 @@ const main = async () => {
88
const content = await fs.readFile(path, 'utf8')
99

1010
const regexList = [
11-
/(?<=\*\*Team Name:\*\* ).*/g,
12-
/(?<=\*\*Project Name:\*\* ).*/g,
13-
/(?<=\*\*Contact Name:\*\* ).*/g,
14-
/(?<=\*\*Contact Email:\*\* ).*/g,
15-
/(?<=\*\*Total Costs:\*\* ).*(?= BTC)/gi,
16-
/(?<=\*\*Total Costs:\*\* ).*(?= DAI)/gi,
17-
/(?<=\*\*Registered Address:\*\* ).*/g
11+
/(?<=\*\*PR Link:\*\* ).*/g,
12+
/(?<=\*\*Milestone Number:\*\* ).*/g,
1813
]
1914

2015
const outputs = [
21-
'team_name',
22-
'project_name',
23-
'contact_name',
24-
'contact_email',
25-
'total_cost_btc',
26-
'total_cost_dai',
27-
'address'
16+
'pr_link',
17+
'milestone_number',
2818
]
2919

3020
regexList.map(function (reg, i) {

0 commit comments

Comments
 (0)