mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-16 17:59:25 +08:00
Add an abstract json layout to make it's easier to change json library (#16528)
* Add an abstract json layout to make it's easier to change json library * Fix import * Fix import sequence * Fix blank lines * Fix blank lines
This commit is contained in:
build
cmd
integrations
api_admin_test.goapi_helper_for_declarative_test.goapi_pull_review_test.goapi_repo_lfs_test.gocreate_no_session_test.gointegration_test.golfs_getobject_test.gooauth_test.gorepo_commits_test.gotestlogger.go
models
modules
cache
context
eventsource
httplib
indexer/code
json
lfs
log
notification/action
private
queue
recaptcha
session
setting
storage
structs
task
templates
routers
api/v1/utils
private
web
services
auth/source
gitdiff
lfs
pull
webhook
@ -16,11 +16,11 @@ import (
|
||||
"code.gitea.io/gitea/models"
|
||||
"code.gitea.io/gitea/modules/git"
|
||||
"code.gitea.io/gitea/modules/graceful"
|
||||
"code.gitea.io/gitea/modules/json"
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
"code.gitea.io/gitea/modules/notification"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
issue_service "code.gitea.io/gitea/services/issue"
|
||||
jsoniter "github.com/json-iterator/go"
|
||||
)
|
||||
|
||||
// NewPullRequest creates new pull request with labels for repository.
|
||||
@ -86,7 +86,6 @@ func NewPullRequest(repo *models.Repository, pull *models.Issue, labelIDs []int6
|
||||
data.CommitIDs = append(data.CommitIDs, e.Value.(*git.Commit).ID.String())
|
||||
}
|
||||
|
||||
json := jsoniter.ConfigCompatibleWithStandardLibrary
|
||||
dataJSON, err := json.Marshal(data)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user