Skip to content

Commit

Permalink
add users to bucketlist and operations repo
Browse files Browse the repository at this point in the history
  • Loading branch information
harshithpabbati committed Mar 28, 2021
1 parent ce49cba commit 9fb192f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion framework/platforms/gitlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,17 @@ def addUser(self):
gl.auth()
group = gl.groups.get('amfoss')
userID = gl.users.list(username=self.username)[0].id
group.members.create({'user_id': userID, 'access_level': gitlab.REPORTER_ACCESS})
try:
group.members.create({'user_id': userID, 'access_level': gitlab.REPORTER_ACCESS})
except:
pass
projectIDs = [20528933, 21712951]
for projectID in projectIDs:
project = gl.projects.get(projectID)
try:
project.members.create({'user_id': userID, 'access_level': gitlab.DEVELOPER_ACCESS})
except:
pass

def checkIfUserExists(self):
GITLAB_TOKEN = Token.objects.values().get(key='GITLAB_TOKEN')['value']
Expand Down

0 comments on commit 9fb192f

Please sign in to comment.