Commit Graph

12 Commits

Author SHA1 Message Date
Simone Gotti cbd971619b gateway: refresh oauth2 token when needed
refresh the oauth2 access token when needed and update the related linked
account.
2019-04-29 15:42:10 +02:00
Simone Gotti ca1d837ecd webhook: use hook provided ssh url for cloning
Additionally don't save a CloneURL field inside the project type.

If in future some git source doesn't provide a clone url we could just calculate
it from project.RepoPath or call the remote api to retrieve it.
2019-04-11 16:49:07 +02:00
Simone Gotti 782750e51e project: save remote repository id 2019-04-11 17:11:17 +02:00
Simone Gotti 3642be6f21 */api: Use helpers for error handling
* client: always parse the json error message field and return its contents
* Use ErrBadRequest and ErrNotFound in every handler and command
* Gateway: by default pass underlying service error (configstore, runservice) to
client keeping the status code and message. In future, if some errors must be
masked, we should change the specific parts that need special handling.
2019-04-09 14:53:00 +02:00
Simone Gotti 03b5a53510 gateway/command: use ErrBadRequest when needed 2019-04-08 12:08:31 +02:00
Simone Gotti 763d77d899 gateway: rename projectid to projectref 2019-04-08 09:04:55 +02:00
Simone Gotti 4cf72748b4 gitsources: update api
* Generalize to use repopath instead of (owner, reponame)
2019-04-03 15:01:21 +02:00
Simone Gotti 3d39553189 project create: user project path
Use project path for project creation and get the project clone url directly
from the remote source
2019-04-03 11:07:54 +02:00
Simone Gotti 8b92b6f55c initial project group impl
and related api updated
2019-03-14 14:36:18 +01:00
Simone Gotti f383a0056d gateway gitsources: use owner id for deploy keys and webhook urls
In this way we could have multiple projects pointing to the same remote
repository and every projects will have its own deploy key and webhook url
2019-02-28 17:19:53 +01:00
Simone Gotti 41002efbff *: add organizations 2019-02-28 15:52:35 +01:00
Simone Gotti 021a0465ce gateway: initial implementation 2019-02-21 17:58:25 +01:00