mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-03-15 17:13:46 +01:00
Add method to check organization membership (#1037)
* Add remote method to check organization membership * Use named return parameters in interface * Add membership check service * Update Gitea SDK
This commit is contained in:
@@ -33,6 +33,7 @@ import (
|
||||
"golang.org/x/sync/errgroup"
|
||||
|
||||
"github.com/woodpecker-ci/woodpecker/server"
|
||||
"github.com/woodpecker-ci/woodpecker/server/cache"
|
||||
"github.com/woodpecker-ci/woodpecker/server/model"
|
||||
"github.com/woodpecker-ci/woodpecker/server/plugins/environments"
|
||||
"github.com/woodpecker-ci/woodpecker/server/plugins/registry"
|
||||
@@ -180,6 +181,10 @@ func setupEnvironService(c *cli.Context, s store.Store) model.EnvironService {
|
||||
return environments.Parse(c.StringSlice("environment"))
|
||||
}
|
||||
|
||||
func setupMembershipService(_ *cli.Context, r remote.Remote) cache.MembershipService {
|
||||
return cache.NewMembershipService(r)
|
||||
}
|
||||
|
||||
// setupRemote helper function to setup the remote from the CLI arguments.
|
||||
func setupRemote(c *cli.Context) (remote.Remote, error) {
|
||||
switch {
|
||||
|
||||
Reference in New Issue
Block a user