Skip to content

Commit f156c0d

Browse files
committed
Switch to correct regex
1 parent 892fbac commit f156c0d

4 files changed

Lines changed: 19 additions & 14 deletions

File tree

.github/workflows/process-issue.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
steps:
2222
- name: Get GitHub App Token
2323
id: token
24-
uses: actions/create-github-app-token@v1
24+
uses: actions/create-github-app-token@main
2525
with:
2626
app-id: ${{ secrets.ISSUEOPS_APP_ID }}
2727
private-key: ${{ secrets.ISSUEOPS_APP_PEM_FILE }}

dist/index.js

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/github/issues.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,18 @@ export function parse(
2525
const noResponse: string = '_No response_'
2626

2727
const regexes: { [k: string]: RegExp } = {
28-
customerName: /Customer Name:\*\* (?<customerName>[^\r\n]+)/,
29-
customerAbbr: /Customer Abbreviation:\*\* (?<customerAbbr>[^\r\n]+)/,
30-
startDate: /Start Date:\*\* (?<startDate>[^\r\n]+)/,
31-
endDate: /End Date:\*\* (?<endDate>[^\r\n]+)/,
32-
administrators: /Administrators:\*\* (?<administrators>[^\r\n]+)/,
33-
attendees: /Attendeesp:\*\* (?<attendees>[^\r\n]+)/
28+
customerName: /### Customer Name[\r\n]+(?<customerName>[\s\S]*?)(?=###|$)/,
29+
customerAbbr:
30+
/### Customer Abbreviation[\r\n]+(?<customerAbbr>[\s\S]*?)(?=###|$)/,
31+
startDate: /### Start Date[\r\n]+(?<startDate>[\s\S]*?)(?=###|$)/,
32+
endDate: /### End Date[\r\n]+(?<endDate>[\s\S]*?)(?=###|$)/,
33+
administrators:
34+
/### Administrators[\r\n]+(?<administrators>[\s\S]*?)(?=###|$)/,
35+
attendees: /### Attendees[\r\n]+(?<attendees>[\s\S]*?)(?=###|$)/
3436
}
3537

38+
//### *(?<key>.*?)\s*[\r\n]+(?<value>[\s\S]*?)(?=###|$)
39+
3640
// Get the PR body and check that it isn't empty
3741
const body = issue.body
3842
if (body === null) throw new Error('Issue Body is Empty')

0 commit comments

Comments
 (0)