Merge remote-tracking branch 'forgejo/forgejo-dependency' into wip-forgejo
Conflicts: .forgejo/workflows/testing.yml trivial conflict
This commit is contained in:
commit
7cbf05fafb
10 changed files with 288 additions and 37 deletions
|
@ -1174,11 +1174,7 @@ func GetIssueTemplates(ctx *context.APIContext) {
|
|||
// "$ref": "#/responses/IssueTemplates"
|
||||
// "404":
|
||||
// "$ref": "#/responses/notFound"
|
||||
ret, err := issue.GetTemplatesFromDefaultBranch(ctx.Repo.Repository, ctx.Repo.GitRepo)
|
||||
if err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, "GetTemplatesFromDefaultBranch", err)
|
||||
return
|
||||
}
|
||||
ret, _ := issue.GetTemplatesFromDefaultBranch(ctx.Repo.Repository, ctx.Repo.GitRepo)
|
||||
ctx.JSON(http.StatusOK, ret)
|
||||
}
|
||||
|
||||
|
|
|
@ -77,6 +77,12 @@ var IssueTemplateCandidates = []string{
|
|||
"issue_template.md",
|
||||
"issue_template.yaml",
|
||||
"issue_template.yml",
|
||||
".forgejo/ISSUE_TEMPLATE.md",
|
||||
".forgejo/ISSUE_TEMPLATE.yaml",
|
||||
".forgejo/ISSUE_TEMPLATE.yml",
|
||||
".forgejo/issue_template.md",
|
||||
".forgejo/issue_template.yaml",
|
||||
".forgejo/issue_template.yml",
|
||||
".gitea/ISSUE_TEMPLATE.md",
|
||||
".gitea/ISSUE_TEMPLATE.yaml",
|
||||
".gitea/ISSUE_TEMPLATE.yml",
|
||||
|
|
|
@ -65,6 +65,12 @@ var pullRequestTemplateCandidates = []string{
|
|||
"pull_request_template.md",
|
||||
"pull_request_template.yaml",
|
||||
"pull_request_template.yml",
|
||||
".forgejo/PULL_REQUEST_TEMPLATE.md",
|
||||
".forgejo/PULL_REQUEST_TEMPLATE.yaml",
|
||||
".forgejo/PULL_REQUEST_TEMPLATE.yml",
|
||||
".forgejo/pull_request_template.md",
|
||||
".forgejo/pull_request_template.yaml",
|
||||
".forgejo/pull_request_template.yml",
|
||||
".gitea/PULL_REQUEST_TEMPLATE.md",
|
||||
".gitea/PULL_REQUEST_TEMPLATE.yaml",
|
||||
".gitea/PULL_REQUEST_TEMPLATE.yml",
|
||||
|
|
|
@ -94,6 +94,10 @@ func findReadmeFileInEntries(ctx *context.Context, entries []*git.TreeEntry, try
|
|||
if entry.Name() == "docs" || docsEntries[0] == nil {
|
||||
docsEntries[0] = entry
|
||||
}
|
||||
case ".forgejo":
|
||||
if entry.Name() == ".forgejo" || docsEntries[1] == nil {
|
||||
docsEntries[1] = entry
|
||||
}
|
||||
case ".gitea":
|
||||
if entry.Name() == ".gitea" || docsEntries[1] == nil {
|
||||
docsEntries[1] = entry
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue