这是indexloc提供的服务,不要输入任何密码
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: stefanbuck/github-issue-parser
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: Ansuel/github-issue-parser
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 4 commits
  • 14 files changed
  • 1 contributor

Commits on Jan 31, 2025

  1. feat: improve body parsing logic

    Current body parsing logic with trim() + split("###") is too fragile and
    pose problems with some body that contains case with ### in the middle
    of the line or case with codeblock ``` section.
    
    These case will cause the script to parse these as separate section and
    produce wrong outputs and in some case even prints error assuming things
    are checkbox and errors out on the concat function.
    
    To make the parsing logic more solid, implement a dedicated function and
    parse with this logic:
    - We split the body for "\n"
    - We ignore codeblock ``` section
    - We check "###" only at the start of the line
    - We check for "### " (with the space included) as that is the correct
      section Github issue template expects.
    
    With the following change case like:
    ```
    root@OpenWrt:~# cat /boot/config.txt
    ```
    
    Are correctly parsed as all part of a single section instead of being
    wrongly treated as different empty sections.
    
    Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
    Ansuel committed Jan 31, 2025
    Configuration menu
    Copy the full SHA
    0570184 View commit details
    Browse the repository at this point in the history
  2. feat: add additional test for section with ####

    Add additional test for section with #### to prevent and catch in
    future code change that would produce wrong parsing.
    
    Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
    Ansuel committed Jan 31, 2025
    Configuration menu
    Copy the full SHA
    b6c8f2c View commit details
    Browse the repository at this point in the history
  3. feat: add additional test for codeblock ``` ignore

    Add test for codeblock ``` ignore to prevent and catch in future code
    change that would produce wrong parsing.
    
    Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
    Ansuel committed Jan 31, 2025
    Configuration menu
    Copy the full SHA
    1816705 View commit details
    Browse the repository at this point in the history
  4. feat: add additional test for codeblock ```sh ignore

    Add test for codeblock ```sh ignore to prevent and catch in future code
    change that would produce wrong parsing.
    
    This is a variant of the ``` test that makes the code block section
    target specific code.
    
    Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
    Ansuel committed Jan 31, 2025
    Configuration menu
    Copy the full SHA
    06dd03d View commit details
    Browse the repository at this point in the history
Loading