@@ -71,3 +71,53 @@ test('handles feed entries without titles', async () => {
7171 body : 'TBD\n'
7272 } )
7373} )
74+
75+ test ( 'html to markdown conversion' , async ( ) => {
76+ const date = new Date ( ) . toISOString ( )
77+ mockHTTPSGet . __RETURN__ = `<?xml version="1.0" encoding="UTF-8"?>
78+ <feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xml:lang="en-US">
79+ <id>tag:github.com,2008:/git-for-windows/rss-to-issues/commits/main</id>
80+ <link type="text/html" rel="alternate" href="https://github.com/git-for-windows/rss-to-issues/commits/main"/>
81+ <link type="application/atom+xml" rel="self" href="https://github.com/git-for-windows/rss-to-issues/commits/main.atom"/>
82+ <title>Recent Commits to rss-to-issues:main</title>
83+ <updated>${ date } </updated>
84+ <entry>
85+ <id>tag:github.com,2008:Grit::Commit/394ee852b18c5e3bca536b585cbb95d32ce77057</id>
86+ <link type="text/html" rel="alternate" href="https://github.com/git-for-windows/rss-to-issues/commit/394ee852b18c5e3bca536b585cbb95d32ce77057"/>
87+ <title>
88+ ci(release-tags): use newer versions of Actions
89+ </title>
90+ <updated>${ date } </updated>
91+ <media:thumbnail height="30" width="30" url="https://avatars.githubusercontent.com/u/127790?s=30&v=4"/>
92+ <author>
93+ <name>dscho</name>
94+ <uri>https://github.com/dscho</uri>
95+ </author>
96+ <content type="html">
97+ <pre style='white-space:pre-wrap;width:81ex'>ci(release-tags): use newer versions of Actions
98+
99+ This avoids warnings about node.js/set-output deprecations.
100+
101+ Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;</pre>
102+ </content>
103+ </entry>
104+ </feed>
105+ `
106+ octokit . issues . listForRepo . mockReturnValueOnce ( { data : [ ] } )
107+ await run ( )
108+
109+ expect ( octokit . issues . create ) . toBeCalledWith ( {
110+ owner : 'owner' ,
111+ repo : 'repo' ,
112+ title : 'ci(release-tags): use newer versions of Actions' ,
113+ body : `\`\`\`
114+ ci(release-tags): use newer versions of Actions
115+
116+ This avoids warnings about node.js/set-output deprecations.
117+
118+ Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
119+ \`\`\`
120+
121+ https://github.com/git-for-windows/rss-to-issues/commit/394ee852b18c5e3bca536b585cbb95d32ce77057`
122+ } )
123+ } )
0 commit comments