diff --git a/api/outdated/outdated/migrations/0001_initial.py b/api/outdated/outdated/migrations/0001_initial.py
index a9ab3c13..80c4715c 100644
--- a/api/outdated/outdated/migrations/0001_initial.py
+++ b/api/outdated/outdated/migrations/0001_initial.py
@@ -1,4 +1,4 @@
-# Generated by Django 4.1.9 on 2023-09-18 08:51
+# Generated by Django 4.2.6 on 2023-10-24 14:19
from django.db import migrations, models
import django.db.models.deletion
@@ -120,10 +120,7 @@ class Migration(migrations.Migration):
),
),
("name", models.CharField(db_index=True, max_length=100)),
- (
- "repo",
- outdated.models.RepositoryURLField(max_length=100, unique=True),
- ),
+ ("repo", outdated.models.RepositoryURLField(max_length=100)),
(
"versioned_dependencies",
models.ManyToManyField(blank=True, to="outdated.version"),
diff --git a/api/outdated/outdated/models.py b/api/outdated/outdated/models.py
index ed461e83..c9310251 100644
--- a/api/outdated/outdated/models.py
+++ b/api/outdated/outdated/models.py
@@ -96,7 +96,7 @@ class Project(UUIDModel):
name = models.CharField(max_length=100, db_index=True)
versioned_dependencies = models.ManyToManyField(Version, blank=True)
- repo = RepositoryURLField(max_length=100, unique=True)
+ repo = RepositoryURLField(max_length=100)
class Meta:
ordering = ["name", "id"]
diff --git a/api/outdated/outdated/tests/test_syncproject.py b/api/outdated/outdated/tests/test_syncproject.py
index efc06fef..b1ec7a72 100644
--- a/api/outdated/outdated/tests/test_syncproject.py
+++ b/api/outdated/outdated/tests/test_syncproject.py
@@ -7,7 +7,7 @@
def test_syncproject(project_factory):
call_command("syncproject", "foo")
- project = project_factory.create(repo="https://github.com/projectcaluma/caluma")
+ project = project_factory.create(repo="github.com/projectcaluma/caluma")
call_command("syncproject", project.name)
assert project.versioned_dependencies.count() > 0
@@ -17,7 +17,7 @@ def test_syncproject(project_factory):
@pytest.mark.django_db(transaction=True)
def test_syncprojects(project_factory):
projects = [
- project_factory(repo=f"https://github.com/adfinis/{project}")
+ project_factory(repo=f"github.com/adfinis/{project}")
for project in ["outdated", "mysagw"]
]
diff --git a/ember/app/components/project-detailed/template.hbs b/ember/app/components/project-detailed/template.hbs
index 42354d00..6c6e9d54 100644
--- a/ember/app/components/project-detailed/template.hbs
+++ b/ember/app/components/project-detailed/template.hbs
@@ -6,7 +6,7 @@
{{@project.name}}
-
+
diff --git a/ember/app/models/project.js b/ember/app/models/project.js
index 170b30c3..3a5ce0a0 100644
--- a/ember/app/models/project.js
+++ b/ember/app/models/project.js
@@ -10,4 +10,8 @@ export default class ProjectModel extends Model {
@tracked users;
@tracked primaryMaintainer;
+
+ get repoURL() {
+ return `https://${this.repo}`;
+ }
}
diff --git a/ember/mirage/factories/project.js b/ember/mirage/factories/project.js
index 8917d842..0d5e4fe6 100644
--- a/ember/mirage/factories/project.js
+++ b/ember/mirage/factories/project.js
@@ -6,7 +6,7 @@ export default Factory.extend({
status: () => 'UNDEFINED',
repo() {
- return `https://github.com/${faker.internet.domainWord()}/${faker.helpers.slugify(
+ return `github.com/${faker.internet.domainWord()}/${faker.helpers.slugify(
this.name,
)}`;
},
diff --git a/ember/tests/acceptance/projects-test.js b/ember/tests/acceptance/projects-test.js
index 9dec063e..beca2440 100644
--- a/ember/tests/acceptance/projects-test.js
+++ b/ember/tests/acceptance/projects-test.js
@@ -21,7 +21,9 @@ module('Acceptance | projects', function (hooks) {
assert.strictEqual(currentURL(), `/projects/${project.id}`);
- assert.dom('[data-test-repo-link]').hasProperty('href', project.repo);
+ assert
+ .dom('[data-test-repo-link]')
+ .hasProperty('href', `https://${project.repo}`);
assert
.dom('tbody>tr')
diff --git a/ember/tests/integration/components/project-detailed-test.js b/ember/tests/integration/components/project-detailed-test.js
index e472eba7..4a7f38f2 100644
--- a/ember/tests/integration/components/project-detailed-test.js
+++ b/ember/tests/integration/components/project-detailed-test.js
@@ -20,7 +20,9 @@ module('Integration | Component | project-detailed', function (hooks) {
await render(hbs``);
assert.dom('[data-test-project-name]').hasText(this.project.name);
- assert.dom('[data-test-repo-link]').hasProperty('href', this.project.repo);
+ assert
+ .dom('[data-test-repo-link]')
+ .hasProperty('href', this.project.repoURL);
assert
.dom('tbody>tr')