[sysadmin-bin] Skip users who configured GPG or SSH key



commit 6a40a3fb6c6b0bed8006a1752b06a4a222158024
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date:   Mon Oct 25 10:55:54 2021 +0200

    Skip users who configured GPG or SSH key

 gitlab/inactive-gitlab-users.py | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gitlab/inactive-gitlab-users.py b/gitlab/inactive-gitlab-users.py
index 34fa325..4a2976b 100755
--- a/gitlab/inactive-gitlab-users.py
+++ b/gitlab/inactive-gitlab-users.py
@@ -122,6 +122,10 @@ def get_inactive_users(gl, timedelta_unit, timedelta_value):
                             user.customattributes.set("trusted", "true")
                             break
 
+        # Skip users who configured SSH or GPG keys in their profile
+        if user.keys.list() or user.gpgkeys.list():
+            continue
+
         if attrs["bio"] and len(attrs["bio"]) > 0:
             # Some users set URL in bio, check it against surbl
             if re.match("http[s]?://", attrs["bio"], re.IGNORECASE):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]