Skip to content

Add full path to expiring group token

  • Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA

What does this MR do and why?

Why

Webhook events for Group Token expiration should include the complete path to the token's group. Currently users need to use the Groups API to check the group's full path.

What

Adding full_path to the attributes returned for group access tokens

How to set up and validate locally

  1. Go https://webhook.site to get a webhook url for step 2, keep the window open.
  2. On a group's settings page, configure a group webhook with URL from step 1 and trigger access token events
  3. On the same group's settings page, create a group access token with expiry in the next 3-4 days
  4. Execute from rails console (bundle exec rails console) to trigger the webhook:
PersonalAccessToken.update_all(expire_notification_delivered: false)
PersonalAccessTokens::ExpiringWorker.new.perform
  1. Check webhook.site again to see the received message:

image

Related to #465421 (closed)

Edited by Smriti Garg

Merge request reports

Loading