mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-02 14:46:31 +00:00
22 lines
418 B
Go
22 lines
418 B
Go
|
package github
|
||
|
|
||
|
import (
|
||
|
"github.com/drone/drone/plugin/remote"
|
||
|
"github.com/drone/drone/shared/model"
|
||
|
)
|
||
|
|
||
|
func init() {
|
||
|
remote.Register(model.RemoteGithub, plugin)
|
||
|
remote.Register(model.RemoteGithubEnterprise, plugin)
|
||
|
}
|
||
|
|
||
|
func plugin(remote *model.Remote) remote.Remote {
|
||
|
return &Github{
|
||
|
URL: remote.URL,
|
||
|
API: remote.API,
|
||
|
Client: remote.Client,
|
||
|
Secret: remote.Secret,
|
||
|
Enabled: remote.Open,
|
||
|
}
|
||
|
}
|