From bde109d1581bd9fcdc64fe65796f8b610740059e Mon Sep 17 00:00:00 2001
From: Joas Schilling <coding@schilljs.com>
Date: Wed, 1 Feb 2023 21:39:49 +0100
Subject: [PATCH] fix(updater): Don't warn about missing appstore updates for
 apps deployed from git

Signed-off-by: Joas Schilling <coding@schilljs.com>
---
 apps/updatenotification/lib/Controller/APIController.php | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/apps/updatenotification/lib/Controller/APIController.php b/apps/updatenotification/lib/Controller/APIController.php
index 75b847aceb3..26657eb66f0 100644
--- a/apps/updatenotification/lib/Controller/APIController.php
+++ b/apps/updatenotification/lib/Controller/APIController.php
@@ -130,6 +130,15 @@ class APIController extends OCSController {
 
 		$this->language = $this->l10nFactory->getUserLanguage($this->userSession->getUser());
 
+		// Ignore apps that are deployed from git
+		$installedApps = array_filter($installedApps, function(string $appId) {
+			try {
+				return !file_exists($this->appManager->getAppPath($appId) . '/.git');
+			} catch (AppPathNotFoundException $e) {
+				return true;
+			}
+		});
+
 		$missing = array_diff($installedApps, $availableApps);
 		$missing = array_map([$this, 'getAppDetails'], $missing);
 		sort($missing);
-- 
GitLab