mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-26 06:16:56 +09:00
enhance(repo): prefill new issue and pull request sidebars from query parameters (#39804)
Links to the new issue and new pull request pages can preselect sidebar values with the same query parameters as the issue list filters: `labels`, `milestone`, `project` and `assignee`, each taking comma-separated IDs, e.g. `compare/main...branch?labels=1,2&assignee=3`. Previously, pull requests supported none of them and issues only `milestone` and `project`. On the compare page they also expand the new pull request form, like `title` and `body`. Query values take precedence over issue template labels and assignees. * Fix https://github.com/go-gitea/gitea/issues/27341 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
1 parent
0081bd8430
commit
31626de2a6
7 files changed
+240
-24
No files matched your search
@@ -12,6 +12,7 @@ import (
|
||||
"fmt"
|
||||
"hash"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"gitea.dev/modules/setting"
|
||||
@@ -117,3 +118,7 @@ func Int64sToStrings(ints []int64) []string {
|
||||
}
|
||||
return strs
|
||||
}
|
||||
|
||||
func JoinInt64s(ints []int64, sep string) string {
|
||||
return strings.Join(Int64sToStrings(ints), sep)
|
||||
}
|
||||
Reference in new issue
Block a user