When github or Bitbucket intergation is present set remote to them
When doing platform get and a github or bitbucket integration is present we should probably keep the "platform" remote but change origin to the upstream.
++ for this.
I am glad to see I am not alone; this is exactly what I am doing in my own (private, sorry) extended version of the CLI.
@vincenzo pull request ;)
Hehe, @scotthooker, good point. If it were that easy. I'll try. The thing is, I am developing my version as a fork, but as a wrapper that depends on the official version (long story, you don't need to know why). So what I did, I did it as a separate command that overrides the official one. I'll try and port my changes to the official command and make a pull request.
In fact, it's not just get that needs this, but also branch and checkout (in case one enabled the integration after the project has been already gotten).
One issue I am finding this is in the context of team work with team members that have different permissions. This is actually my team's setup and this is an issue I had to work around in my wrapper solution.
The API that checks for active integrations seems to require admin permissions (unless @pjcdawkins tells me otherwise?), whereas get, branch and checkout only need you to be a reader/contributor.
So if I were to add a check on integrations as part of the get command, this might not work if a non-admin user is actually invoking the command.
@pjcdawkins ?
Right, integrations are for the project admin only. Defining a workflow around integrations is very manual at the moment - for example when a GitHub integration is present, the Platform.sh 'Branch' and 'Merge' actions probably should not be available, but they are...
@pjcdawkins Do you reckon that the API behind integration:get is likely to be made accessible to readers and contributors?
@vincenzo that seems unlikely - there could be reasons why only a project admin would be allowed to read that. Similarly on Bitbucket/GitHub themselves, you can only configure a repository's integrations if you're an admin.
So I think we'd need another solution for this - it's about being able to define some kinds of shared workflow settings on the project (perhaps dependent on integrations, but perhaps based on other things).
@pjcdawkins I don't suppose anything is changed re this?