Skip to content

Commit c4db5eb

Browse files
author
Marcin Górny
committed
added extra fields
1 parent fc10f7a commit c4db5eb

File tree

2 files changed

+32
-10
lines changed

2 files changed

+32
-10
lines changed

dist/index.js

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,27 @@ const { promises: fs } = __webpack_require__(747);
1414
const main = async () => {
1515
const path = core.getInput('path');
1616
const content = await fs.readFile(path, 'utf8');
17-
17+
18+
const regex_team_name = /(?<=\*\*Team Name:\*\* ).*/g;
1819
const regex_project = /(?<=\*\*Project:\*\* ).*/g;
19-
const regex_proposer = /(?<=\*\*Proposer:\*\* ).*/g;
20+
const regex_contact_name = /(?<=\*\*Contact Name:\*\* ).*/g;
21+
const regex_contact_email = /(?<=\*\*Contact Email:\*\* ).*/g;
2022
const regex_total_cost = /(?<=\*\*Total Costs:\*\* ).*(?= BTC)/g;
23+
const regex_registered_address = /(?<=\*\*Registered Address:\*\* ).*/g;
2124

25+
const team_name = content.match(regex_team_name)[0];
2226
const project_name = content.match(regex_project)[0];
23-
const proposer = content.match(regex_proposer)[0];
27+
const contact_name = content.match(regex_contact_name)[0];
28+
const contact_email = content.match(regex_contact_email)[0];
29+
const address = content.match(regex_registered_address)[0];
2430
const total_cost = content.match(regex_total_cost)[0];
25-
core.setOutput('project_name', project_name);
26-
core.setOutput('proposer', proposer)
31+
32+
33+
core.setOutput('team_name', team_name);
34+
core.setOutput('project_name', project_name)
35+
core.setOutput('contact_name', contact_name)
36+
core.setOutput('contact_email', contact_email)
37+
core.setOutput('address', address)
2738
core.setOutput('total_cost', total_cost)
2839
}
2940

index.js

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,27 @@ const { promises: fs } = require('fs');
66
const main = async () => {
77
const path = core.getInput('path');
88
const content = await fs.readFile(path, 'utf8');
9-
9+
10+
const regex_team_name = /(?<=\*\*Team Name:\*\* ).*/g;
1011
const regex_project = /(?<=\*\*Project:\*\* ).*/g;
11-
const regex_proposer = /(?<=\*\*Proposer:\*\* ).*/g;
12+
const regex_contact_name = /(?<=\*\*Contact Name:\*\* ).*/g;
13+
const regex_contact_email = /(?<=\*\*Contact Email:\*\* ).*/g;
1214
const regex_total_cost = /(?<=\*\*Total Costs:\*\* ).*(?= BTC)/g;
15+
const regex_registered_address = /(?<=\*\*Registered Address:\*\* ).*/g;
1316

17+
const team_name = content.match(regex_team_name)[0];
1418
const project_name = content.match(regex_project)[0];
15-
const proposer = content.match(regex_proposer)[0];
19+
const contact_name = content.match(regex_contact_name)[0];
20+
const contact_email = content.match(regex_contact_email)[0];
21+
const address = content.match(regex_registered_address)[0];
1622
const total_cost = content.match(regex_total_cost)[0];
17-
core.setOutput('project_name', project_name);
18-
core.setOutput('proposer', proposer)
23+
24+
25+
core.setOutput('team_name', team_name);
26+
core.setOutput('project_name', project_name)
27+
core.setOutput('contact_name', contact_name)
28+
core.setOutput('contact_email', contact_email)
29+
core.setOutput('address', address)
1930
core.setOutput('total_cost', total_cost)
2031
}
2132

0 commit comments

Comments
 (0)