diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2022-04-02 00:34:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-02 00:34:57 +0800 |
commit | 4f27c289472a4cfafb5a9b0e38e6a3413c30c562 (patch) | |
tree | 4a9388cfaf2efe4e9d0ed0242736769ef7e3e083 /services/webhook/webhook.go | |
parent | 4c5cb1e2f2c7a1fcc3b151192bd45bd1bbc090bd (diff) | |
download | gitea-4f27c289472a4cfafb5a9b0e38e6a3413c30c562.tar.gz gitea-4f27c289472a4cfafb5a9b0e38e6a3413c30c562.zip |
Remove legacy `unknwon/com` package (#19298)
Follows: #19284
* The `CopyDir` is only used inside test code
* Rewrite `ToSnakeCase` with more test cases
* The `RedisCacher` only put strings into cache, here we use internal `toStr` to replace the legacy `ToStr`
* The `UniqueQueue` can use string as ID directly, no need to call `ToStr`
Diffstat (limited to 'services/webhook/webhook.go')
-rw-r--r-- | services/webhook/webhook.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/services/webhook/webhook.go b/services/webhook/webhook.go index 557dd147bf..a3efc7535f 100644 --- a/services/webhook/webhook.go +++ b/services/webhook/webhook.go @@ -6,6 +6,7 @@ package webhook import ( "fmt" + "strconv" "strings" repo_model "code.gitea.io/gitea/models/repo" @@ -106,7 +107,7 @@ func PrepareWebhook(w *webhook_model.Webhook, repo *repo_model.Repository, event return err } - go hookQueue.Add(repo.ID) + go hookQueue.Add(strconv.FormatInt(repo.ID, 10)) return nil } @@ -187,7 +188,7 @@ func PrepareWebhooks(repo *repo_model.Repository, event webhook_model.HookEventT return err } - go hookQueue.Add(repo.ID) + go hookQueue.Add(strconv.FormatInt(repo.ID, 10)) return nil } @@ -239,7 +240,7 @@ func ReplayHookTask(w *webhook_model.Webhook, uuid string) error { return err } - go hookQueue.Add(t.RepoID) + go hookQueue.Add(strconv.FormatInt(t.RepoID, 10)) return nil } |