mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-17 00:01:00 -04:00
Compare commits
6 Commits
8981f6d0fc
...
0b6f7fb607
Author | SHA1 | Date | |
---|---|---|---|
|
0b6f7fb607 | ||
|
c27a3af728 | ||
|
12aca3ef20 | ||
|
2390a46d0f | ||
|
51b6a78791 | ||
|
e6f62eea70 |
@ -22,9 +22,9 @@ import (
|
|||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Cmdembedded represents the available extract sub-command.
|
// CmdEmbedded represents the available extract sub-command.
|
||||||
var (
|
var (
|
||||||
Cmdembedded = cli.Command{
|
CmdEmbedded = cli.Command{
|
||||||
Name: "embedded",
|
Name: "embedded",
|
||||||
Usage: "Extract embedded resources",
|
Usage: "Extract embedded resources",
|
||||||
Description: "A command for extracting embedded resources, like templates and images",
|
Description: "A command for extracting embedded resources, like templates and images",
|
||||||
|
@ -164,3 +164,23 @@ Although we would like to provide more options, our limited manpower means that
|
|||||||
However, both Gitea and act runner are completely open source, so anyone can create a new/better implementation.
|
However, both Gitea and act runner are completely open source, so anyone can create a new/better implementation.
|
||||||
We support your choice, no matter how you decide.
|
We support your choice, no matter how you decide.
|
||||||
In case you fork act runner to create your own version: Please contribute the changes back if you can and if you think your changes will help others as well.
|
In case you fork act runner to create your own version: Please contribute the changes back if you can and if you think your changes will help others as well.
|
||||||
|
|
||||||
|
## What workflow trigger events does Gitea support?
|
||||||
|
|
||||||
|
All events listed in this table are supported events and are compatible with GitHub.
|
||||||
|
For events supported only by GitHub, see GitHub's [documentation](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows).
|
||||||
|
|
||||||
|
| trigger event | activity types |
|
||||||
|
|-----------------------------|--------------------------------------------------------------------------------------------------------------------------|
|
||||||
|
| create | not applicable |
|
||||||
|
| delete | not applicable |
|
||||||
|
| fork | not applicable |
|
||||||
|
| gollum | not applicable |
|
||||||
|
| push | not applicable |
|
||||||
|
| issues | `opened`, `edited`, `closed`, `reopened`, `assigned`, `unassigned`, `milestoned`, `demilestoned`, `labeled`, `unlabeled` |
|
||||||
|
| issue_comment | `created`, `edited`, `deleted` |
|
||||||
|
| pull_request | `opened`, `edited`, `closed`, `reopened`, `assigned`, `unassigned`, `synchronize`, `labeled`, `unlabeled` |
|
||||||
|
| pull_request_review | `submitted`, `edited` |
|
||||||
|
| pull_request_review_comment | `created`, `edited` |
|
||||||
|
| release | `published`, `edited` |
|
||||||
|
| registry_package | `published` |
|
||||||
|
@ -164,3 +164,23 @@ defaults:
|
|||||||
然而,无论您如何决定,Gitea 和act runner都是完全开源的,所以任何人都可以创建一个新的/更好的实现。
|
然而,无论您如何决定,Gitea 和act runner都是完全开源的,所以任何人都可以创建一个新的/更好的实现。
|
||||||
我们支持您的选择,无论您如何决定。
|
我们支持您的选择,无论您如何决定。
|
||||||
如果您选择分支act runner来创建自己的版本,请在您认为您的更改对其他人也有帮助的情况下贡献这些更改。
|
如果您选择分支act runner来创建自己的版本,请在您认为您的更改对其他人也有帮助的情况下贡献这些更改。
|
||||||
|
|
||||||
|
## Gitea 支持哪些工作流触发事件?
|
||||||
|
|
||||||
|
表格中列出的所有事件都是支持的,并且与 GitHub 兼容。
|
||||||
|
对于仅 GitHub 支持的事件,请参阅 GitHub 的[文档](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows)。
|
||||||
|
|
||||||
|
| 触发事件 | 活动类型 |
|
||||||
|
|-----------------------------|--------------------------------------------------------------------------------------------------------------------------|
|
||||||
|
| create | 不适用 |
|
||||||
|
| delete | 不适用 |
|
||||||
|
| fork | 不适用 |
|
||||||
|
| gollum | 不适用 |
|
||||||
|
| push | 不适用 |
|
||||||
|
| issues | `opened`, `edited`, `closed`, `reopened`, `assigned`, `unassigned`, `milestoned`, `demilestoned`, `labeled`, `unlabeled` |
|
||||||
|
| issue_comment | `created`, `edited`, `deleted` |
|
||||||
|
| pull_request | `opened`, `edited`, `closed`, `reopened`, `assigned`, `unassigned`, `synchronize`, `labeled`, `unlabeled` |
|
||||||
|
| pull_request_review | `submitted`, `edited` |
|
||||||
|
| pull_request_review_comment | `created`, `edited` |
|
||||||
|
| release | `published`, `edited` |
|
||||||
|
| registry_package | `published` |
|
||||||
|
23
main.go
23
main.go
@ -87,25 +87,31 @@ func main() {
|
|||||||
app.Description = `By default, Gitea will start serving using the web-server with no argument, which can alternatively be run by running the subcommand "web".`
|
app.Description = `By default, Gitea will start serving using the web-server with no argument, which can alternatively be run by running the subcommand "web".`
|
||||||
app.Version = Version + formatBuiltWith()
|
app.Version = Version + formatBuiltWith()
|
||||||
app.EnableBashCompletion = true
|
app.EnableBashCompletion = true
|
||||||
app.Commands = []cli.Command{
|
|
||||||
|
// these sub-commands need to use config file
|
||||||
|
subCmdWithIni := []cli.Command{
|
||||||
cmd.CmdWeb,
|
cmd.CmdWeb,
|
||||||
cmd.CmdServ,
|
cmd.CmdServ,
|
||||||
cmd.CmdHook,
|
cmd.CmdHook,
|
||||||
cmd.CmdDump,
|
cmd.CmdDump,
|
||||||
cmd.CmdCert,
|
|
||||||
cmd.CmdAdmin,
|
cmd.CmdAdmin,
|
||||||
cmd.CmdGenerate,
|
|
||||||
cmd.CmdMigrate,
|
cmd.CmdMigrate,
|
||||||
cmd.CmdKeys,
|
cmd.CmdKeys,
|
||||||
cmd.CmdConvert,
|
cmd.CmdConvert,
|
||||||
cmd.CmdDoctor,
|
cmd.CmdDoctor,
|
||||||
cmd.CmdManager,
|
cmd.CmdManager,
|
||||||
cmd.Cmdembedded,
|
cmd.CmdEmbedded,
|
||||||
cmd.CmdMigrateStorage,
|
cmd.CmdMigrateStorage,
|
||||||
cmd.CmdDocs,
|
|
||||||
cmd.CmdDumpRepository,
|
cmd.CmdDumpRepository,
|
||||||
cmd.CmdRestoreRepository,
|
cmd.CmdRestoreRepository,
|
||||||
cmd.CmdActions,
|
cmd.CmdActions,
|
||||||
|
cmdHelp, // TODO: the "help" sub-command was used to show the more information for "work path" and "custom config", in the future, it should avoid doing so
|
||||||
|
}
|
||||||
|
// these sub-commands do not need the config file, and they do not depend on any path or environment variable.
|
||||||
|
subCmdStandalone := []cli.Command{
|
||||||
|
cmd.CmdCert,
|
||||||
|
cmd.CmdGenerate,
|
||||||
|
cmd.CmdDocs,
|
||||||
}
|
}
|
||||||
|
|
||||||
// shared configuration flags, they are for global and for each sub-command at the same time
|
// shared configuration flags, they are for global and for each sub-command at the same time
|
||||||
@ -134,10 +140,11 @@ func main() {
|
|||||||
app.Action = prepareWorkPathAndCustomConf(cmd.CmdWeb.Action)
|
app.Action = prepareWorkPathAndCustomConf(cmd.CmdWeb.Action)
|
||||||
app.HideHelp = true // use our own help action to show helps (with more information like default config)
|
app.HideHelp = true // use our own help action to show helps (with more information like default config)
|
||||||
app.Before = cmd.PrepareConsoleLoggerLevel(log.INFO)
|
app.Before = cmd.PrepareConsoleLoggerLevel(log.INFO)
|
||||||
app.Commands = append(app.Commands, cmdHelp)
|
for i := range subCmdWithIni {
|
||||||
for i := range app.Commands {
|
prepareSubcommands(&subCmdWithIni[i], globalFlags)
|
||||||
prepareSubcommands(&app.Commands[i], globalFlags)
|
|
||||||
}
|
}
|
||||||
|
app.Commands = append(app.Commands, subCmdWithIni...)
|
||||||
|
app.Commands = append(app.Commands, subCmdStandalone...)
|
||||||
|
|
||||||
err := app.Run(os.Args)
|
err := app.Run(os.Args)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -116,6 +116,10 @@ func loadOAuth2From(rootCfg ConfigProvider) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !OAuth2.Enable {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if !filepath.IsAbs(OAuth2.JWTSigningPrivateKeyFile) {
|
if !filepath.IsAbs(OAuth2.JWTSigningPrivateKeyFile) {
|
||||||
OAuth2.JWTSigningPrivateKeyFile = filepath.Join(AppDataPath, OAuth2.JWTSigningPrivateKeyFile)
|
OAuth2.JWTSigningPrivateKeyFile = filepath.Join(AppDataPath, OAuth2.JWTSigningPrivateKeyFile)
|
||||||
}
|
}
|
||||||
|
@ -420,7 +420,13 @@ func PackageSettingsPost(ctx *context.Context) {
|
|||||||
ctx.Flash.Success(ctx.Tr("packages.settings.delete.success"))
|
ctx.Flash.Success(ctx.Tr("packages.settings.delete.success"))
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.Redirect(ctx.Package.Owner.HomeLink() + "/-/packages")
|
redirectURL := ctx.Package.Owner.HomeLink() + "/-/packages"
|
||||||
|
// redirect to the package if there are still versions available
|
||||||
|
if has, _ := packages_model.ExistVersion(ctx, &packages_model.PackageSearchOptions{PackageID: ctx.Package.Descriptor.Package.ID}); has {
|
||||||
|
redirectURL = ctx.Package.Descriptor.PackageWebLink()
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx.Redirect(redirectURL)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,6 @@
|
|||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if .LatestVersions}}
|
|
||||||
<div class="ui divider"></div>
|
<div class="ui divider"></div>
|
||||||
<strong>{{.locale.Tr "packages.versions"}} ({{.TotalVersionCount}})</strong>
|
<strong>{{.locale.Tr "packages.versions"}} ({{.TotalVersionCount}})</strong>
|
||||||
<a class="ui right" href="{{$.PackageDescriptor.PackageWebLink}}/versions">{{.locale.Tr "packages.versions.view_all"}}</a>
|
<a class="ui right" href="{{$.PackageDescriptor.PackageWebLink}}/versions">{{.locale.Tr "packages.versions.view_all"}}</a>
|
||||||
@ -96,7 +95,6 @@
|
|||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
|
||||||
{{if or .CanWritePackages .HasRepositoryAccess}}
|
{{if or .CanWritePackages .HasRepositoryAccess}}
|
||||||
<div class="ui divider"></div>
|
<div class="ui divider"></div>
|
||||||
<div class="ui relaxed list">
|
<div class="ui relaxed list">
|
||||||
|
@ -114,7 +114,7 @@
|
|||||||
{{else}}
|
{{else}}
|
||||||
<a class="link-action flex-text-inline" href data-url="{{$.Link}}/{{.ID}}/close">{{svg "octicon-x" 14}}{{$.locale.Tr "repo.milestones.close"}}</a>
|
<a class="link-action flex-text-inline" href data-url="{{$.Link}}/{{.ID}}/close">{{svg "octicon-x" 14}}{{$.locale.Tr "repo.milestones.close"}}</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
<a class="delete-button flex-text-inline" href="#" data-url="{{$.RepoLink}}/milestones/delete">{{svg "octicon-trash" 14}}{{$.locale.Tr "repo.issues.label_delete"}}</a>
|
<a class="delete-button flex-text-inline" href="#" data-url="{{$.RepoLink}}/milestones/delete" data-id="{{.ID}}">{{svg "octicon-trash" 14}}{{$.locale.Tr "repo.issues.label_delete"}}</a>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -45,8 +45,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<label>{{.locale.Tr "repo.visibility"}}</label>
|
<label>{{.locale.Tr "repo.visibility"}}</label>
|
||||||
<div class="ui read-only checkbox">
|
<div class="ui disabled checkbox">
|
||||||
<input type="checkbox" {{if .IsPrivate}}checked{{end}}>
|
<input type="checkbox" disabled {{if .IsPrivate}}checked{{end}}>
|
||||||
<label>{{.locale.Tr "repo.visibility_helper" | Safe}}</label>
|
<label>{{.locale.Tr "repo.visibility_helper" | Safe}}</label>
|
||||||
</div>
|
</div>
|
||||||
<span class="help">{{.locale.Tr "repo.fork_visibility_helper"}}</span>
|
<span class="help">{{.locale.Tr "repo.fork_visibility_helper"}}</span>
|
||||||
|
@ -135,7 +135,7 @@
|
|||||||
{{else}}
|
{{else}}
|
||||||
<a class="link-action flex-text-inline" href data-url="{{$.Link}}/{{.ID}}/close">{{svg "octicon-x" 14}}{{$.locale.Tr "repo.milestones.close"}}</a>
|
<a class="link-action flex-text-inline" href data-url="{{$.Link}}/{{.ID}}/close">{{svg "octicon-x" 14}}{{$.locale.Tr "repo.milestones.close"}}</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
<a class="delete-button flex-text-inline" href="#" data-url="{{$.RepoLink}}/milestones/delete">{{svg "octicon-trash" 14}}{{$.locale.Tr "repo.issues.label_delete"}}</a>
|
<a class="delete-button flex-text-inline" href="#" data-url="{{$.RepoLink}}/milestones/delete" data-id="{{.ID}}">{{svg "octicon-trash" 14}}{{$.locale.Tr "repo.issues.label_delete"}}</a>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -881,6 +881,24 @@ a.label,
|
|||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* reduce table padding, needed especially for dense admin tables */
|
||||||
|
.ui.table > thead > tr > th,
|
||||||
|
.ui.table > tbody > tr > td,
|
||||||
|
.ui.table > tr > td {
|
||||||
|
padding: 6px 3px;
|
||||||
|
}
|
||||||
|
/* use more horizontal padding on first and last items for visuals */
|
||||||
|
.ui.table > thead > tr > th:first-of-type,
|
||||||
|
.ui.table > tbody > tr > td:first-of-type,
|
||||||
|
.ui.table > tr > td:first-of-type {
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
.ui.table > thead > tr > th:last-of-type,
|
||||||
|
.ui.table > tbody > tr > td:last-of-type,
|
||||||
|
.ui.table > tr > td:last-of-type {
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
img.ui.avatar,
|
img.ui.avatar,
|
||||||
.ui.avatar img,
|
.ui.avatar img,
|
||||||
.ui.avatar svg {
|
.ui.avatar svg {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user