Giter VIP home page Giter VIP logo

Comments (14)

mtfoley avatar mtfoley commented on June 6, 2024 1

my gut tells me that this would be a sufficient check:

const isRelativeUrl = !(url.substr(0,7) === 'http://' || url.substr(0,8) === 'https://');

The upsides to this would be:

  • we don't try to get too clever with regex
  • we don't try to anticipate all of the TLDs

Test suite would need adjustment too.
https://github.com/open-sauced/open-sauced/blob/4a26b94eaa1a1094ee0dd0d7ca76ead50da2acc4/src/tests/util.test.js

from open-sauced.

arth2002 avatar arth2002 commented on June 6, 2024 1

I want to work on this issue, please assign me

from open-sauced.

arth2002 avatar arth2002 commented on June 6, 2024 1

I made a PR
Please check it out

from open-sauced.

mtfoley avatar mtfoley commented on June 6, 2024

I haven't reproduced yet, but here is the code path I suspect is responsible:

Repo Form checking validity:

const [isValid, repoUrl] = isValidRepoUrl(urlRef.current.value.replace(/\s+/g, ""));

Validity Checker catching .com and assuming this is an absolute URL:

const isRelativeUrl = !(url.substr(0, 4) === "http" || url.includes(".com") || url.includes("www."));

From there, I haven't validated, but I believe the intention would be for us to consider this a "relative URL".

from open-sauced.

0-vortex avatar 0-vortex commented on June 6, 2024

I haven't reproduced yet, but here is the code path I suspect is responsible:

Repo Form checking validity:

const [isValid, repoUrl] = isValidRepoUrl(urlRef.current.value.replace(/\s+/g, ""));

Validity Checker catching .com and assuming this is an absolute URL:

const isRelativeUrl = !(url.substr(0, 4) === "http" || url.includes(".com") || url.includes("www."));

From there, I haven't validated, but I believe the intention would be for us to consider this a "relative URL".

Screenshot 2022-06-10 at 16 48 10

Needs a fix for sure :D

from open-sauced.

mtfoley avatar mtfoley commented on June 6, 2024

Marking this as a good first issue - I think there's enough context to work with.

from open-sauced.

0-vortex avatar 0-vortex commented on June 6, 2024

the RFC itself is terrible, the function could use more regex to properly check for owner/repo and not complicate so much with URL handling - there are node classes now handling that including https://developer.mozilla.org/en-US/docs/Web/API/URL

from open-sauced.

mtfoley avatar mtfoley commented on June 6, 2024

For what it's worth, this repo is flagged as invalid, for similar reasons:
https://github.com/httpie/httpie

from open-sauced.

bdougie avatar bdougie commented on June 6, 2024

Please review the CONTIBUTING.md for info on how to assign yourself to the issue.

from open-sauced.

arth2002 avatar arth2002 commented on June 6, 2024

.take

from open-sauced.

github-actions avatar github-actions commented on June 6, 2024

Thanks for taking this on! If you have not already, join the conversation in our Discord

from open-sauced.

arth2002 avatar arth2002 commented on June 6, 2024

@mtfoley my test cases are not getting cleared. I am not getting what changes I need to do in https://github.com/open-sauced/open-sauced/blob/4a26b94eaa1a1094ee0dd0d7ca76ead50da2acc4/src/tests/util.test.js
although brob/plug11ty.com is valid to add but test cases are getting failed.
so can you please me through this process?
I am a newbie in this open-source contributions

from open-sauced.

0-vortex avatar 0-vortex commented on June 6, 2024

@mtfoley my test cases are not getting cleared. I am not getting what changes I need to do in https://github.com/open-sauced/open-sauced/blob/4a26b94eaa1a1094ee0dd0d7ca76ead50da2acc4/src/tests/util.test.js
although brob/plug11ty.com is valid to add but test cases are getting failed.
so can you please me through this process?
I am a newbie in this open-source contributions

Hey, I don't see you having forked the open-sauced repo, once you do, you can apply the fixes discussed above. There is nothing you need to do to the unit test, it's the code that this issue requires fixing.

If that is not the case IE you are not looking to contribute, let us know and we will assign to someone else :D

from open-sauced.

github-actions avatar github-actions commented on June 6, 2024

🎉 This issue has been resolved in version 0.52.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

from open-sauced.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.