Commit graph

66 commits

Author SHA1 Message Date
David M. Carr
41a47bcb73 Fix minor typo in remote.go 2015-05-14 11:49:55 -04:00
Kirill Zaitsev
29b44015fd Fix token problems at first login 2015-04-29 03:13:21 +03:00
Kirill Zaitsev
4b3eaec70c Since 7.10 token life unlimited 2015-04-25 02:19:28 +03:00
Henrik Jonsson
525d6d1329 s/heper/helper in helper.go 2015-04-08 15:18:01 +02:00
Kirill Zaitsev
961a91dd23 Allow to skip verify in oauths requests 2015-02-24 00:27:17 +03:00
Brad Rydzewski
bd8dcf8de5 Merge pull request #876 from masarakki/fix-for-ghe-private
Change repo to be private when GHE is private mode.
2015-02-12 23:09:19 -08:00
masarakki
8d1015a106 Change repo to be private when GHE is private mode. 2015-02-13 14:09:53 +09:00
Brad Rydzewski
a5dd61f480 display list of required orgs in github login error 2015-02-12 15:19:31 -08:00
Ulrich Schreiner
d3b337ff30 bug in error handling 2015-02-06 12:05:39 +01:00
Ulrich Schreiner
7b02878df9 reuse more existing code 2015-02-06 12:02:02 +01:00
Ulrich Schreiner
f57640a402 remove hook/key from a bitbucket repo 2015-02-06 11:36:31 +01:00
Ulrich Schreiner
05b6dad81e Merge branch 'master' into delrepo 2015-02-05 14:47:35 +01:00
Ulrich Schreiner
bd8fb51c2a rework to delete the repository from the datastore if there are previous errors from the remote 2015-02-05 13:13:17 +01:00
Ulrich Schreiner
347aa24785 remove Printf output and do a real removal of the repository in the datastore 2015-02-04 15:13:23 +01:00
Ulrich Schreiner
0ed7ae7e3f impelement a delete of a repository 2015-02-04 14:42:24 +01:00
Kirill Zaitsev
6ca94970d6 Refresh only expired tokens 2015-02-04 13:18:46 +03:00
Kirill Zaitsev
d225181a0f Refresh tokens before any requests to remote 2015-01-27 02:33:27 +03:00
Uchio KONDO
6699770e76 Fix loop to be consistent with the others 2015-01-26 16:20:53 +09:00
Uchio KONDO
e4efc039c9 Merge remote-tracking branch 'origin/master' 2015-01-26 15:51:09 +09:00
Uchio KONDO
bcb8b17c32 Get github orgs over 30 2015-01-26 14:56:30 +09:00
Kirill Zaitsev
f47ab27702 Gitlab oauth login 2015-01-23 22:28:24 +03:00
Brad Rydzewski
b44bdd7ac7 Merge pull request #826 from mattbostock/per_plugin_registration
Per-remote open registration
2015-01-16 22:04:51 -08:00
Matt Bostock
307aed12bc Move open registration setting into remote plugins
...so that it's possible to enable or disable open registration on a
per-remote basis.

For example, the `DRONE_REGISTRATION_OPEN` environment variable now
becomes `DRONE_GITHUB_OPEN` when using GitHub as a remote.

The default for open registration in this commit is `false` (disabled),
which matches the existing behaviour.

This is useful if you need to support both public and private remotes,
e.g. GitHub.com and GitHub Enterprise, where you trust all of the
private users and want to allow open registration for those but would
not want all GitHub.com users to run builds on your server.

Tested with GitHub and GitLab.
2015-01-16 22:04:24 +00:00
Ørjan Bruland
570a23f952 Use Slug instead of Name for Bitbucket repos. 2015-01-16 17:36:56 +01:00
Dan Carley
8fa473b07a Support org whitelists for GitHub+GHE remotes
Allow the GitHub and GitHub Enterprise remotes to restrict who can login
based on a user's organisation membership. This can be used as a safe
addition to open registration and also ensures that access is revoked when a
user is subsequently removed from the org. The default is not to restrict at
all.
2015-01-15 17:05:53 +00:00
Dan Carley
789adf90e4 Add test for GitHub remote Authorize()
To test that it correctly authorises a valid user, prior to me extending it.
This only tests the happy path because simulating oAuth failures is going
to be quite hard at this stage.
2015-01-15 14:54:27 +00:00
Dan Carley
a608f5ef82 Add test for GitHub remote GetOrgs() helper
I'm about to re-use this in another helper, so test that it works as
expected. Also fix the inline documentation which was copied from
`GetOrgRepos`.
2015-01-15 14:54:27 +00:00
Dan Carley
86b0329d57 Change org name in GitHub testdata
The example JSON taken from GitHub's API documentation doesn't indicate that
`login` is the name of an organisation rather than a user. Change it to
something that looks more like an org, because it will make a test that I'm
about to add more readable. The endpoint name changes accordingly.
2015-01-15 14:54:26 +00:00
Cédric Krier
cb6ade6919 Missing URL for bitbucket Repo 2015-01-11 02:13:12 +01:00
Michael Steinert
d1099bcf53 Add Gitlab certificate verification configuration
Requires Bugagazavr/go-gitlab-client@4e00e40109
2014-12-09 10:16:59 -06:00
Christopher Brickley
270ce52b76 add gogs support 2014-11-18 21:50:05 -05:00
Brad Rydzewski
0dce99f5f4 instructs Drone to ignore cert verification if self-signed 2014-11-17 11:18:58 -08:00
Kirill Zaitsev
c7649e15b1 Add gitlab repo url 2014-10-28 03:21:19 +03:00
Brad Rydzewski
1fd1c5e292 fixe #620 2014-10-24 08:52:42 -07:00
Andrew Vos
286d5fe94c Fix incorrect drone branch for pull requests
Fixes #607
2014-10-22 11:56:06 +01:00
Brad Rydzewski
4f30e1388c only generate repo token or key if not exists 2014-10-22 01:02:14 -07:00
Grzegorz Graczyk
79e0c7a84f move regexp to package level variable, add check for email array 2014-10-22 09:37:04 +02:00
Grzegorz Graczyk
25b887c059 get commit author email address from raw_author instead of author field for bitbucket 2014-10-22 08:52:45 +02:00
Brad Rydzewski
5f950d21c4 hooked up jwt token in angular 2014-09-30 00:43:50 -07:00
Brad Rydzewski
0987a9ad59 verified fix for github enterprise email issues 2014-09-09 01:37:02 -07:00
Brad Rydzewski
522310ecb8 improvements to github enterprise flow when no primary email 2014-09-09 01:09:19 -07:00
Brad Rydzewski
1ff56ef51c handle github enterprise not supporting verified / primary emails 2014-09-09 00:32:47 -07:00
Brad Rydzewski
2cca926a06 vendored goauth2, see https://code.google.com/p/goauth2/issues/detail?id=31 2014-09-08 23:57:48 -07:00
Brad Rydzewski
9455dbab9f improved error messaging in Github's GetLogin 2014-09-08 23:09:00 -07:00
Brad Rydzewski
31b1ed1f48 added a private mode flag for github enterprise, defaulted to true 2014-09-07 11:26:16 -07:00
Brad Rydzewski
b9c103cef8 includes fix for #335 in exp branch 2014-09-06 13:08:56 -07:00
Brad Rydzewski
617476784d getting gitlab project permissions only if user is not repo owner
also move Timeout value to repo activation
2014-09-06 12:07:47 -07:00
Brad Rydzewski
73d2f5c1ca Merge pull request #444 from Bugagazavr/exp-gitlabfix
Fix gitlab permissions sync #415
2014-09-06 10:54:33 -07:00
Brad Rydzewski
b92ae8b3c7 forcing github hook as form content_type 2014-09-06 10:29:06 -07:00
Brad Rydzewski
8ad36255de get githook hook payload from either form or json 2014-09-06 10:23:36 -07:00