mirror of
https://github.com/standardebooks/web.git
synced 2025-07-13 10:02:02 -04:00
Remove query strings from GitHub URLs when creating a project
This commit is contained in:
parent
afab78af46
commit
6805a13522
1 changed files with 2 additions and 0 deletions
|
@ -237,6 +237,8 @@ final class Project{
|
|||
}
|
||||
elseif(preg_match('|^https?://(www\.)?github.com/|ius', $this->VcsUrl)){
|
||||
$this->VcsUrl = rtrim($this->VcsUrl, '/');
|
||||
// Remove query strings.
|
||||
$this->VcsUrl = preg_replace('/\?[^\?]+$/iu', '', $this->VcsUrl);
|
||||
if(!preg_match('|^https://github.com/[^/]+/[^/]+$|ius', $this->VcsUrl)){
|
||||
$error->Add(new Exceptions\InvalidVcsUrlException($this->VcsUrl));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue