AFN: validate the provided forge URL more extensively
Check that it is not a URL to a GitHub repo or website, is a canonical URL with a trailing forward slash and is a base URL rather than a repository or other URL.
Fixes: #4794 (closed) Fixes: #4792 (closed)
Merge request reports
Activity
Jenkins job DWAPPS/gitlab-builds #1333 failed in 4 min 42 sec.
See Console Output, Blue Ocean and Coverage Report for more details.Thanks for adding these new validation rules for submitted forge URLs.
This did not pass our CI due to javascript code linting, I fixed those errors in a new commit.
Some frontend tests also failed due to newly introduced form validation rules, I also fixed those in a commit.
Last but not least, I updated frontend tests to cover a bit the newly introduced validation rules.
All these fixes are available in the validate-afn-urls branch from my
swh-web
fork.You should be able to merge it in your branch and update that MR for the CI to pass.
added 9 commits
-
d7c4bcbe...387d9f1f - 3 commits from branch
swh/devel:master
- 0edbae20 - AFN: validate the provided forge URL more extensively
- b52a10d4 - add_forge_now/assets/create-request: Fix eslint errors
- 1316bd55 - add_forge_now/assets/create-request: Catch URL parsing error
- ac77ddad - cypress: Update AFN creation form tests for new validation rules
- 040a447d - cypress: Update AFN creation form test checking invalid forge URL
- 075d6fc7 - Fix the GitHub domain regex to only match periods and only the hostname
Toggle commit list-
d7c4bcbe...387d9f1f - 3 commits from branch
Jenkins job DWAPPS/gitlab-builds #1338 succeeded in 8 min 23 sec.
See Console Output, Blue Ocean and Coverage Report for more details.mentioned in issue swh/infra/sysadm-environment#5504 (closed)