Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Commit e71f455

Browse files
update
1 parent 34d0f86 commit e71f455

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

api/public/v2/pull/serializers.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11
from rest_framework import serializers
22

3+
from api.public.v2.owner.serializers import OwnerSerializer
4+
from api.shared.commit.serializers import CommitTotalsSerializer
35
from compare.models import CommitComparison
4-
from core.models import Pull
6+
from core.models import Pull, PullStates
57
from services.comparison import ComparisonReport
68

79

810
class PullSerializer(serializers.ModelSerializer):
11+
pullid = serializers.IntegerField(label="pull ID number")
12+
title = serializers.CharField(label="title of the pull")
13+
base_totals = CommitTotalsSerializer(label="coverage totals of base commit")
14+
head_totals = CommitTotalsSerializer(label="coverage totals of head commit")
15+
updatestamp = serializers.DateTimeField(label="last updated timestamp")
16+
state = serializers.ChoiceField(
17+
label="state of the pull", choices=PullStates.choices
18+
)
19+
ci_passed = serializers.BooleanField(
20+
label="indicates whether the CI process passed for the head commit of this pull"
21+
)
22+
author = OwnerSerializer(label="pull author")
923
patch = serializers.SerializerMethodField()
1024

1125
class Meta:

0 commit comments

Comments
 (0)