mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-22 00:01:17 -04:00
Compare commits
No commits in common. "4f4ddcf3c593b474846d40e47b4351d3deb39202" and "572f0963edc71239634ee782a3c69213479f34ba" have entirely different histories.
4f4ddcf3c5
...
572f0963ed
@ -186,7 +186,7 @@ func applyProjectBoardCondition(sess *xorm.Session, opts *IssuesOptions) *xorm.S
|
||||
if opts.ProjectBoardID > 0 {
|
||||
sess.In("issue.id", builder.Select("issue_id").From("project_issue").Where(builder.Eq{"project_board_id": opts.ProjectBoardID}))
|
||||
} else if opts.ProjectBoardID == db.NoConditionID {
|
||||
sess.In("issue.id", builder.Select("issue_id").From("project_issue").Where(builder.Eq{"project_board_id": 0}))
|
||||
sess.In("issue.id", builder.Select("issue_id").From("project_issue").Where(builder.Neq{"project_board_id": 0}))
|
||||
}
|
||||
return sess
|
||||
}
|
||||
|
@ -382,12 +382,6 @@ func searchIssueInProject(t *testing.T) {
|
||||
},
|
||||
[]int64{1},
|
||||
},
|
||||
{
|
||||
SearchOptions{
|
||||
ProjectBoardID: int64Pointer(0), // issue with in default board
|
||||
},
|
||||
[]int64{2},
|
||||
},
|
||||
}
|
||||
for _, test := range tests {
|
||||
issueIDs, _, err := SearchIssues(context.TODO(), &test.opts)
|
||||
|
@ -32,7 +32,7 @@ func NewHashedBuffer() (*HashedBuffer, error) {
|
||||
return NewHashedBufferWithSize(DefaultMemorySize)
|
||||
}
|
||||
|
||||
// NewHashedBufferWithSize creates a hashed buffer with a specific memory size
|
||||
// NewHashedBuffer creates a hashed buffer with a specific memory size
|
||||
func NewHashedBufferWithSize(maxMemorySize int) (*HashedBuffer, error) {
|
||||
b, err := filebuffer.New(maxMemorySize)
|
||||
if err != nil {
|
||||
|
@ -110,6 +110,9 @@ write = Write
|
||||
preview = Preview
|
||||
loading = Loading…
|
||||
|
||||
step1 = Step 1:
|
||||
step2 = Step 2:
|
||||
|
||||
error = Error
|
||||
error404 = The page you are trying to reach either <strong>does not exist</strong> or <strong>you are not authorized</strong> to view it.
|
||||
go_back = Go Back
|
||||
@ -726,7 +729,7 @@ add_email_success = The new email address has been added.
|
||||
email_preference_set_success = Email preference has been set successfully.
|
||||
add_openid_success = The new OpenID address has been added.
|
||||
keep_email_private = Hide Email Address
|
||||
keep_email_private_popup = This will hide your email address from your profile, as well as when you make a pull request or edit a file using the web interface. Pushed commits will not be modified. Use %s in commits to associate them with your account.
|
||||
keep_email_private_popup = This will hide your email address from your profile, as well as when you make a pull request or edit a file using the web interface. Pushed commits will not be modified.
|
||||
openid_desc = OpenID lets you delegate authentication to an external provider.
|
||||
|
||||
manage_ssh_keys = Manage SSH Keys
|
||||
@ -1794,11 +1797,9 @@ pulls.outdated_with_base_branch = This branch is out-of-date with the base branc
|
||||
pulls.close = Close Pull Request
|
||||
pulls.closed_at = `closed this pull request <a id="%[1]s" href="#%[1]s">%[2]s</a>`
|
||||
pulls.reopened_at = `reopened this pull request <a id="%[1]s" href="#%[1]s">%[2]s</a>`
|
||||
pulls.cmd_instruction_hint = `View <a class="show-instruction">command line instructions</a>.`
|
||||
pulls.cmd_instruction_checkout_title = Checkout
|
||||
pulls.cmd_instruction_checkout_desc = From your project repository, check out a new branch and test the changes.
|
||||
pulls.cmd_instruction_merge_title = Merge
|
||||
pulls.cmd_instruction_merge_desc = Merge the changes and update on Gitea.
|
||||
pulls.merge_instruction_hint = `You can also view <a class="show-instruction">command line instructions</a>.`
|
||||
pulls.merge_instruction_step1_desc = From your project repository, check out a new branch and test the changes.
|
||||
pulls.merge_instruction_step2_desc = Merge the changes and update on Gitea.
|
||||
pulls.clear_merge_message = Clear merge message
|
||||
pulls.clear_merge_message_hint = Clearing the merge message will only remove the commit message content and keep generated git trailers such as "Co-Authored-By …".
|
||||
|
||||
@ -2856,7 +2857,7 @@ emails.updated = Email updated
|
||||
emails.not_updated = Failed to update the requested email address: %v
|
||||
emails.duplicate_active = This email address is already active for a different user.
|
||||
emails.change_email_header = Update Email Properties
|
||||
emails.change_email_text = Are you sure you want to update this email address?
|
||||
emails.change_email_text = Are your sure you want to update this email address?
|
||||
|
||||
orgs.org_manage_panel = Organization Management
|
||||
orgs.name = Name
|
||||
|
@ -276,10 +276,6 @@ func NewTeam(ctx *context.Context) {
|
||||
ctx.Data["PageIsOrgTeamsNew"] = true
|
||||
ctx.Data["Team"] = &org_model.Team{}
|
||||
ctx.Data["Units"] = unit_model.Units
|
||||
if err := shared_user.LoadHeaderCount(ctx); err != nil {
|
||||
ctx.ServerError("LoadHeaderCount", err)
|
||||
return
|
||||
}
|
||||
ctx.HTML(http.StatusOK, tplTeamNew)
|
||||
}
|
||||
|
||||
@ -467,10 +463,6 @@ func EditTeam(ctx *context.Context) {
|
||||
ctx.ServerError("LoadUnits", err)
|
||||
return
|
||||
}
|
||||
if err := shared_user.LoadHeaderCount(ctx); err != nil {
|
||||
ctx.ServerError("LoadHeaderCount", err)
|
||||
return
|
||||
}
|
||||
ctx.Data["Team"] = ctx.Org.Team
|
||||
ctx.Data["Units"] = unit_model.Units
|
||||
ctx.HTML(http.StatusOK, tplTeamNew)
|
||||
|
@ -238,8 +238,6 @@ func buildPackagesIndex(ctx context.Context, ownerID int64, repoVersion *package
|
||||
}
|
||||
|
||||
unsignedIndexContent, _ := packages_module.NewHashedBuffer()
|
||||
defer unsignedIndexContent.Close()
|
||||
|
||||
h := sha1.New()
|
||||
|
||||
if err := writeGzipStream(io.MultiWriter(unsignedIndexContent, h), "APKINDEX", buf.Bytes(), true); err != nil {
|
||||
@ -277,7 +275,6 @@ func buildPackagesIndex(ctx context.Context, ownerID int64, repoVersion *package
|
||||
}
|
||||
|
||||
signedIndexContent, _ := packages_module.NewHashedBuffer()
|
||||
defer signedIndexContent.Close()
|
||||
|
||||
if err := writeGzipStream(
|
||||
signedIndexContent,
|
||||
|
@ -196,16 +196,11 @@ func buildPackagesIndices(ctx context.Context, ownerID int64, repoVersion *packa
|
||||
}
|
||||
|
||||
packagesContent, _ := packages_module.NewHashedBuffer()
|
||||
defer packagesContent.Close()
|
||||
|
||||
packagesGzipContent, _ := packages_module.NewHashedBuffer()
|
||||
defer packagesGzipContent.Close()
|
||||
|
||||
gzw := gzip.NewWriter(packagesGzipContent)
|
||||
|
||||
packagesXzContent, _ := packages_module.NewHashedBuffer()
|
||||
defer packagesXzContent.Close()
|
||||
|
||||
xzw, _ := xz.NewWriter(packagesXzContent)
|
||||
|
||||
w := io.MultiWriter(packagesContent, gzw, xzw)
|
||||
@ -328,8 +323,6 @@ func buildReleaseFiles(ctx context.Context, ownerID int64, repoVersion *packages
|
||||
}
|
||||
|
||||
inReleaseContent, _ := packages_module.NewHashedBuffer()
|
||||
defer inReleaseContent.Close()
|
||||
|
||||
sw, err := clearsign.Encode(inReleaseContent, e.PrivateKey, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
@ -374,14 +367,11 @@ func buildReleaseFiles(ctx context.Context, ownerID int64, repoVersion *packages
|
||||
sw.Close()
|
||||
|
||||
releaseGpgContent, _ := packages_module.NewHashedBuffer()
|
||||
defer releaseGpgContent.Close()
|
||||
|
||||
if err := openpgp.ArmoredDetachSign(releaseGpgContent, e, bytes.NewReader(buf.Bytes()), nil); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
releaseContent, _ := packages_module.CreateHashedBufferFromReader(&buf)
|
||||
defer releaseContent.Close()
|
||||
|
||||
for _, file := range []struct {
|
||||
Name string
|
||||
|
@ -258,14 +258,11 @@ func buildRepomd(ctx context.Context, pv *packages_model.PackageVersion, ownerID
|
||||
}
|
||||
|
||||
repomdAscContent, _ := packages_module.NewHashedBuffer()
|
||||
defer repomdAscContent.Close()
|
||||
|
||||
if err := openpgp.ArmoredDetachSign(repomdAscContent, e, bytes.NewReader(buf.Bytes()), nil); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
repomdContent, _ := packages_module.CreateHashedBufferFromReader(&buf)
|
||||
defer repomdContent.Close()
|
||||
|
||||
for _, file := range []struct {
|
||||
Name string
|
||||
@ -551,8 +548,6 @@ func (wc *writtenCounter) Written() int64 {
|
||||
|
||||
func addDataAsFileToRepo(ctx context.Context, pv *packages_model.PackageVersion, filetype string, obj any) (*repoData, error) {
|
||||
content, _ := packages_module.NewHashedBuffer()
|
||||
defer content.Close()
|
||||
|
||||
gzw := gzip.NewWriter(content)
|
||||
wc := &writtenCounter{}
|
||||
h := sha256.New()
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="ui container">
|
||||
<div class="ui vertically grid head">
|
||||
<div class="column">
|
||||
<div class="ui header gt-df gt-ac gt-word-break">
|
||||
<div class="ui header">
|
||||
{{ctx.AvatarUtils.Avatar . 100}}
|
||||
<span class="text thin grey"><a href="{{.HomeLink}}">{{.DisplayName}}</a></span>
|
||||
<span class="org-visibility">
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div class="ui container gt-df">
|
||||
{{ctx.AvatarUtils.Avatar .Org 140 "org-avatar"}}
|
||||
<div id="org-info">
|
||||
<div class="ui header">
|
||||
<div class="ui header gt-df gt-fw">
|
||||
{{.Org.DisplayName}}
|
||||
<span class="org-visibility">
|
||||
{{if .Org.Visibility.IsLimited}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</span>{{end}}
|
||||
|
@ -37,7 +37,7 @@
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="ui bottom attached header">
|
||||
<p class="team-meta"><a class="muted" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}">{{.NumMembers}} {{ctx.Locale.Tr "org.lower_members"}}</a> · <a class="muted" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/repositories">{{.NumRepos}} {{ctx.Locale.Tr "org.lower_repositories"}}</a></p>
|
||||
<p class="team-meta">{{.NumMembers}} {{ctx.Locale.Tr "org.lower_members"}} · {{.NumRepos}} {{ctx.Locale.Tr "org.lower_repositories"}}</p>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
@ -38,7 +38,7 @@
|
||||
</div>
|
||||
{{else}}
|
||||
{{if not .HasPackages}}
|
||||
<div class="empty-placeholder">
|
||||
<div class="empty center">
|
||||
{{svg "octicon-package" 48}}
|
||||
<h2>{{ctx.Locale.Tr "packages.empty"}}</h2>
|
||||
{{if and .Repository .CanWritePackages}}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div class="flex-list">
|
||||
{{if eq (len .Runs) 0}}
|
||||
<div class="empty-placeholder">
|
||||
<div class="empty center">
|
||||
{{svg "octicon-no-entry" 48}}
|
||||
<h2>{{if $.IsFiltered}}{{ctx.Locale.Tr "actions.runs.no_results"}}{{else}}{{ctx.Locale.Tr "actions.runs.no_runs"}}{{end}}</h2>
|
||||
</div>
|
||||
|
@ -372,8 +372,8 @@
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{if and .Issue.PullRequest.HeadRepo (not .Issue.PullRequest.HasMerged) (not .Issue.IsClosed)}}
|
||||
{{template "repo/issue/view_content/pull_merge_instruction" dict "PullRequest" .Issue.PullRequest "ShowMergeInstructions" .ShowMergeInstructions}}
|
||||
{{if and .ShowMergeInstructions .Issue.PullRequest.HeadRepo (not .Issue.PullRequest.HasMerged) (not .Issue.IsClosed)}}
|
||||
{{template "repo/issue/view_content/pull_merge_instruction" .Issue.PullRequest}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,45 +1,19 @@
|
||||
<div class="divider"></div>
|
||||
<div class="instruct-toggle"> {{ctx.Locale.Tr "repo.pulls.cmd_instruction_hint" | Safe}} </div>
|
||||
<div class="instruct-toggle"> {{ctx.Locale.Tr "repo.pulls.merge_instruction_hint" | Safe}} </div>
|
||||
<div class="instruct-content gt-mt-3 gt-hidden">
|
||||
<div><h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_title"}}</h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_desc"}}</div>
|
||||
{{$localBranch := .PullRequest.HeadBranch}}
|
||||
{{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}}
|
||||
{{$localBranch = print .PullRequest.HeadRepo.OwnerName "-" .PullRequest.HeadBranch}}
|
||||
{{end}}
|
||||
<div><h3 class="gt-dib">{{ctx.Locale.Tr "step1"}}</h3> {{ctx.Locale.Tr "repo.pulls.merge_instruction_step1_desc"}}</div>
|
||||
<div class="ui secondary segment">
|
||||
{{if eq .PullRequest.Flow 0}}
|
||||
<div>git fetch -u {{if ne .PullRequest.HeadRepo.ID .PullRequest.BaseRepo.ID}}<gitea-origin-url data-url="{{.PullRequest.HeadRepo.Link}}"></gitea-origin-url>{{else}}origin{{end}} {{.PullRequest.HeadBranch}}:{{$localBranch}}</div>
|
||||
<div>git checkout {{$localBranch}}</div>
|
||||
{{if eq .Flow 0}}
|
||||
<div>git checkout -b {{if ne .HeadRepo.ID .BaseRepo.ID}}{{.HeadRepo.OwnerName}}-{{end}}{{.HeadBranch}} {{.BaseBranch}}</div>
|
||||
<div>git pull {{if ne .HeadRepo.ID .BaseRepo.ID}}<gitea-origin-url data-url="{{.HeadRepo.Link}}"></gitea-origin-url>{{else}}origin{{end}} {{.HeadBranch}}</div>
|
||||
{{else}}
|
||||
<div>git fetch -u origin {{.GetGitRefName}}:{{$localBranch}}</div>
|
||||
<div>git fetch origin {{.GetGitRefName}}:{{.HeadBranch}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{if .ShowMergeInstructions}}
|
||||
<div><h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_title"}}</h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_merge_desc"}}</div>
|
||||
<div><h3 class="gt-dib">{{ctx.Locale.Tr "step2"}}</h3> {{ctx.Locale.Tr "repo.pulls.merge_instruction_step2_desc"}}</div>
|
||||
<div class="ui secondary segment">
|
||||
<div data-pull-merge-style="merge">
|
||||
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
||||
<div>git merge --no-ff {{$localBranch}}</div>
|
||||
</div>
|
||||
<div class="gt-hidden" data-pull-merge-style="rebase">
|
||||
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
||||
<div>git merge --ff-only {{$localBranch}}</div>
|
||||
</div>
|
||||
<div class="gt-hidden" data-pull-merge-style="rebase-merge">
|
||||
<div>git checkout {{$localBranch}}</div>
|
||||
<div>git rebase {{.PullRequest.BaseBranch}}</div>
|
||||
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
||||
<div>git merge --no-ff {{$localBranch}}</div>
|
||||
</div>
|
||||
<div class="gt-hidden" data-pull-merge-style="squash">
|
||||
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
||||
<div>git merge --squash {{$localBranch}}</div>
|
||||
</div>
|
||||
<div class="gt-hidden" data-pull-merge-style="manually-merged">
|
||||
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
||||
<div>git merge {{$localBranch}}</div>
|
||||
</div>
|
||||
<div>git push origin {{.PullRequest.BaseBranch}}</div>
|
||||
<div>git checkout {{.BaseBranch}}</div>
|
||||
<div>git merge --no-ff {{if ne .HeadRepo.ID .BaseRepo.ID}}{{.HeadRepo.OwnerName}}-{{end}}{{.HeadBranch}}</div>
|
||||
<div>git push origin {{.BaseBranch}}</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="ui container">
|
||||
<div class="ui vertically grid head">
|
||||
<div class="column">
|
||||
<div class="ui header gt-df gt-ac gt-word-break">
|
||||
<div class="ui header">
|
||||
{{ctx.AvatarUtils.Avatar . 100}}
|
||||
<span class="text thin grey"><a href="{{.HomeLink}}">{{.DisplayName}}</a></span>
|
||||
<span class="org-visibility">
|
||||
|
@ -73,7 +73,7 @@
|
||||
|
||||
<div class="field">
|
||||
<div class="ui checkbox">
|
||||
<label data-tooltip-content="{{ctx.Locale.Tr "settings.keep_email_private_popup" .SignedUser.GetPlaceholderEmail}}"><strong>{{ctx.Locale.Tr "settings.keep_email_private"}}</strong></label>
|
||||
<label data-tooltip-content="{{ctx.Locale.Tr "settings.keep_email_private_popup"}}"><strong>{{ctx.Locale.Tr "settings.keep_email_private"}}</strong></label>
|
||||
<input name="keep_email_private" type="checkbox" {{if .SignedUser.KeepEmailPrivate}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1411,7 +1411,6 @@ img.ui.avatar,
|
||||
.ui.label {
|
||||
padding: 0.3em 0.5em;
|
||||
transition: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.ui.label,
|
||||
|
@ -102,7 +102,6 @@
|
||||
.organization.profile #org-info {
|
||||
overflow-wrap: anywhere;
|
||||
flex: 1;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.organization.profile #org-info .ui.header {
|
||||
|
@ -1798,12 +1798,10 @@
|
||||
flex: 1
|
||||
}
|
||||
|
||||
.empty-placeholder {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding-top: 40px;
|
||||
padding-bottom: 40px;
|
||||
.repository.packages .empty,
|
||||
.repository.actions .empty {
|
||||
padding-top: 70px;
|
||||
padding-bottom: 100px;
|
||||
}
|
||||
|
||||
.repository.packages .file-size {
|
||||
@ -2608,7 +2606,6 @@ tbody.commit-list {
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
word-break: break-word;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
@media (max-width: 767.98px) {
|
||||
|
@ -61,12 +61,11 @@ a, a:hover {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1px;
|
||||
margin-left: 13px;
|
||||
border-left: 1px solid var(--color-secondary);
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
.sub-items .item-file {
|
||||
padding-left: 18px;
|
||||
padding-left: 24px;
|
||||
}
|
||||
|
||||
.item-file.selected {
|
||||
|
@ -1,6 +1,5 @@
|
||||
<script>
|
||||
import {SvgIcon} from '../svg.js';
|
||||
import {toggleElem} from '../utils/dom.js';
|
||||
|
||||
const {csrfToken, pageData} = window.config;
|
||||
|
||||
@ -40,9 +39,6 @@ export default {
|
||||
watch: {
|
||||
mergeStyle(val) {
|
||||
this.mergeStyleDetail = this.mergeForm.mergeStyles.find((e) => e.name === val);
|
||||
for (const elem of document.querySelectorAll('[data-pull-merge-style]')) {
|
||||
toggleElem(elem, elem.getAttribute('data-pull-merge-style') === val);
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user