alpha
Login
or
Join now
alice.pds.demo.boltless.dev
/
core
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
2
Pulls
1
Pipelines
more fixes for issue templates
author
Akshay
date
1 year ago
(Mar 16, 2025, 1:58 PM UTC)
commit
e780eb1a
e780eb1a9f861e3b9e6e1c29685c69b5b1ade1f2
parent
6f9e3143
6f9e31434b6504fb346a47b48be1316fdd8c1f9a
+22
-2
2 changed files
Expand all
Collapse all
Unified
Split
appview
pages
templates
repo
issues
issue.html
state
repo.go
+5
-1
appview/pages/templates/repo/issues/issue.html
View file
Reviewed
···
99
99
<button type="submit" class="btn mt-2">comment</button>
100
100
<div id="issue-comment"></div>
101
101
</form>
102
102
+
{{ else }}
103
103
+
<div class="w-full rounded p-6 drop-shadow-sm bg-white">
104
104
+
<a href="/login" class="underline">login</a> to join the discussion
105
105
+
</div>
102
106
{{ end }}
103
107
104
104
-
{{ $isIssueAuthor := eq .LoggedInUser.Did .Issue.OwnerDid }}
108
108
+
{{ $isIssueAuthor := and .LoggedInUser (eq .LoggedInUser.Did .Issue.OwnerDid) }}
105
109
{{ $isRepoCollaborator := .RepoInfo.Roles.IsCollaborator }}
106
110
{{ if or $isIssueAuthor $isRepoCollaborator }}
107
111
{{ $action := "close" }}
+17
-1
appview/state/repo.go
View file
Reviewed
···
820
820
return
821
821
}
822
822
823
823
-
if user.Did == f.OwnerDid() {
823
823
+
issue, err := db.GetIssue(s.db, f.RepoAt, issueIdInt)
824
824
+
if err != nil {
825
825
+
log.Println("failed to get issue", err)
826
826
+
s.pages.Notice(w, "issue-action", "Failed to close issue. Try again later.")
827
827
+
return
828
828
+
}
829
829
+
830
830
+
collaborators, err := f.Collaborators(r.Context(), s)
831
831
+
if err != nil {
832
832
+
log.Println("failed to fetch repo collaborators: %w", err)
833
833
+
}
834
834
+
isCollaborator := slices.ContainsFunc(collaborators, func(collab pages.Collaborator) bool {
835
835
+
return user.Did == collab.Did
836
836
+
})
837
837
+
isIssueOwner := user.Did == issue.OwnerDid
838
838
+
839
839
+
if isCollaborator || isIssueOwner {
824
840
err := db.ReopenIssue(s.db, f.RepoAt, issueIdInt)
825
841
if err != nil {
826
842
log.Println("failed to reopen issue", err)