Monorepo for Tangled tangled.org
856
fork

Configure Feed

Select the types of activity you want to include in your feed.

appview: handlers, state, and templates for more record types w/ repoDID #279

open opened by oyster.cafe targeting master from lt/repo-rename-by-rkey

Lewis: May this revision serve well! lewis@tangled.org

appview,knotserver: validate git repo ownership according to knot

Lewis: May this revision serve well! lewis@tangled.org

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:3fwecdnvtcscjnrx2p4n7alz/sh.tangled.repo.pull/3mjm6w2jhaa22
+14 -12
Interdiff #7 #8
appview/db/notifications.go

This file has not been changed.

appview/issues/issues.go

This file has not been changed.

appview/labels/labels.go

This file has not been changed.

appview/middleware/middleware.go

This file has not been changed.

appview/models/repo.go

This file has not been changed.

appview/pages/repoinfo/repoinfo.go

This file has not been changed.

appview/pages/templates/goodfirstissues/index.html

This file has not been changed.

appview/pages/templates/knots/dashboard.html

This file has not been changed.

appview/pages/templates/layouts/repobase.html

This file has not been changed.

appview/pages/templates/notifications/fragments/item.html

This file has not been changed.

appview/pages/templates/repo/empty.html

This file has not been changed.

appview/pages/templates/repo/fragments/cloneDropdown.html

This file has not been changed.

appview/pages/templates/repo/index.html

This file has not been changed.

appview/pages/templates/repo/pulls/fragments/pullActions.html

This file has not been changed.

appview/pages/templates/repo/pulls/fragments/pullHeader.html

This file has not been changed.

appview/pages/templates/repo/pulls/pull.html

This patch was likely rebased, as context lines do not match.

appview/pages/templates/repo/settings/hooks.html

This file has not been changed.

appview/pages/templates/repo/settings/sites.html

This file has not been changed.

appview/pages/templates/spindles/dashboard.html

This file has not been changed.

appview/pages/templates/timeline/fragments/preview.html

This file has not been changed.

appview/pages/templates/timeline/fragments/timeline.html

This file has not been changed.

appview/pages/templates/user/fragments/repoCard.html

This patch was likely rebased, as context lines do not match.

+2 -2
appview/pages/templates/user/overview.html
··· 130 130 <div class="py-2 text-sm flex flex-col gap-3 mb-2"> 131 131 {{ range $items }} 132 132 {{ $repoOwner := resolve .Repo.Did }} 133 - {{ $repoName := .Repo.Rkey }} 133 + {{ $repoName := .Repo.Name }} 134 134 {{ $repoUrl := printf "%s/%s" $repoOwner $repoName }} 135 135 136 136 <div class="flex gap-2 text-gray-600 dark:text-gray-300"> ··· 199 199 <div class="py-2 text-sm flex flex-col gap-3 mb-2"> 200 200 {{ range $items }} 201 201 {{ $repoOwner := resolve .Repo.Did }} 202 - {{ $repoName := .Repo.Rkey }} 202 + {{ $repoName := .Repo.Name }} 203 203 {{ $repoUrl := printf "%s/%s" $repoOwner $repoName }} 204 204 205 205 <div class="flex gap-2 text-gray-600 dark:text-gray-300">
appview/pipelines/pipelines.go

This file has not been changed.

appview/pulls/compose_helpers_test.go

This file has not been changed.

appview/repo/artifact.go

This file has not been changed.

appview/repo/feed.go

This file has not been changed.

appview/repo/index.go

This file has not been changed.

appview/repo/opengraph.go

This file has not been changed.

appview/repo/repo.go

This file has not been changed.

appview/repo/repo_util.go

This file has not been changed.

appview/repo/router.go

This file has not been changed.

appview/repo/settings.go

This file has not been changed.

appview/repo/tags.go

This file has not been changed.

appview/repo/webhooks.go

This file has not been changed.

appview/reporesolver/resolver.go

This file has not been changed.

appview/settings/settings.go

This file has not been changed.

appview/sites/sites.go

This file has not been changed.

appview/state/knotstream.go

This file has not been changed.

+6 -6
appview/state/profile.go
··· 679 679 func (s *State) createPullRequestItem(pull *models.Pull, owner *identity.Identity, author *feeds.Author) *feeds.Item { 680 680 return &feeds.Item{ 681 681 Title: fmt.Sprintf("%s created pull request '%s' in @%s/%s", author.Name, pull.Title, owner.Handle, pull.Repo.Name), 682 - Link: &feeds.Link{Href: fmt.Sprintf("%s/@%s/%s/pulls/%d", s.config.Core.BaseUrl(), owner.Handle, pull.Repo.Rkey, pull.PullId), Type: "text/html", Rel: "alternate"}, 682 + Link: &feeds.Link{Href: fmt.Sprintf("%s/@%s/%s/pulls/%d", s.config.Core.BaseUrl(), owner.Handle, pull.Repo.Name, pull.PullId), Type: "text/html", Rel: "alternate"}, 683 683 Created: pull.Created, 684 684 Author: author, 685 685 } ··· 688 688 func (s *State) createIssueItem(issue *models.Issue, owner *identity.Identity, author *feeds.Author) *feeds.Item { 689 689 return &feeds.Item{ 690 690 Title: fmt.Sprintf("%s created issue '%s' in @%s/%s", author.Name, issue.Title, owner.Handle, issue.Repo.Name), 691 - Link: &feeds.Link{Href: fmt.Sprintf("%s/@%s/%s/issues/%d", s.config.Core.BaseUrl(), owner.Handle, issue.Repo.Rkey, issue.IssueId), Type: "text/html", Rel: "alternate"}, 691 + Link: &feeds.Link{Href: fmt.Sprintf("%s/@%s/%s/issues/%d", s.config.Core.BaseUrl(), owner.Handle, issue.Repo.Name, issue.IssueId), Type: "text/html", Rel: "alternate"}, 692 692 Created: issue.Created, 693 693 Author: author, 694 694 } ··· 708 708 709 709 return &feeds.Item{ 710 710 Title: title, 711 - Link: &feeds.Link{Href: fmt.Sprintf("%s/@%s/%s", s.config.Core.BaseUrl(), author.Name[1:], repo.Repo.Rkey), Type: "text/html", Rel: "alternate"}, // Remove @ prefix 711 + Link: &feeds.Link{Href: fmt.Sprintf("%s/@%s/%s", s.config.Core.BaseUrl(), author.Name[1:], repo.Repo.Name), Type: "text/html", Rel: "alternate"}, // Remove @ prefix 712 712 Created: repo.Repo.Created, 713 713 Author: author, 714 714 }, nil ··· 725 725 func (s *State) createPullRequestItem(pull *models.Pull, owner *identity.Identity, author *feeds.Author) *feeds.Item { 726 726 return &feeds.Item{ 727 727 Title: fmt.Sprintf("%s created pull request '%s' in @%s/%s", author.Name, pull.Title, owner.Handle, pull.Repo.Name), 728 - Link: &feeds.Link{Href: fmt.Sprintf("%s/@%s/%s/pulls/%d", s.config.Core.BaseUrl(), owner.Handle, pull.Repo.Name, pull.PullId), Type: "text/html", Rel: "alternate"}, 728 + Link: &feeds.Link{Href: fmt.Sprintf("%s/@%s/%s/pulls/%d", s.config.Core.BaseUrl(), owner.Handle, pull.Repo.Rkey, pull.PullId), Type: "text/html", Rel: "alternate"}, 729 729 Created: pull.Created, 730 730 Author: author, 731 731 } ··· 734 734 func (s *State) createIssueItem(issue *models.Issue, owner *identity.Identity, author *feeds.Author) *feeds.Item { 735 735 return &feeds.Item{ 736 736 Title: fmt.Sprintf("%s created issue '%s' in @%s/%s", author.Name, issue.Title, owner.Handle, issue.Repo.Name), 737 - Link: &feeds.Link{Href: fmt.Sprintf("%s/@%s/%s/issues/%d", s.config.Core.BaseUrl(), owner.Handle, issue.Repo.Name, issue.IssueId), Type: "text/html", Rel: "alternate"}, 737 + Link: &feeds.Link{Href: fmt.Sprintf("%s/@%s/%s/issues/%d", s.config.Core.BaseUrl(), owner.Handle, issue.Repo.Rkey, issue.IssueId), Type: "text/html", Rel: "alternate"}, 738 738 Created: issue.Created, 739 739 Author: author, 740 740 } ··· 754 754 755 755 return &feeds.Item{ 756 756 Title: title, 757 - Link: &feeds.Link{Href: fmt.Sprintf("%s/@%s/%s", s.config.Core.BaseUrl(), author.Name[1:], repo.Repo.Name), Type: "text/html", Rel: "alternate"}, // Remove @ prefix 757 + Link: &feeds.Link{Href: fmt.Sprintf("%s/@%s/%s", s.config.Core.BaseUrl(), author.Name[1:], repo.Repo.Rkey), Type: "text/html", Rel: "alternate"}, // Remove @ prefix 758 758 Created: repo.Repo.Created, 759 759 Author: author, 760 760 }, nil
appview/state/router.go

This file has not been changed.

appview/state/state.go

This file has not been changed.

appview/strings/strings.go

This file has not been changed.

+3 -2
appview/pages/templates/user/fragments/issueEvent.html
··· 1 1 {{ define "user/fragments/issueEvent" }} 2 2 {{ $repoOwner := resolve .Repo.Did }} 3 - {{ $repoUrl := printf "%s/%s" $repoOwner .Repo.Name }} 3 + {{ $repoUrl := printf "%s/%s" $repoOwner .Repo.Rkey }} 4 + {{ $repoDisplay := printf "%s/%s" $repoOwner .Repo.Name }} 4 5 <div class="flex items-center gap-2 text-gray-600 dark:text-gray-300 overflow-hidden"> 5 6 {{ if .Open }} 6 7 <span class="text-green-600 dark:text-green-500 shrink-0"> ··· 15 16 <span class="truncate"> 16 17 <a href="/{{ $repoUrl }}/issues/{{ .IssueId }}" class="no-underline hover:underline">{{- .Title -}}</a> 17 18 on 18 - <a href="/{{ $repoUrl }}" class="no-underline hover:underline">{{ $repoUrl }}</a> 19 + <a href="/{{ $repoUrl }}" class="no-underline hover:underline">{{ $repoDisplay }}</a> 19 20 </span> 20 21 </div> 21 22 {{ end }}
+3 -2
appview/pages/templates/user/fragments/pullEvent.html
··· 1 1 {{ define "user/fragments/pullEvent" }} 2 2 {{ $repoOwner := resolve .Repo.Did }} 3 - {{ $repoUrl := printf "%s/%s" $repoOwner .Repo.Name }} 3 + {{ $repoUrl := printf "%s/%s" $repoOwner .Repo.Rkey }} 4 + {{ $repoDisplay := printf "%s/%s" $repoOwner .Repo.Name }} 4 5 <div class="flex items-center gap-2 text-gray-600 dark:text-gray-300 overflow-hidden"> 5 6 {{ if .State.IsOpen }} 6 7 <span class="text-green-600 dark:text-green-500 shrink-0"> ··· 19 20 <span class="truncate"> 20 21 <a href="/{{ $repoUrl }}/pulls/{{ .PullId }}" class="no-underline hover:underline">{{- .Title -}}</a> 21 22 on 22 - <a href="/{{ $repoUrl }}" class="no-underline hover:underline">{{ $repoUrl }}</a> 23 + <a href="/{{ $repoUrl }}" class="no-underline hover:underline">{{ $repoDisplay }}</a> 23 24 </span> 24 25 </div> 25 26 {{ end }}

History

9 rounds 0 comments
sign up or login to add to the discussion
1 commit
expand
appview: handlers, state, and templates for more record types w/ repoDID
merge conflicts detected
expand
  • api/tangled/cbor_gen.go:866
  • api/tangled/feedstar.go:5
  • api/tangled/gitrefUpdate.go:29
  • api/tangled/repocollaborator.go:19
  • api/tangled/repoissue.go:22
  • api/tangled/repopull.go:39
  • api/tangled/tangledrepo.go:24
  • cmd/cborgen/cborgen.go:17
  • knotserver/xrpc/merge.go:118
  • lexicons/feed/star.json:10
  • lexicons/git/refUpdate.json:11
  • lexicons/issue/issue.json:9
  • lexicons/pulls/pull.json:65
  • lexicons/repo/collaborator.json:11
  • lexicons/repo/repo.json:6
expand 0 comments
1 commit
expand
appview: handlers, state, and templates for more record types w/ repoDID
expand 0 comments
1 commit
expand
appview: handlers, state, and templates for more record types w/ repoDID
expand 0 comments
1 commit
expand
appview: handlers, state, and templates for more record types w/ repoDID
expand 0 comments
1 commit
expand
appview: handlers, state, and templates for more record types w/ repoDID
expand 0 comments
1 commit
expand
appview: handlers, state, and templates for more record types w/ repoDID
expand 0 comments
1 commit
expand
appview: handlers, state, and templates for more record types w/ repoDID
expand 0 comments
1 commit
expand
appview: handlers, state, and templates for more record types w/ repoDID
expand 0 comments
1 commit
expand
appview: handlers, state, and templates for more record types w/ repoDID
expand 0 comments