diff --git a/media/commitfest/css/commitfest.css b/media/commitfest/css/commitfest.css index 9189b9a3..d4ab8e2c 100644 --- a/media/commitfest/css/commitfest.css +++ b/media/commitfest/css/commitfest.css @@ -73,3 +73,13 @@ div.form-group div.controls input.threadpick-input { .github-logo { height: 20px; } + +.additions { + font-weight: bold; + color: green; +} + +.deletions { + font-weight: bold; + color: red; +} diff --git a/pgcommitfest/commitfest/fixtures/commitfest_data.json b/pgcommitfest/commitfest/fixtures/commitfest_data.json index 2af5f706..7bd54001 100644 --- a/pgcommitfest/commitfest/fixtures/commitfest_data.json +++ b/pgcommitfest/commitfest/fixtures/commitfest_data.json @@ -132,6 +132,27 @@ ] } }, +{ + "model": "commitfest.patch", + "pk": 4, + "fields": { + "name": "create subscription with (origin = none, copy_data = none)", + "topic": 3, + "wikilink": "", + "gitlink": "", + "targetversion": null, + "committer": null, + "created": "2025-01-31T13:30:19.744", + "modified": "2025-01-31T13:30:21.305", + "lastmail": "2025-01-20T12:44:40", + "authors": [], + "reviewers": [], + "subscribers": [], + "mailthread_set": [ + 4 + ] + } +}, { "model": "commitfest.patchoncommitfest", "pk": 1, @@ -176,6 +197,17 @@ "status": 1 } }, +{ + "model": "commitfest.patchoncommitfest", + "pk": 5, + "fields": { + "patch": 4, + "commitfest": 2, + "enterdate": "2025-01-31T13:30:19.745", + "leavedate": null, + "status": 1 + } +}, { "model": "commitfest.patchhistory", "pk": 1, @@ -264,6 +296,28 @@ "what": "Attached mail thread example@message-3" } }, +{ + "model": "commitfest.patchhistory", + "pk": 9, + "fields": { + "patch": 4, + "date": "2025-01-31T13:30:19.745", + "by": 1, + "by_cfbot": false, + "what": "Created patch record" + } +}, +{ + "model": "commitfest.patchhistory", + "pk": 10, + "fields": { + "patch": 4, + "date": "2025-01-31T13:30:19.748", + "by": 1, + "by_cfbot": false, + "what": "Attached mail thread example@message-4" + } +}, { "model": "commitfest.mailthread", "pk": 1, @@ -306,6 +360,20 @@ "latestmsgid": "example@message-3" } }, +{ + "model": "commitfest.mailthread", + "pk": 4, + "fields": { + "messageid": "example@message-4", + "subject": "Re: create subscription with (origin = none, copy_data = on)", + "firstmessage": "2025-01-20T12:44:40", + "firstauthor": "test@test.com", + "latestmessage": "2025-01-20T12:44:40", + "latestauthor": "test@test.com", + "latestsubject": "Re: create subscription with (origin = none, copy_data = on)", + "latestmsgid": "example@message-4" + } +}, { "model": "commitfest.patchstatus", "pk": 1, @@ -381,7 +449,13 @@ "status": "finished", "needs_rebase_since": null, "created": "2025-01-26T22:06:02.980", - "modified": "2025-01-26T22:06:02.980" + "modified": "2025-01-29T22:50:37.805", + "version": "", + "patch_count": 5, + "first_additions": 10, + "first_deletions": 5, + "all_additions": 834, + "all_deletions": 128 } }, { @@ -395,7 +469,13 @@ "status": "failed", "needs_rebase_since": null, "created": "2025-01-26T22:11:09.961", - "modified": "2025-01-26T22:20:39.372" + "modified": "2025-01-26T22:20:39.372", + "version": null, + "patch_count": null, + "first_additions": null, + "first_deletions": null, + "all_additions": null, + "all_deletions": null } }, { @@ -409,7 +489,33 @@ "status": "failed", "needs_rebase_since": null, "created": "2025-01-26T22:22:46.602", - "modified": "2025-01-26T22:26:41.587" + "modified": "2025-01-29T22:58:51.032", + "version": "", + "patch_count": 3, + "first_additions": 345, + "first_deletions": 158, + "all_additions": 8764, + "all_deletions": 345 + } +}, +{ + "model": "commitfest.cfbotbranch", + "pk": 4, + "fields": { + "branch_id": 76, + "branch_name": "cf/4", + "commit_id": "abcggg", + "apply_url": "http://cfbot.cputube.org/patch_4748.log", + "status": "testing", + "needs_rebase_since": null, + "created": "2025-01-31T13:32:22.017", + "modified": "2025-01-31T13:32:22.017", + "version": "", + "patch_count": 1, + "first_additions": 123, + "first_deletions": 14, + "all_additions": 123, + "all_deletions": 14 } }, { diff --git a/pgcommitfest/commitfest/migrations/0009_extra_branch_fields.py b/pgcommitfest/commitfest/migrations/0009_extra_branch_fields.py new file mode 100644 index 00000000..3477b52e --- /dev/null +++ b/pgcommitfest/commitfest/migrations/0009_extra_branch_fields.py @@ -0,0 +1,43 @@ +# Generated by Django 4.2.17 on 2025-01-31 11:47 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("commitfest", "0008_move_mail_thread_many_to_many"), + ] + + operations = [ + migrations.AddField( + model_name='cfbotbranch', + name='all_additions', + field=models.IntegerField(blank=True, null=True), + ), + migrations.AddField( + model_name='cfbotbranch', + name='all_deletions', + field=models.IntegerField(blank=True, null=True), + ), + migrations.AddField( + model_name='cfbotbranch', + name='first_additions', + field=models.IntegerField(blank=True, null=True), + ), + migrations.AddField( + model_name='cfbotbranch', + name='first_deletions', + field=models.IntegerField(blank=True, null=True), + ), + migrations.AddField( + model_name='cfbotbranch', + name='patch_count', + field=models.IntegerField(blank=True, null=True), + ), + migrations.AddField( + model_name='cfbotbranch', + name='version', + field=models.TextField(blank=True, null=True), + ), + ] diff --git a/pgcommitfest/commitfest/models.py b/pgcommitfest/commitfest/models.py index 0a8408d5..c0617716 100644 --- a/pgcommitfest/commitfest/models.py +++ b/pgcommitfest/commitfest/models.py @@ -380,6 +380,12 @@ class CfbotBranch(models.Model): needs_rebase_since = models.DateTimeField(null=True, blank=True) created = models.DateTimeField(auto_now_add=True) modified = models.DateTimeField(auto_now=True) + version = models.TextField(null=True, blank=True) + patch_count = models.IntegerField(null=True, blank=True) + first_additions = models.IntegerField(null=True, blank=True) + first_deletions = models.IntegerField(null=True, blank=True) + all_additions = models.IntegerField(null=True, blank=True) + all_deletions = models.IntegerField(null=True, blank=True) def save(self, *args, **kwargs): """Only used by the admin panel to save empty commit id as NULL diff --git a/pgcommitfest/commitfest/templates/commitfest.html b/pgcommitfest/commitfest/templates/commitfest.html index 25047215..aee8af9f 100644 --- a/pgcommitfest/commitfest/templates/commitfest.html +++ b/pgcommitfest/commitfest/templates/commitfest.html @@ -65,6 +65,7 @@