fix: remove access token/auth from git url

This commit is contained in:
iCrawl 2021-04-19 21:25:31 +02:00
parent c9d294892a
commit 7959048fbe
No known key found for this signature in database
GPG key ID: 1AB888B16355FBB2

View file

@ -81,7 +81,7 @@ export async function activity(previous: ActivityPayload = {}) {
if (repo.startsWith('git@')) {
repo = repo.replace(':', '/').replace('git@', 'https://').replace('.git', '');
} else {
repo = repo.replace('.git', '');
repo = repo.replace(/(https:\/\/)([^@]*)@(.*?$)/, '$1$3').replace('.git', '');
}
state = {