From fd504353c9c2467af09c27d55464c6f38d21d89d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20M=C3=BCller?= Date: Wed, 24 Mar 2021 15:02:34 +0100 Subject: [PATCH] adapt for milestone delivery repo --- action.yml | 20 +++++--------------- index.js | 18 ++++-------------- 2 files changed, 9 insertions(+), 29 deletions(-) diff --git a/action.yml b/action.yml index 179a18e..93c05c2 100644 --- a/action.yml +++ b/action.yml @@ -1,4 +1,4 @@ -name: Read grant file +name: Read milestone file author: mmagician description: 'Read file contents' inputs: @@ -6,20 +6,10 @@ inputs: description: 'File path' required: true outputs: - team_name: - description: 'Team name' - contact_name: - description: 'Contact name' - contact_email: - description: 'Contact email' - project_name: - description: 'Project name' - address: - description: 'Registered address of legal entity' - total_cost_btc: - description: 'Total cost, BTC' - total_cost_dai: - description: 'Total cost, DAI' + pr_link: + description: 'Link to application PR' + milestone_number: + description: 'Milestone number' runs: using: 'node12' main: 'dist/index.js' diff --git a/index.js b/index.js index 536a833..d6803e4 100644 --- a/index.js +++ b/index.js @@ -8,23 +8,13 @@ const main = async () => { const content = await fs.readFile(path, 'utf8') const regexList = [ - /(?<=\*\*Team Name:\*\* ).*/g, - /(?<=\*\*Project Name:\*\* ).*/g, - /(?<=\*\*Contact Name:\*\* ).*/g, - /(?<=\*\*Contact Email:\*\* ).*/g, - /(?<=\*\*Total Costs:\*\* ).*(?= BTC)/gi, - /(?<=\*\*Total Costs:\*\* ).*(?= DAI)/gi, - /(?<=\*\*Registered Address:\*\* ).*/g + /(?<=\*\*PR Link:\*\* ).*/g, + /(?<=\*\*Milestone Number:\*\* ).*/g, ] const outputs = [ - 'team_name', - 'project_name', - 'contact_name', - 'contact_email', - 'total_cost_btc', - 'total_cost_dai', - 'address' + 'pr_link', + 'milestone_number', ] regexList.map(function (reg, i) {