Skip to content

Handle when user cannot push code

Paul Slaughter requested to merge ps-when-cannot-push-code into main

Description

This MR handles the case where the user cannot push code to the Web IDE repository, so it needs to open in a read-only view and show a warning to the user.

Screenshots

User has fork User does not have fork, but can fork User cannot fork
Screenshot_2023-01-17_at_10.58.03_PM Screenshot_2023-01-17_at_10.58.19_PM Screenshot_2023-01-17_at_10.57.40_PM

How to test?

In the example app (by running yarn start:example):

  1. Enter Type: Client only, GitLab URL: https://gitlab.com, Project Path: inkscape/inkscape (or any other project you don't have write access to)
  2. Notice the warning message when it starts
  3. To simulate what would happen if the User already has a fork, revisit the example app URL and add ?forkInfo.ide_path=idepath as a query parameter.
  4. To simulate what would happen if the User does not have a fork, but can fork, revisit the example app URL and add ?forkInfo.fork_path=forkpath as a query parameter.

References

Edited by Paul Slaughter

Merge request reports