Merge pull request #28 from appleboy/pr

support DRONE_PULL_REQUEST env
This commit is contained in:
Bo-Yi Wu 2016-12-02 21:15:41 +08:00 committed by GitHub
commit 7c2792c82b
3 changed files with 9 additions and 2 deletions

View File

@ -6,8 +6,8 @@ services:
go:
- 1.5.4
- 1.6.3
- 1.7.3
- 1.6.4
- 1.7.4
- tip
env:

View File

@ -152,6 +152,11 @@ func main() {
Usage: "build tag",
EnvVar: "DRONE_TAG",
},
cli.StringFlag{
Name: "pull.request",
Usage: "pull request",
EnvVar: "DRONE_PULL_REQUEST",
},
cli.Float64Flag{
Name: "job.started",
Usage: "job started",
@ -194,6 +199,7 @@ func run(c *cli.Context) error {
Link: c.String("build.link"),
Started: c.Float64("job.started"),
Finished: c.Float64("job.finished"),
PR: c.String("pull.request"),
},
Config: Config{
Token: c.String("token"),

View File

@ -33,6 +33,7 @@ type (
Link string
Started float64
Finished float64
PR string
}
// Config for the plugin.