Skip to content

Commit b4eac75

Browse files
committed
Some improvements
1 parent 2361ec5 commit b4eac75

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

options/locale/locale_en-US.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,6 +1625,9 @@ issues.label.filter_sort.reverse_by_size = Largest size
16251625
issues.development = Development
16261626
issues.maybefixed = May be fixed by %s
16271627
issues.create_branch_from_issue_success = Create branch %s from issue successfully
1628+
issues.pr.completed = Completed
1629+
issues.pr.conflicted = Merge conflicts
1630+
issues.link.created = Created %s
16281631
issues.num_participants = %d Participants
16291632
issues.attachment.open_tab = `Click to see "%s" in a new tab`
16301633
issues.attachment.download = `Click to download "%s"`

routers/web/repo/branch.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ func handleCreateBranchError(ctx *context.Context, err error, form *forms.NewBra
221221
}
222222

223223
ctx.ServerError("CreateNewBranch", err)
224-
return
225224
}
226225

227226
// CreateBranch creates new branch in repository

routers/web/repo/issue_dev.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ func CreateBranchFromIssue(ctx *context.Context) {
9595
}
9696

9797
if err := issues_model.CreateIssueDevLink(ctx, &issues_model.IssueDevLink{
98-
IssueID: issue.ID,
99-
LinkType: issues_model.IssueDevLinkTypeBranch,
98+
IssueID: issue.ID,
99+
LinkType: issues_model.IssueDevLinkTypeBranch,
100100
LinkedRepoID: repo.ID,
101-
LinkIndex: form.NewBranchName,
101+
LinkIndex: form.NewBranchName,
102102
}); err != nil {
103103
ctx.ServerError("CreateIssueDevLink", err)
104104
return

templates/repo/issue/view_content/sidebar_development.tmpl

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@
1111
</a>
1212
</span>
1313
<div>
14-
Created {{DateTime "short" .PullRequest.Issue.CreatedUnix}}
14+
{{ctx.Locale.Tr "repo.issues.link.created" (DateTime "short" .PullRequest.Issue.CreatedUnix)}}
1515
{{if .PullRequest.HasMerged}}
16-
Completed
17-
{{.PullRequest.MergedCommitID}}
18-
Created {{.PullRequest.MergedUnix}}
16+
{{ctx.Locale.Tr "repo.issues.pr.completed"}}
17+
</div>
18+
<div>
19+
{{svg "octicon-git-commit" 14}} <a href="{{.PullRequest.BaseRepo.Link}}/src/commit/{{.PullRequest.MergedCommitID}}">{{.PullRequest.MergedCommitID | ShortSha}}</a>
20+
</div>
21+
<div>
22+
{{ctx.Locale.Tr "repo.issues.link.created" (DateTime "short" .PullRequest.MergedUnix)}}
1923
{{else if .PullRequest.ChangedProtectedFiles}}
20-
Merge conflicts
24+
{{ctx.Locale.Tr "repo.issues.pr.conflicted"}}
2125
{{end}}
2226
</div>
2327
{{else if and .Branch .DisplayBranch}}

0 commit comments

Comments
 (0)