Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support handling for more variability in markdown title lines #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

paulczajka
Copy link
Contributor

@paulczajka paulczajka commented Oct 7, 2022

Allow the Issue Formatter to process a wider array of markdown issue title formats. Then normalize them into a single Final Report format.

Example Markdown Issue title formats we've used:

  ### [H-1] Not good thing
  ## (H-2) Also not good
  **[G-1]** Gassy code

After normalizing for the Final Report:

  ## (H-1) Not good thing
  ## (H-2) Also not good
  ## (G-1) Gassy code

@paulczajka paulczajka requested a review from gilbert October 7, 2022 22:03
@render
Copy link

render bot commented Oct 7, 2022

@@ -108,39 +120,46 @@ const IMPACT_LABEL_RE = /(?:\*\*)?Impact(?:\*\*)?:(?:\*\*)? ([^\n]+)?/
const CHANCE_LABEL_RE = /(?:\*\*)?Likelihood(?:\*\*)?:(?:\*\*)? ([^\n]+)?/

exports.parseNotionMarkdownIssues = function parseNotionMarkdownIssues(markdown) {
return markdown.split(/(?=##\s+\([CHMLQGI]-\d\))/)
return markdown.split(new RegExp(`(?=${TITLE_LINE_RE})`))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't able to get the Issue Formatter to work with pasting in multiple issues at once: either before or after these changes. Not sure if this was working yet? I've just been pasting them in one-at-a-time for now.

@paulczajka paulczajka requested a review from chaboo October 7, 2022 22:08
@gilbert
Copy link
Member

gilbert commented Oct 10, 2022

Nice! There's now a test file for parsing markdown content 😎 Can you add a few tests for the new formats, as well as the old one for backwards compat?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants