diff --git a/main.go b/main.go index d30be05..d2d5cb4 100644 --- a/main.go +++ b/main.go @@ -110,7 +110,12 @@ func main() { cli.StringFlag{ Name: "commit.sha", Usage: "git commit sha", - EnvVar: "DRONE_COMMIT_SHA", + EnvVar: "DRONE_COMMIT_SHA,GITHUB_SHA", + }, + cli.StringFlag{ + Name: "commit.ref", + Usage: "git commit ref", + EnvVar: "DRONE_COMMIT_REF,GITHUB_REF", }, cli.StringFlag{ Name: "commit.branch", @@ -210,6 +215,7 @@ func run(c *cli.Context) error { }, Commit: Commit{ Sha: c.String("commit.sha"), + Ref: c.String("commit.ref"), Branch: c.String("commit.branch"), Link: c.String("commit.link"), Author: c.String("commit.author"), diff --git a/plugin.go b/plugin.go index 9251b39..0d09482 100644 --- a/plugin.go +++ b/plugin.go @@ -22,6 +22,7 @@ type ( // Commit information. Commit struct { Sha string + Ref string Branch string Link string Author string