mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-11 17:50:58 +00:00
fix: the number in the github event is of type number (#1252)
* fix: the number in the github event is of type number The go %s formattig option outputs the type if the given input value is not of type string. * test: update test data as well * fix: use floats
This commit is contained in:
parent
09125b9f80
commit
d1a86efe94
2 changed files with 2 additions and 2 deletions
|
@ -98,7 +98,7 @@ func (ghc *GithubContext) SetRefAndSha(ctx context.Context, defaultBranch string
|
|||
ghc.Ref = ghc.BaseRef
|
||||
ghc.Sha = asString(nestedMapLookup(ghc.Event, "pull_request", "base", "sha"))
|
||||
case "pull_request", "pull_request_review", "pull_request_review_comment":
|
||||
ghc.Ref = fmt.Sprintf("refs/pull/%s/merge", ghc.Event["number"])
|
||||
ghc.Ref = fmt.Sprintf("refs/pull/%.0f/merge", ghc.Event["number"])
|
||||
case "deployment", "deployment_status":
|
||||
ghc.Ref = asString(nestedMapLookup(ghc.Event, "deployment", "ref"))
|
||||
ghc.Sha = asString(nestedMapLookup(ghc.Event, "deployment", "sha"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue