Skip to content

Error in rendering of token names in notification email

What does this MR do and why?

Fixes #432518 (closed)

Error in rendering of token names

A bot user can have one pat at any point of time. ExpiringWorker is written on the same premise and we expect the user of type bot to have only one pat. This mailer need not be an exception and run a loop on multiple token names

We are also change method name to sound more meaningful in case of resource access tokens and also the email text for access token expiring notification

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Mails being sent after the bug fix Screenshot_2024-04-15_at_12.18.51_PM

How to set up and validate locally

  1. Create a Resource access token for a group or a project and set expiry date < than 7 days
  2. Open gdk rails console and execute PersonalAccessTokens::ExpiringWorker.new.perform
  3. The worker should execute and owner of the group should receive email. In case of local setup mail should appear in /rails/letter_opener
Edited by Smriti Garg

Merge request reports