mirror of
https://gitlab.archlinux.org/archlinux/infrastructure.git
synced 2025-01-18 08:06:16 +01:00
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")
9 lines
297 B
Django/Jinja
9 lines
297 B
Django/Jinja
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
|