Skip to content

Conversation

@Tsuk1ko
Copy link

@Tsuk1ko Tsuk1ko commented Dec 29, 2021

Hi, I found 2 issues when using this action.


The beginning and end of an XML node may contain newline and whitespace, e.g. https://github.com/git-for-windows/rss-to-issues/commits.atom

<title>
    Bump to v0.0.3
</title>

If don't provide an option { xml2js: { trim: true } } to rss-parser, title will be \n       Bump to v0.0.3\n    .

When creating issue, GitHub will ignore all \n, and issue title will be        Bump to v0.0.3    .

This causes the condition below to always be false and issues will be created continuously.

rss-to-issues/index.js

Lines 76 to 79 in b014aba

if (issues.find(x => x.title === title)) {
core.warning(`Issue ${title} already exists`)
continue
}


Another issue I found is turndown will not convert <pre> to Markdown code block, which guilhem/rss-issues-action will.

I tried to extending turndown's rules but broken by its aggressive escaping rules.

So finally I use html-to-md instead of turndown, this works fine for me.

If you don’t like it, please let me know and I will rollback it.

@dscho
Copy link
Member

dscho commented Nov 13, 2022

Whoa, sorry, I completely had missed this PR until today! Let me try to rebase this...

Tsuk1ko and others added 4 commits November 13, 2022 20:46
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho merged commit 2846ac4 into git-for-windows:main Nov 13, 2022
@Tsuk1ko
Copy link
Author

Tsuk1ko commented Nov 14, 2022

Thank you! It's been too long since this PR. Maybe we should bump the html-to-md version to latest (v0.8.0)?

@dscho
Copy link
Member

dscho commented Nov 20, 2022

Maybe we should bump the html-to-md version to latest (v0.8.0)?

@Tsuk1ko That would be nice.

Even nicer would it be if we could add a test that verifies that the conversion is sound.

dscho added a commit to dscho/rss-to-issues that referenced this pull request Nov 20, 2022
Suggested in git-for-windows#10 (comment).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit to dscho/rss-to-issues that referenced this pull request Nov 20, 2022
Suggested in
git-for-windows#10 (comment)

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho mentioned this pull request Nov 20, 2022
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