Page MenuHomeSoftware Heritage

assets/save: Simplify origin URLs validation code
ClosedPublic

Authored by anlambert on Oct 26 2021, 11:41 AM.

Details

Summary

At the time there were some specific processings for github,
sourceforge, bitbucket and gitlab repo URLs validation but
not anymore so some code can be simplified now.

Depends on D6551

Diff Detail

Repository
rDWAPPS Web applications
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 24694
Build 38541: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 38540: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D6552 (id=23811)

Could not rebase; Attempt merge onto eb1d40198a...

Updating eb1d4019..47ee79c2
Fast-forward
 assets/src/bundles/save/index.js        | 21 +--------------------
 cypress/integration/origin-save.spec.js | 16 ++++++++++++++++
 2 files changed, 17 insertions(+), 20 deletions(-)
Changes applied before test
commit 47ee79c2ae80d727d31f5d62553d7085efde1172
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Oct 26 11:38:59 2021 +0200

    assets/save: Simplify origin URLs validation code
    
    At the time there were some specific processings for github,
    sourceforge, bitbucket and gitlab repo URLs validation but
    not anymore so some code can be simplified now.

commit 2f5d8cc1fbd3cb05825e37811c1951b5b6c24c77
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Oct 26 11:28:28 2021 +0200

    assets/save: Fix sourceforge git repository URL validation
    
    The assumption that URL paths to git repos for the git.code.sf.net
    netloc are necessarily prefixed by /p/ is wrong.
    
    Related to T3690

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1212/ for more details.

This revision is now accepted and ready to land.Oct 26 2021, 12:17 PM