From 5c19450e0cc68caa98c714cfa9ed366a4a9a1b34 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Fri, 7 Feb 2025 20:22:05 +0100 Subject: [PATCH 1/2] Implement github action to deploy to test environment --- .github/workflows/deploy.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index ca2edde2..73c8d851 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -4,7 +4,10 @@ on: push: branches: - main +<<<<<<< HEAD - prod +======= +>>>>>>> 96758a1 (Implement github action to deploy to test environment) jobs: deployment: From cfef76017317fd1b665d7e0ac3816eeaf9cb06a2 Mon Sep 17 00:00:00 2001 From: Chirag Jain Date: Mon, 17 Feb 2025 13:54:27 +0530 Subject: [PATCH 2/2] Resolved [Issue #25] Updated commitfest\admin.py to ease the starting and ending action on a commitfest via a drop-down list. --- pgcommitfest/commitfest/admin.py | 36 +++++++++++++++++--------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/pgcommitfest/commitfest/admin.py b/pgcommitfest/commitfest/admin.py index 8c8d62e5..d2bc52d4 100644 --- a/pgcommitfest/commitfest/admin.py +++ b/pgcommitfest/commitfest/admin.py @@ -1,19 +1,22 @@ from django.contrib import admin - -from .models import ( - CfbotBranch, - CfbotTask, - CommitFest, - Committer, - MailThread, - MailThreadAttachment, - Patch, - PatchHistory, - PatchOnCommitFest, - TargetVersion, - Topic, -) - +from django.utils.timezone import now +from .models import * + +class CommitfestAdmin(admin.ModelAdmin): + @admin.action(description="Start selected Commitfest") + def startCommitfest(self,request,queryset): + for commitfest in queryset: + if commitfest.status == 2: + commitfest.status = 3 + commitfest.save() + @admin.action(description="End selected Commitfest") + def endCommitfest(self,request,queryset): + for commitfest in queryset: + if commitfest.status == 3: + commitfest.status = 4 + commitfest.enddate = now() + commitfest.save() + actions = [startCommitfest, endCommitfest] class CommitterAdmin(admin.ModelAdmin): list_display = ("user", "active") @@ -37,9 +40,8 @@ class MailThreadAttachmentAdmin(admin.ModelAdmin): "mailthread", ) - admin.site.register(Committer, CommitterAdmin) -admin.site.register(CommitFest) +admin.site.register(CommitFest,CommitfestAdmin) admin.site.register(Topic) admin.site.register(Patch, PatchAdmin) admin.site.register(PatchHistory)