mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 02:38:35 +00:00
Reference issues from pull requests and other issues (#8137)
* Update ref comment * Generate comment on simple ref * Make fmt + remove unneeded repo load * Add TODO comments * Add ref-check in issue creation; re-arrange template * Make unit tests pass; rearrange code * Make fmt * Filter out xref comment if user can't see the referencing issue * Add TODOs * Add cross reference * Rearrange code; add cross-repository references * Striketrhough obsolete references * Remove unnecesary TODO * Add "not supported" note * Support for edits and deletes, and issue title * Revert changes to go.mod * Fix fmt * Add support for xref from API * Add first integration test * Add integration tests * Correct formatting * Fix add comment test * Add migration * Remove outdated comments; fix typo * Some code refactoring and rearranging * Rename findCrossReferences to createCrossReferences * Delete xrefs when repository is deleted * Corrections as suggested by @lafriks * Prepare for merge * Fix log for errors
This commit is contained in:
committed by
techknowlogick
parent
8a0379d68a
commit
2a2b46c62e
@@ -96,6 +96,34 @@
|
||||
</a>
|
||||
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a> {{$.i18n.Tr "repo.issues.closed_at" .EventTag $createdStr | Safe}}</span>
|
||||
</div>
|
||||
{{else if or (eq .Type 3) (eq .Type 5) (eq .Type 6)}}
|
||||
<div class="event">
|
||||
<span class="octicon octicon-bookmark"></span>
|
||||
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
||||
<img src="{{.Poster.RelAvatarLink}}">
|
||||
</a>
|
||||
{{if eq .RefAction 3}}<del>{{end}}
|
||||
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
|
||||
{{if (eq .RefRepoID .Issue.RepoID)}}
|
||||
{{if .Issue.IsPull}}
|
||||
<a href="{{.RefCommentHTMLURL}}">{{$.i18n.Tr "repo.issues.ref_pull_at" $createdStr | Safe}}</a>
|
||||
{{else}}
|
||||
<a href="{{.RefCommentHTMLURL}}">{{$.i18n.Tr "repo.issues.ref_issue_at" $createdStr | Safe}}</a>
|
||||
{{end}}
|
||||
{{else}}
|
||||
{{if .Issue.IsPull}}
|
||||
<a href="{{.RefCommentHTMLURL}}">{{$.i18n.Tr "repo.issues.ref_pull_ext_at" .RefRepo.FullName $createdStr | Safe}}</a>
|
||||
{{else}}
|
||||
<a href="{{.RefCommentHTMLURL}}">{{$.i18n.Tr "repo.issues.ref_issue_ext_at" .RefRepo.FullName $createdStr | Safe}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</span>
|
||||
{{if eq .RefAction 3}}</del>{{end}}
|
||||
|
||||
<div class="detail">
|
||||
<span class="text grey"><a href="{{.RefIssueHTMLURL}}"><b>{{.RefIssueTitle | Str2html}}</b> {{.RefIssueIdent | Str2html}}</a></span>
|
||||
</div>
|
||||
</div>
|
||||
{{else if eq .Type 4}}
|
||||
<div class="event">
|
||||
<span class="octicon octicon-bookmark"></span>
|
||||
|
Reference in New Issue
Block a user