Skip to content

[cloud] Show update button on gitlab connection when token is expired

Administrator requested to merge milan/show-gitlab-connection-update-button into main

Created by: kopancek

Description

With gitlab now enforcing token expiry in 2 hours, this is an easier way for the customer to renew their oauth token. Without this functionality the customer needs to remove the code host connection and re-add it. However removal of code host connection also removes any repos attached to it. Which would lead to customer needing to re-add all of the repos again as well.

Instead this PR shows an Update button when the token is expired, allowing the customer to go over the oauth flow to get a new token without forcing them to remove the code host connection (and repos).

Screenshot

Screenshot 2022-05-27 at 06 20 56

Related

https://github.com/sourcegraph/customer/issues/968

Test plan

Tested locally + with a unit test. Will verify in production after it's deployed as well.

App preview:

Check out the client app preview documentation to learn more.

Merge request reports

Loading