feat(web): annotate the issue tab and transition for hexcheck
- commit
- 68db1e6725ba66c4020e101661ed9efaec6a8093
- author
- brice · · 2026-10-19 05:58 UTC
- parent
- 931429b
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
2 files · +3 -0
M internal/adapters/web/issues_post.go +1 -0
| @@ -67,6 +67,7 @@ func (s *Server) issueReopen(ctx context.Context, r *http.Request) (string, stri | |||
| 67 | 67 | return s.issueTransition(ctx, r, s.cfg.Issues.Reopen) | |
| 68 | 68 | } | |
| 69 | 69 | ||
| 70 | + | //hexcheck:ignore suspicious-business-logic-in-adapter closes or reopens through the use case that owns the transition; the form only picks which | |
| 70 | 71 | func (s *Server) issueTransition(ctx context.Context, r *http.Request, do func(context.Context, domain.Principal, domain.RepoName, int64) (domain.Issue, error)) (string, string, error) { | |
| 71 | 72 | repo := r.PathValue("repo") | |
| 72 | 73 | n, err := number(r) | |
| @@ -67,6 +67,7 @@ func (s *Server) issueReopen(ctx context.Context, r *http.Request) (string, stri | |||||
| 67 | return s.issueTransition(ctx, r, s.cfg.Issues.Reopen) | 67 | return s.issueTransition(ctx, r, s.cfg.Issues.Reopen) | ||
| 68 | } | 68 | } | ||
| 69 | 69 | ||||
| 70 | + | //hexcheck:ignore suspicious-business-logic-in-adapter closes or reopens through the use case that owns the transition; the form only picks which | |||
| 70 | func (s *Server) issueTransition(ctx context.Context, r *http.Request, do func(context.Context, domain.Principal, domain.RepoName, int64) (domain.Issue, error)) (string, string, error) { | 71 | func (s *Server) issueTransition(ctx context.Context, r *http.Request, do func(context.Context, domain.Principal, domain.RepoName, int64) (domain.Issue, error)) (string, string, error) { | ||
| 71 | repo := r.PathValue("repo") | 72 | repo := r.PathValue("repo") | ||
| 72 | n, err := number(r) | 73 | n, err := number(r) | ||
M internal/adapters/web/repo.go +2 -0
| @@ -131,6 +131,8 @@ func (s *Server) openMRCount(ctx context.Context, name domain.RepoName) string { | |||
| 131 | 131 | // layout is the Layout of the pages of a repository: the sections, the ref | |
| 132 | 132 | // switcher on the head ref and the ":" targets. The caller sets the title, | |
| 133 | 133 | // the crumbs, the status and the rail. | |
| 134 | + | // | |
| 135 | + | //hexcheck:ignore suspicious-business-logic-in-adapter lists the tabs of the repository; the issues tab follows the setting, no rule is decided here | |
| 134 | 136 | func (s *Server) repoLayout(ctx context.Context, d *repoData, section string) Layout { | |
| 135 | 137 | l := s.base() | |
| 136 | 138 | l.Repo = d.name() | |
| @@ -131,6 +131,8 @@ func (s *Server) openMRCount(ctx context.Context, name domain.RepoName) string { | |||||
| 131 | // layout is the Layout of the pages of a repository: the sections, the ref | 131 | // layout is the Layout of the pages of a repository: the sections, the ref | ||
| 132 | // switcher on the head ref and the ":" targets. The caller sets the title, | 132 | // switcher on the head ref and the ":" targets. The caller sets the title, | ||
| 133 | // the crumbs, the status and the rail. | 133 | // the crumbs, the status and the rail. | ||
| 134 | + | // | |||
| 135 | + | //hexcheck:ignore suspicious-business-logic-in-adapter lists the tabs of the repository; the issues tab follows the setting, no rule is decided here | |||
| 134 | func (s *Server) repoLayout(ctx context.Context, d *repoData, section string) Layout { | 136 | func (s *Server) repoLayout(ctx context.Context, d *repoData, section string) Layout { | ||
| 135 | l := s.base() | 137 | l := s.base() | ||
| 136 | l.Repo = d.name() | 138 | l.Repo = d.name() | ||