fastlane/ci

JSON POST endpoint to create config repo

nakhbari opened this issue · 7 comments

Parent: #784

Endpoint should take in an org and be able to create a config repo unless one already exists.

Expecting the post body to look like this

{
  "encryption_key": "key",
  "robot_account": {
    "token": "123",
    "password": "234"
  },
  "config_repo": "org/ci-repo"
}

There are a lot of errors that can happen here.

@KrauseFx do you have cycles to work on this?

Should break up the requests or just make a super-request at the end of the form?

Offline discussion between @anshulagl and I:

Anshul Agrawal:
A super request at the end sounds a better approach to me, it really depends on if we want to checkpoint user's onboarding if she wants to return back and complete it at a later point of time, if that's the desired experience, independent requests might make more sense.

Nima Akhbari:
I think incremental request would also give more feedback on incorrect params or other errors at the step that the user is on, instead of at the end of the flow. But this would also mean latency at each step as the user waits for the request to go through

Anshul Agrawal:
That makes total sense if we need to validate the info at each step, showing all errors at the end wouldn't make much sense. Ideally the server latency would be <500ms. If the user is clicking the "Next" button, wouldn;t feel that big a difference.

Nima Akhbari:
server latency is one thing, but we'll also have to do some work on the backend which could take time. For example, getting the email from Github for a specific access token.

Taking this on now

I'm gonna rename robot to bot

{
  "encryption_key": "key",
  "bot_account": {
    "token": "123",
    "password": "234"
  },
  "config_repo": "org/ci-repo"
}

The requirements for this endpoint are now changing due to the usage of GitHub OAuth Apps. I will update this issue with the draft proposal

@KrauseFx With the proposal approved and some of the UI work being done. I think we can safely say that this is the direction to head with this endpoint. Of course now we have a couple more endpoints to add with the new OAuth design. Those end points are outlined in the parent issue: #784. Are you still free to take some of these on?

We decided to pause our work on fastlane.ci to focus on the core fastlane product as we have a lot on the roadmap. You can find more information on the main GitHub page. This issue will be auto-closed 👍