Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Setup origin remote on new workspace for compatibility with VSCode pull request plug-in #14

Closed
Tracked by #21925
dkwon17 opened this issue Jan 10, 2022 · 1 comment

Comments

@dkwon17
Copy link
Collaborator

dkwon17 commented Jan 10, 2022

Is your feature request related to a problem? Please describe.

Please note, this issue is only exists for using the try-in-web-ide GitHub action for testing PRs made from forks.

It would be great if new workspaces have the origin remote already set up on new workspaces for out-of-the-box compatibility with vscode pull request plug-in.

By default, the vscode pull-request plugin searches for pull requests in the origin and upstream remote:
Please see the Getting Started section from https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github.

Currently, the workspace created by the factory url provided by the try-in-web-ide GitHub action sets the origin remote to be the repository for the pull request branch, rather than the base repository. Pull requests would be for the base repository, therefore the vscode pull request plug-in does not detect the pull request if the pull request is coming from a forked repository.

Describe the solution you'd like

One way to address this issue could be to have the try-in-web-ide action to configure the remotes via the factory url. To setup the remotes for DevWorkspaces, the spec.template.projects field can be configured.

For example:

    projects:
      - git:
          checkoutFrom:
            remote: fork
            revision: <pull request branch name>
          remotes:
            fork: <user fork repo url>
            origin: <base repo url>
        name: <project name>

This adds two remotes, origin and fork, and checks out the pull request branch from the fork remote.

Currently, it is not possible to override the spec.template.projects section via the factory url. Please see eclipse-che/che#20137.

Describe alternatives you've considered

It is possible manually setup the git remotes within the editor so that the vscode pull request plug-in can detect the pull-request.

Related issue

eclipse-che/che#20137

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant