Skip to content
Snippets Groups Projects
Verified Commit 70901d06 authored by Kristian Klausen's avatar Kristian Klausen :tada:
Browse files

gitlab: Fix bot-token-extender script not extending project membership

The project membership must also be extended, if not the user is simply
deleted when the membership expires (defeating the purpose of extending
the access tokens).

Fixes: 639101e6 ("gitlab: Add ruby script for continuous extending of bot tokens")
parent cc8017fb
No related branches found
No related tags found
No related merge requests found
Pipeline #114680 passed
......@@ -3,5 +3,6 @@ bots = [{{ gitlab_bots | map("to_json") | join(', ') }}]
bots.each do |username|
puts "Bot user: #{username}"
user = User.find_by_username(username)
user.project_members.update_all(expires_at: 12.months.from_now)
user.personal_access_tokens.update_all(expires_at: 12.months.from_now)
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment