research-software-directory / RSD-as-a-service

This repo contains the new RSD-as-a-service implementation
https://research.software
27 stars 14 forks source link

fix: remote markdown url validation and suggestions #1322

Closed dmijatovic closed 3 weeks ago

dmijatovic commented 1 month ago

Improve remote markdown detection

Closes #494

Changes proposed in this pull request:

How to test:

Example not raw markdown message with suggestion

image

PR Checklist:

jmaassen commented 1 month ago

I just noticed I missed one thing:

When I add the readme from kernel tuner:

https://github.com/KernelTuner/kernel_tuner/blob/master/README.md

It suggests use the following:

https://raw.githubusercontent.com/KernelTuner/kernel_tuner/refs/heads/master/README.md

And then successfully imports this.

However, when I then do a "view software", the description is empty, and when I return using "Edit software" the markdown is gone and the option reset to "custom markdown".

sonarcloud[bot] commented 4 weeks ago

Quality Gate Passed Quality Gate passed for 'rsd-frontend'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
30.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

dmijatovic commented 4 weeks ago

@jmaassen Well spotted! I have fixed the bug, please check again.

jmaassen commented 3 weeks ago

Works as expected now. However, I did get the following while testing:

Screenshot 2024-10-25 at 09-49-43 Edit software Research Software Directory

Unfortunately, I cannot reproduce this a second time?

I tested the bitbucket URL replacement first, followed by the helmholtz one. The markdown loaded as expected, but the error was also shown. When clicking "view software" the description reverted to the bitbucket example. Adding the helmholtz one a second time did work, and after that I could not reproduce the error.

dmijatovic commented 3 weeks ago

@jmaassen I cannot reproduce the error. Shell we merge this PR as it is?