add DRONE_PULL_REQUEST env.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu 2016-12-02 21:13:58 +08:00
parent d31365c444
commit ab3463be19
2 changed files with 7 additions and 0 deletions

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.