Skip to content

Commit

Permalink
Merge branch 'main' into fix-router-log
Browse files Browse the repository at this point in the history
  • Loading branch information
GiteaBot authored Jul 25, 2023
2 parents b48d8c3 + e62ea96 commit de0650d
Show file tree
Hide file tree
Showing 10 changed files with 109 additions and 369 deletions.
13 changes: 13 additions & 0 deletions docs/content/doc/usage/repo-mirror.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,16 @@ To set up a mirror from Gitea to Bitbucket, you need to follow these steps:
4. Select **Add Push Mirror** to save the configuration.

The repository pushes shortly thereafter. To force a push, select the **Synchronize Now** button.

### Mirror an existing ssh repository

Currently gitea supports no ssh push mirrors. You can work around this by adding a `post-receive` hook to your gitea repository that pushes manually.

1. Make sure the user running gitea has access to the git repo you are trying to mirror to from shell.
2. On the Webinterface at the repository settings > git hooks add a post-receive hook for the mirror. I.e.

```
#!/usr/bin/env bash
git push --mirror --quiet git@github.com:username/repository.git &>/dev/null &
echo "GitHub mirror initiated .."
```
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ require (
gopkg.in/yaml.v3 v3.0.1
mvdan.cc/xurls/v2 v2.5.0
strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251
xorm.io/builder v0.3.12
xorm.io/xorm v1.3.3-0.20230623150031-18f8e7a86c75
xorm.io/builder v0.3.13
xorm.io/xorm v1.3.3-0.20230725140238-59b727260d35
)

require (
Expand Down
405 changes: 63 additions & 342 deletions go.sum

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion models/project/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,10 @@ func GetSearchOrderByBySortType(sortType string) db.SearchOrderBy {

// FindProjects returns a list of all projects that have been created in the repository
func FindProjects(ctx context.Context, opts SearchOptions) ([]*Project, int64, error) {
e := db.GetEngine(ctx).Where(opts.toConds()).OrderBy(opts.OrderBy.String())
e := db.GetEngine(ctx).Where(opts.toConds())
if opts.OrderBy.String() != "" {
e = e.OrderBy(opts.OrderBy.String())
}
projects := make([]*Project, 0, setting.UI.IssuePagingNum)

if opts.Page > 0 {
Expand Down
31 changes: 14 additions & 17 deletions templates/repo/release/new.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
{{end}}
</h2>
{{template "base/alert" .}}
<form class="ui form stackable grid" action="{{.Link}}" method="post">
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<div class="ui seven wide column target">
<div class="ui seven wide target">
<div class="inline field {{if .Err_TagName}}error{{end}}">
{{if .PageIsEditRelease}}
<b>{{.tag_name}}</b><span class="at">@</span><strong>{{.tag_target}}</strong>
Expand Down Expand Up @@ -44,7 +44,7 @@
{{end}}
</div>
</div>
<div class="eleven wide column gt-pt-0">
<div class="eleven wide gt-pt-0">
<div class="field {{if .Err_Title}}error{{end}}">
<input name="title" aria-label="{{.locale.Tr "repo.release.title"}}" placeholder="{{.locale.Tr "repo.release.title"}}" value="{{.title}}" autofocus maxlength="255">
</div>
Expand Down Expand Up @@ -83,9 +83,9 @@
</div>
{{end}}
</div>
<div class="ui container">
<div class="divider"></div>
<div class="ui text right">
<div class="divider"></div>
<div class="ui">
<div>
{{if not .PageIsEditRelease}}
<div class="tag-message field">
<div class="ui checkbox">
Expand All @@ -103,30 +103,27 @@
</div>
</div>
<span class="help">{{.locale.Tr "repo.release.prerelease_helper"}}</span>
<div class="field">
<div class="divider gt-mt-0"></div>
<div class="gt-df gt-je">
{{if .PageIsEditRelease}}
<a class="ui button" href="{{.RepoLink}}/releases">
<a class="ui small button" href="{{.RepoLink}}/releases">
{{.locale.Tr "repo.release.cancel"}}
</a>
<a class="ui red button delete-button" data-url="{{$.RepoLink}}/releases/delete" data-id="{{.ID}}">
<a class="ui small red button delete-button" data-url="{{$.RepoLink}}/releases/delete" data-id="{{.ID}}">
{{$.locale.Tr "repo.release.delete_release"}}
</a>
{{if .IsDraft}}
<button class="ui button" type="submit" name="draft" value="{{.locale.Tr "repo.release.save_draft"}}">{{.locale.Tr "repo.release.save_draft"}}</button>
<button class="ui primary button">
<button class="ui small button" type="submit" name="draft" value="{{.locale.Tr "repo.release.save_draft"}}">{{.locale.Tr "repo.release.save_draft"}}</button>
<button class="ui small primary button">
{{.locale.Tr "repo.release.publish"}}
</button>
{{else}}
<button class="ui primary button">
<button class="ui small primary button">
{{.locale.Tr "repo.release.edit_release"}}
</button>
{{end}}
{{else}}
{{if not .tag_name}}
<button class="ui button" type="submit" name="tag_only" value="{{.locale.Tr "repo.release.add_tag"}}">{{.locale.Tr "repo.release.add_tag"}}</button>
{{end}}
<button class="ui button" type="submit" name="draft" value="{{.locale.Tr "repo.release.save_draft"}}">{{.locale.Tr "repo.release.save_draft"}}</button>
<button class="ui primary button">
<button class="ui small primary button">
{{.locale.Tr "repo.release.publish"}}
</button>
{{end}}
Expand Down
5 changes: 3 additions & 2 deletions templates/repo/wiki/new.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<div class="ui header">
{{.locale.Tr "repo.wiki.new_page"}}
{{if .PageIsWikiEdit}}
<div class="ui right">
<a class="ui green small button" href="{{.RepoLink}}/wiki?action=_new">{{.locale.Tr "repo.wiki.new_page_button"}}</a>
<div class="ui right gt-mb-3">
<a class="ui green tiny button" href="{{.RepoLink}}/wiki?action=_new">{{.locale.Tr "repo.wiki.new_page_button"}}</a>
</div>
{{end}}
</div>
Expand Down Expand Up @@ -37,6 +37,7 @@
<div class="field gt-mt-4">
<input name="message" aria-label="{{.locale.Tr "repo.wiki.default_commit_message"}}" placeholder="{{.locale.Tr "repo.wiki.default_commit_message"}}">
</div>
<div class="divider"></div>
<div class="text right">
<button class="ui green button">
{{.locale.Tr "repo.wiki.save_page"}}
Expand Down
8 changes: 4 additions & 4 deletions templates/user/notification/notification_subscriptions.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
</div>
<div class="ui bottom attached active tab segment">
{{if eq .Status 1}}
<div class="ui stackable grid">
<div class="six wide column">
<div class="gt-df gt-sb">
<div class="gt-df">
<div class="small-menu-items ui compact tiny menu">
<a class="{{if eq .State "all"}}active {{end}}item" href="{{$.Link}}?sort={{$.SortType}}&state=all&issueType={{$.IssueType}}&labels={{$.Labels}}">
{{.locale.Tr "all"}}
Expand All @@ -27,8 +27,8 @@
</a>
</div>
</div>
<div class="seven wide right aligned right floated column">
<div class="ui right aligned secondary filter stackable menu labels">
<div class="gt-df gt-sb">
<div class="ui right aligned secondary filter menu labels">
<!-- Type -->
<div class="ui dropdown type jump item">
<span class="text">
Expand Down
2 changes: 1 addition & 1 deletion web_src/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ a.label,
.ui.table > thead > tr > th,
.ui.table > tbody > tr > td,
.ui.table > tr > td {
padding: 6px 3px;
padding: 6px 5px;
}
/* use more horizontal padding on first and last items for visuals */
.ui.table > thead > tr > th:first-of-type,
Expand Down
4 changes: 4 additions & 0 deletions web_src/css/repo/release-tag.css
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,7 @@
.repository.new.release .field .attachment_edit {
width: 450px !important;
}

.repository.new.release .markup {
min-height: 240px;
}
1 change: 1 addition & 0 deletions web_src/css/repo/wiki.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

.repository.wiki .markup {
overflow: visible;
min-height: 340px;
}

.repository.wiki .wiki-content-parts .markup {
Expand Down

0 comments on commit de0650d

Please sign in to comment.