mirror of
https://github.com/harness/drone.git
synced 2025-05-19 02:20:03 +08:00
24 lines
410 B
Go
24 lines
410 B
Go
package gogs
|
|
|
|
import (
|
|
"github.com/drone/config"
|
|
"github.com/drone/drone/plugin/remote"
|
|
)
|
|
|
|
var (
|
|
gogsUrl = config.String("gogs-url", "")
|
|
gogsSecret = config.String("gogs-secret", "")
|
|
)
|
|
|
|
// Registers the Gogs plugin using the default
|
|
// settings from the config file or environment
|
|
// variables.
|
|
func Register() {
|
|
if len(*gogsUrl) == 0 {
|
|
return
|
|
}
|
|
remote.Register(
|
|
New(*gogsUrl, *gogsSecret),
|
|
)
|
|
}
|