Skip to content

Support unicode emojis and remove emojify.js #11032

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 99 commits into from
Apr 28, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
d579c50
Support unicode emojis and remove emojify.js
mrsdizzie Apr 9, 2020
fe2bc47
add new shared function emojiHTML
silverwind Apr 13, 2020
0ede4e7
don't increase emoji size in issue title
silverwind Apr 13, 2020
6b2ce48
Update templates/repo/issue/view_content/add_reaction.tmpl
silverwind Apr 14, 2020
5a91f51
Support for emoji rendering in various templates
mrsdizzie Apr 15, 2020
4fd041c
Render code and review comments as they should be
mrsdizzie Apr 15, 2020
08c508e
Better way to handle mail subjects
mrsdizzie Apr 15, 2020
7c7c4e5
fix lint
mrsdizzie Apr 15, 2020
3224944
insert unicode from tribute selection
silverwind Apr 15, 2020
5c53378
Add template helper for plain text when needed
mrsdizzie Apr 15, 2020
f512e1a
small refactor
silverwind Apr 15, 2020
6a6705f
Use existing replace function I forgot about
mrsdizzie Apr 15, 2020
337d44f
Don't include emoji greater than Unicode Version 12
mrsdizzie Apr 15, 2020
bdd6aea
Fix regex
mrsdizzie Apr 16, 2020
6393a91
Update build/generate-emoji.go
lafriks Apr 16, 2020
7879f7c
Tweak regex slightly to really match everything including random invi…
mrsdizzie Apr 17, 2020
c2bed68
final updates
mrsdizzie Apr 17, 2020
d9ad9fc
last test fix
mrsdizzie Apr 17, 2020
f416214
code review
mrsdizzie Apr 17, 2020
4618afc
code review
mrsdizzie Apr 17, 2020
b4ca18b
hard code gitea custom emoji to match previous behavior
mrsdizzie Apr 17, 2020
40787b4
Merge branch 'master' into emoji
guillep2k Apr 18, 2020
57d4c5d
Merge branch 'master' into emoji
lafriks Apr 18, 2020
ebfb65e
Merge branch 'master' into emoji
lafriks Apr 19, 2020
17dfefc
Merge branch 'master' into emoji
lafriks Apr 19, 2020
d989ee7
Merge branch 'master' into emoji
mrsdizzie Apr 19, 2020
3ce33c7
Merge branch 'master' into emoji
guillep2k Apr 19, 2020
ff80057
test trying to add these files back
mrsdizzie Apr 20, 2020
e4793de
Merge branch 'master' into emoji
mrsdizzie Apr 20, 2020
77a41ec
attempt to remove useless frontend builds
silverwind Apr 20, 2020
9f6b7b4
Revert "attempt to remove useless frontend builds"
silverwind Apr 20, 2020
eb9c9c2
Add some debugging code to test if disk write being limited during tests
mrsdizzie Apr 21, 2020
4f0092d
more debugging
mrsdizzie Apr 21, 2020
b6ad60c
more debugging try to limit what drone does while testing
mrsdizzie Apr 21, 2020
673f31d
drone fix
mrsdizzie Apr 21, 2020
6b1123c
remove dep
mrsdizzie Apr 21, 2020
d6d0c02
try one more time
mrsdizzie Apr 21, 2020
2008ef4
fix
mrsdizzie Apr 21, 2020
db6bf37
yet more debugging
mrsdizzie Apr 21, 2020
f7e9e60
typo
mrsdizzie Apr 21, 2020
d62518b
drone testing
mrsdizzie Apr 22, 2020
41beece
typo
mrsdizzie Apr 22, 2020
8f0628f
revert debugging changes
mrsdizzie Apr 22, 2020
9c081af
change from master that got lost in rebases
mrsdizzie Apr 22, 2020
2b4bfa4
Merge branch 'master' into emoji
mrsdizzie Apr 22, 2020
147f226
formatting error
mrsdizzie Apr 22, 2020
0153bd2
Merge branch 'master' into emoji
mrsdizzie Apr 22, 2020
0304aee
Update .eslintrc
mrsdizzie Apr 22, 2020
e18f275
Merge branch 'master' into emoji
mrsdizzie Apr 23, 2020
49dfdcc
another debugging attempt
mrsdizzie Apr 23, 2020
c00a209
better way to track slow time
mrsdizzie Apr 24, 2020
d1755cb
remove debugging of debugging
mrsdizzie Apr 24, 2020
4264061
lint
mrsdizzie Apr 24, 2020
af89bc1
expand to push command
mrsdizzie Apr 24, 2020
00d5ba2
add hook logging
mrsdizzie Apr 24, 2020
0a9804e
Merge branch 'master' into emoji
mrsdizzie Apr 24, 2020
a33d6d1
one more
mrsdizzie Apr 24, 2020
81e28d2
get a better idea if gitea is really exiting after running hook
mrsdizzie Apr 24, 2020
0fb103a
Merge branch 'master' into emoji
mrsdizzie Apr 24, 2020
a0038cc
fmt
mrsdizzie Apr 24, 2020
65f7595
revert last change it doesn't work as it does on my machine
mrsdizzie Apr 24, 2020
16571c2
try different way to get time
mrsdizzie Apr 25, 2020
9bfaf86
more logging
mrsdizzie Apr 25, 2020
8adbbe7
more log
mrsdizzie Apr 25, 2020
bc43a5f
time init
mrsdizzie Apr 25, 2020
6b46b8c
trace all init calls
mrsdizzie Apr 26, 2020
c56b526
not these
mrsdizzie Apr 26, 2020
92af022
almost
mrsdizzie Apr 26, 2020
4d1cd05
less logging
mrsdizzie Apr 26, 2020
952ee78
debug
mrsdizzie Apr 26, 2020
36cd227
debug
mrsdizzie Apr 26, 2020
6fff0dd
drone
mrsdizzie Apr 26, 2020
f0d6c16
drone
mrsdizzie Apr 26, 2020
1e25d2f
more init log
mrsdizzie Apr 26, 2020
2b36fc0
less logging
mrsdizzie Apr 26, 2020
51017ab
debug
mrsdizzie Apr 26, 2020
2d369fa
debug
mrsdizzie Apr 26, 2020
54e1a8c
undo last change it was not that
mrsdizzie Apr 26, 2020
a55332b
strace
mrsdizzie Apr 26, 2020
acc19ec
trace all hooks
mrsdizzie Apr 26, 2020
0ef92ba
more trace
mrsdizzie Apr 26, 2020
c5c13ac
see if related to preemptive scheduling
mrsdizzie Apr 27, 2020
4b9e43c
lint
mrsdizzie Apr 27, 2020
7cd7afe
goproxy
mrsdizzie Apr 27, 2020
608e5ca
remove emoji init
mrsdizzie Apr 27, 2020
252787b
try again
mrsdizzie Apr 27, 2020
2490f18
fmt
mrsdizzie Apr 27, 2020
d31d7bd
really fix lint
mrsdizzie Apr 27, 2020
d4c9b75
remove some debugging code
mrsdizzie Apr 28, 2020
0c58b15
more cleanup
mrsdizzie Apr 28, 2020
144c78e
Merge branch 'master' into emoji
mrsdizzie Apr 28, 2020
080f5e6
different logging
mrsdizzie Apr 28, 2020
53e3abb
disable preempt
mrsdizzie Apr 28, 2020
8317565
more debug undoing
mrsdizzie Apr 28, 2020
cf1ec0e
Merge branch 'master' into emoji
mrsdizzie Apr 28, 2020
24545a7
more cleanup
mrsdizzie Apr 28, 2020
9ebb307
Merge branch 'master' into emoji
mrsdizzie Apr 28, 2020
3473119
delete all emojify files
mrsdizzie Apr 28, 2020
82caeb3
ci
mrsdizzie Apr 28, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
more debug undoing
  • Loading branch information
mrsdizzie committed Apr 28, 2020
commit 83175656413d9ee2646db7c5f497a197452c8241
18 changes: 2 additions & 16 deletions cmd/hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,7 @@ func (n *nilWriter) WriteString(s string) (int, error) {
}

func runHookPreReceive(c *cli.Context) error {
start := time.Now()
fmt.Printf("%v running runHookPreReceive\n", time.Now().Format("15:04:05.000000"))
if os.Getenv(models.EnvIsInternal) == "true" {
fmt.Printf("%v internal\n", time.Now().Format("15:04:05.000000"))
fmt.Printf("\ttime taken: %v\n\n", time.Since(start))
return nil
}

Expand Down Expand Up @@ -268,26 +264,18 @@ Gitea or set your environment appropriately.`, "")
fmt.Fprintf(out, "\n")
lastline = 0
}
fmt.Printf("\ttime taken: %v\n\n", time.Since(start))

fmt.Fprintf(out, "Checked %d references in total\n", total)
return nil
}

func runHookUpdate(c *cli.Context) error {
// Update is empty and is kept only for backwards compatibility
start := time.Now()
fmt.Printf("%v\t running hookUpdate\n", time.Now().Format("15:04:05.000000"))
fmt.Printf("\ttime taken: %v\n\n", time.Since(start))
return nil
}

func runHookPostReceive(c *cli.Context) error {
start := time.Now()
fmt.Printf("%v running hookPostReceive\n", time.Now().Format("15:04:05.000000"))

if os.Getenv(models.EnvIsInternal) == "true" {
fmt.Printf("%v internal\n", time.Now().Format("15:04:05.000000"))
fmt.Printf("hook post-receive time taken: %v\n\n", time.Since(start))
return nil
}

Expand Down Expand Up @@ -362,12 +350,10 @@ Gitea or set your environment appropriately.`, "")
total++

if count >= hookBatchSize {
fmt.Printf("%v\t processing references\n", time.Now().Format("15:04:05.000000"))
fmt.Fprintf(out, " Processing %d references\n", count)
hookOptions.OldCommitIDs = oldCommitIDs
hookOptions.NewCommitIDs = newCommitIDs
hookOptions.RefFullNames = refFullNames
fmt.Printf("%v\t checking private.HookPostReceive", time.Now().Format("15:04:05.000000"))
resp, err := private.HookPostReceive(repoUser, repoName, hookOptions)
if resp == nil {
_ = dWriter.Close()
Expand Down Expand Up @@ -421,7 +407,7 @@ Gitea or set your environment appropriately.`, "")
}
_ = dWriter.Close()
hookPrintResults(results)
fmt.Printf("hook post-receive time taken: %v\n\n", time.Since(start))

return nil
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env bash
"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" pre-receive
"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" pre-receive
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
#!/usr/bin/env bash
"$GITEA_ROOT/gitea" hook --config="$GITEA_ROOT/$GITEA_CONF" post-receive

10 changes: 1 addition & 9 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"os"
"runtime"
"strings"
"time"

"code.gitea.io/gitea/cmd"
"code.gitea.io/gitea/modules/log"
Expand Down Expand Up @@ -39,22 +38,16 @@ var (
)

func init() {
start := time.Now()
fmt.Printf("\t%v gitea init()\n", time.Now().Format("15:04:05.000000"))
setting.AppVer = Version
setting.AppBuiltWith = formatBuiltWith()

// Grab the original help templates
originalAppHelpTemplate = cli.AppHelpTemplate
originalCommandHelpTemplate = cli.CommandHelpTemplate
originalSubcommandHelpTemplate = cli.SubcommandHelpTemplate
fmt.Printf("\ttime taken: %v\n\n", time.Since(start))
}

func main() {
var err error
start := time.Now()
fmt.Printf("%v Gitea main()\n", time.Now().Format("15:04:05.000000"))
app := cli.NewApp()
app.Name = "Gitea"
app.Usage = "A painless self-hosted Git service"
Expand Down Expand Up @@ -113,11 +106,10 @@ arguments - which can alternatively be run by running the subcommand web.`
setFlagsAndBeforeOnSubcommands(&app.Commands[i], defaultFlags, establishCustomPath)
}

err = app.Run(os.Args)
err := app.Run(os.Args)
if err != nil {
log.Fatal("Failed to run app with %s: %v", os.Args, err)
}
fmt.Printf("\ttime taken: %v\n\n", time.Since(start))
}

func setFlagsAndBeforeOnSubcommands(command *cli.Command, defaultFlags []cli.Flag, before cli.BeforeFunc) {
Expand Down
7 changes: 0 additions & 7 deletions modules/queue/unique_queue_wrapped.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ type WrappedUniqueQueue struct {
// task cannot be processed twice or more at the same time. Uniqueness is
// only guaranteed whilst the task is waiting in the queue.
func NewWrappedUniqueQueue(handle HandlerFunc, cfg, exemplar interface{}) (Queue, error) {
start := time.Now()
fmt.Printf("%v NewWrappedUniqueQueue\n", time.Now().Format("2006-01-02 15:04:05.000000"))
configInterface, err := toConfig(WrappedUniqueQueueConfiguration{}, cfg)
if err != nil {
return nil, err
Expand Down Expand Up @@ -93,7 +91,6 @@ func NewWrappedUniqueQueue(handle HandlerFunc, cfg, exemplar interface{}) (Queue
}
}
_ = GetManager().Add(queue, WrappedUniqueQueueType, config, exemplar)
fmt.Printf("\ttime taken: %v\n\n", time.Since(start))
return wrapped, nil
}

Expand Down Expand Up @@ -171,9 +168,5 @@ func (q *WrappedUniqueQueue) IsEmpty() bool {
}

func init() {
start := time.Now()
fmt.Printf("%v in unique_que_wrap init()\n", time.Now().Format("15:04:05.000000"))

queuesMap[WrappedUniqueQueueType] = NewWrappedUniqueQueue
fmt.Printf("\ttime taken: %v\n\n", time.Since(start))
}
4 changes: 0 additions & 4 deletions services/gitdiff/gitdiff.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"sort"
"strconv"
"strings"
"time"

"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/charset"
Expand Down Expand Up @@ -249,10 +248,7 @@ LOOP:
var diffMatchPatch = diffmatchpatch.New()

func init() {
start := time.Now()
fmt.Printf("%v running services/gitdiff/gitdiff.go init\n", time.Now().Format("15:04:05.000000"))
diffMatchPatch.DiffEditCost = 100
fmt.Printf("\ttime taken: %v\n\n", time.Since(start))
}

// GetComputedInlineDiffFor computes inline diff for the given line.
Expand Down