[sysadmin-bin] Nest repository check under general activity condition
- From: Bartłomiej Piotrowski <bpiotrowski src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin] Nest repository check under general activity condition
- Date: Tue, 30 Nov 2021 14:49:32 +0000 (UTC)
commit 508ed2280dc2d9e11356e9cd4b8dd887234884db
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date: Tue Nov 30 15:49:01 2021 +0100
Nest repository check under general activity condition
gitlab/inactive-gitlab-users.py | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/gitlab/inactive-gitlab-users.py b/gitlab/inactive-gitlab-users.py
index 817cd89..47eb8d4 100755
--- a/gitlab/inactive-gitlab-users.py
+++ b/gitlab/inactive-gitlab-users.py
@@ -135,16 +135,16 @@ def get_inactive_users(gl, timedelta_unit, timedelta_value):
userdata["reason"] = "inactivity"
results.append(userdata)
continue
-
- user_projects = user.projects.list(all=True)
- if len(user_projects) == 1:
- userproj = user_projects[0]
- if not userproj.attributes.get("forked_from_project"):
- proj = gl.projects.get(userproj.id)
- if len(proj.commits.list()) <= 1:
- userdata["reason"] = "inactivity"
- results.append(userdata)
- continue
+ else:
+ user_projects = user.projects.list(all=True)
+ if len(user_projects) == 1:
+ userproj = user_projects[0]
+ if not userproj.attributes.get("forked_from_project"):
+ proj = gl.projects.get(userproj.id)
+ if len(proj.commits.list()) <= 1:
+ userdata["reason"] = "inactivity"
+ results.append(userdata)
+ continue
if attrs["bio"] and len(attrs["bio"]) > 0:
# Some users set URL in bio, check it against surbl
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]