Skip to content

Follow-ups for IssueUrlRegexUtil

The following discussion from !1327 (merged) should be addressed:

  • @leetickett-gitlab started a discussion:

    Thanks for working on this @official.harshith1 @dmeister93

    I have a few questions you can maybe help me with in a follow-up 🙏

    app/javascript/common/IssueUrlRegexUtil.js is quite different from our other helpers/libraries (like app/javascript/common/DateUtils.js):

    • it's a class
    • we export the class rather than the methods/functions

    I would love to better understand if there's a benefit of this approach (in which case, we might consider making the other libs into classes), or if it might be better to make IssueUrlRegexUtil more like the others?

    I would also love to see a test suite for the lib (we can them move all of the 'URL validation regex' tests out of app/javascript/pages/manage-issue-page/CloseDuplicateModal.spec.js and just have a single valid and invalid test in there instead

    Wdyt?