feat: release information endpoint (#876)
* dev: init release notes * feat: API endpoint to fetch get last 5 release information
This commit is contained in:
parent
952d35dd79
commit
73a8bbb31f
7 changed files with 67 additions and 2 deletions
|
|
@ -138,3 +138,6 @@ from .estimate import (
|
|||
ProjectEstimatePointEndpoint,
|
||||
BulkEstimatePointEndpoint,
|
||||
)
|
||||
|
||||
|
||||
from .release import ReleaseNotesEndpoint
|
||||
|
|
|
|||
21
apiserver/plane/api/views/release.py
Normal file
21
apiserver/plane/api/views/release.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# Third party imports
|
||||
from rest_framework.response import Response
|
||||
from rest_framework import status
|
||||
from sentry_sdk import capture_exception
|
||||
|
||||
# Module imports
|
||||
from .base import BaseAPIView
|
||||
from plane.utils.integrations.github import get_release_notes
|
||||
|
||||
|
||||
class ReleaseNotesEndpoint(BaseAPIView):
|
||||
def get(self, request):
|
||||
try:
|
||||
release_notes = get_release_notes()
|
||||
return Response(release_notes, status=status.HTTP_200_OK)
|
||||
except Exception as e:
|
||||
capture_exception(e)
|
||||
return Response(
|
||||
{"error": "Something went wrong please try again later"},
|
||||
status=status.HTTP_400_BAD_REQUEST,
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue