0
0
mirror of https://github.com/thegeeklab/wp-plugin-go.git synced 2024-11-22 00:20:38 +00:00

fix: use int for commit pull request (#16)

This commit is contained in:
Robert Kaussow 2023-08-17 12:14:16 +02:00 committed by GitHub
parent 19652bf3ba
commit 893f41d45b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,7 +25,7 @@ type (
SHA string
Ref string
Refspec string
PullRequest string
PullRequest int
SourceBranch string
TargetBranch string
Branch string
@ -68,7 +68,7 @@ func currFlags(category string) []cli.Flag {
EnvVars: []string{"CI_COMMIT_REFSPEC"},
Category: category,
},
&cli.StringFlag{
&cli.IntFlag{
Name: "commit.pull-request",
Usage: "commit pull request",
EnvVars: []string{"CI_COMMIT_PULL_REQUEST"},
@ -131,7 +131,7 @@ func currFromContext(c *cli.Context) Commit {
SHA: c.String("commit.sha"),
Ref: c.String("commit.ref"),
Refspec: c.String("commit.refspec"),
PullRequest: c.String("commit.pull-request"),
PullRequest: c.Int("commit.pull-request"),
SourceBranch: c.String("commit.source-branch"),
TargetBranch: c.String("commit.target-branch"),
Branch: c.String("commit.branch"),