legacy-cli icon indicating copy to clipboard operation
legacy-cli copied to clipboard

When github or Bitbucket intergation is present set remote to them

Open OriPekelman opened this issue 10 years ago • 9 comments

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.

OriPekelman avatar Aug 12 '15 16:08 OriPekelman

++ for this.

scotthooker avatar Aug 13 '15 23:08 scotthooker

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 avatar Dec 13 '15 12:12 vincenzo

@vincenzo pull request ;)

scotthooker avatar Dec 13 '15 13:12 scotthooker

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).

vincenzo avatar Dec 13 '15 14:12 vincenzo

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 ?

vincenzo avatar Dec 16 '15 10:12 vincenzo

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 avatar Dec 16 '15 10:12 pjcdawkins

@pjcdawkins Do you reckon that the API behind integration:get is likely to be made accessible to readers and contributors?

vincenzo avatar Dec 16 '15 11:12 vincenzo

@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 avatar Dec 16 '15 11:12 pjcdawkins

@pjcdawkins I don't suppose anything is changed re this?

vincenzo avatar Nov 16 '16 08:11 vincenzo