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

Need end point to load project from github branch #3134

Closed
nipobhsnro opened this issue Nov 21, 2016 · 10 comments
Closed

Need end point to load project from github branch #3134

nipobhsnro opened this issue Nov 21, 2016 · 10 comments
Labels
kind/question Questions that haven't been identified as being feature requests or bugs.

Comments

@nipobhsnro
Copy link

I have master github repository and there is one branch in that repo.
I have created project from master branch successfully.
But now I need to create project in eclipse che from github branch.
Can any one please tell me how to do it?

@bmicklea bmicklea added the kind/question Questions that haven't been identified as being feature requests or bugs. label Nov 21, 2016
@bmicklea
Copy link

@nipobhsnro - You have your own code in a branch of a repo and you want to get that into Eclipse Che?

If so then the easiest way to do it is to create a new workspace from the user dashboard and import the code using the github URL.

Choose a stack that matches the language and runtime type and hit create. Your code will be imported and available in the editor.

@nipobhsnro
Copy link
Author

But i need end point for that means I need to do it using api

@nipobhsnro
Copy link
Author

I need to create project from github branch (not from master branch) using api

@bmicklea
Copy link

You can get API docs through swagger by going to {your-che-hostname}/swagger

You'll need the "workspace" section then look for POST, PUT and DELETE for /workspace/{id}/project

@nipobhsnro
Copy link
Author

Yes from swagger I am able to create it new project.
But I have project in github branch, I need that project should be load in workspace

@bmicklea
Copy link

I don't think Che has that capability. You could try creating a command in
the workspace that will switch branches and then execute that command via
the machine API.

Not sure if it's relevant to you, but Codenvy does allow you to switch
branches and even choose commit points through Factories - it's the basis
for the Codenvy integrations with JIRA, Jenkins and others.

On Mon, Nov 21, 2016 at 11:03 AM, nipobhsnro [email protected]
wrote:

Yes from swagger I am able to create it new project.
But I have project in github branch, I need that project should be load in
workspace


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#3134 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AHSnChnk2tQvuJLsfdYJdVIoTCoynayiks5rAcDYgaJpZM4K4Pus
.

Brad Micklea | Operations | bmicklea@​codenvy.​com | 4​16​.7​07​.07​92

@TylerJewell
Copy link

If it can be done in the IDE, then it can be done over API :)

Tyler Jewell | CEO | tyler@​codenvy.​com | 9​78​.8​84​.53​55

On Mon, Nov 21, 2016 at 10:23 AM, Brad Micklea [email protected]
wrote:

I don't think Che has that capability. You could try creating a command in
the workspace that will switch branches and then execute that command via
the machine API.

Not sure if it's relevant to you, but Codenvy does allow you to switch
branches and even choose commit points through Factories - it's the basis
for the Codenvy integrations with JIRA, Jenkins and others.

On Mon, Nov 21, 2016 at 11:03 AM, nipobhsnro [email protected]
wrote:

Yes from swagger I am able to create it new project.
But I have project in github branch, I need that project should be load
in
workspace


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#3134 (comment), or
mute
the thread
<https://github.com/notifications/unsubscribe-auth/
AHSnChnk2tQvuJLsfdYJdVIoTCoynayiks5rAcDYgaJpZM4K4Pus>
.

Brad Micklea | Operations | bmicklea@​codenvy.​com | 4​16​.7​07​.07​92


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#3134 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAX9Cpv2_a1iot4WqNCtx3W8h6CapHjXks5rAeGQgaJpZM4K4Pus
.

@nipobhsnro
Copy link
Author

By using http://ip-address:wsagentportno/wsagent/ext/che/import/project name
And passing parameters like {location:github master URL, type git}

So is there not be any way like above to import project from github branch?

@ghost
Copy link

ghost commented Nov 22, 2016

@nipobhsnro have you tried using params when importing?

{
    "parameters": {
    "branch": "myAwesomeBranch"
    },
    "location": "https://github.com/org/repo",
    "type": "git"
  }

@nipobhsnro
Copy link
Author

@eivantsov 👍
Its worked :-)
Thank u so much :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Questions that haven't been identified as being feature requests or bugs.
Projects
None yet
Development

No branches or pull requests

3 participants