From c62260ab020b666601b6f337e2627c57ce5b19a0 Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri, 1 Apr 2022 14:41:50 -0700 Subject: [PATCH] Use GH api URL Update configuration.rst --- docs/configuration.rst | 4 ++-- src/documents/views.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/configuration.rst b/docs/configuration.rst index cc9b9f5e9..bb9a92b62 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -767,8 +767,8 @@ PAPERLESS_OCR_LANGUAGES= PAPERLESS_ENABLE_UPDATE_CHECK= Enabling this option enables the check for available updates, which works by - loading the version file of the public repository for this project on Github e.g. - https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/src/paperless/version.py + pinging the releases endpoint of the Github API for the project e.g. + https://api.github.com/repos/paperless-ngx/paperless-ngx/releases/latest to determine whether a new version is available. Actual updating of the app must be done manually. No tracking data is collected by the app in any way. diff --git a/src/documents/views.py b/src/documents/views.py index 141331169..5dc5667c3 100644 --- a/src/documents/views.py +++ b/src/documents/views.py @@ -679,8 +679,8 @@ class RemoteVersionView(GenericAPIView): if settings.ENABLE_UPDATE_CHECK: try: with urllib.request.urlopen( - "https://raw.githubusercontent.com/paperless-ngx" - + "/paperless-ngx/main/src/paperless/version.py", + "https://api.github.com/repos/" + + "paperless-ngx/paperless-ngx/releases/latest", ) as response: remote = response.read().decode("utf-8") try: