Skip to content

Commit

Permalink
fix: use int for commit pull request (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
xoxys authored Aug 17, 2023
1 parent 19652bf commit 893f41d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugin/commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type (
SHA string
Ref string
Refspec string
PullRequest string
PullRequest int
SourceBranch string
TargetBranch string
Branch string
Expand Down Expand Up @@ -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"},
Expand Down Expand Up @@ -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"),
Expand Down

0 comments on commit 893f41d

Please sign in to comment.