mirror of
https://github.com/go-gitea/gitea
synced 2025-01-08 18:26:12 +01:00
Merge branch 'main' into patch-18
This commit is contained in:
commit
b91d59715a
@ -168,8 +168,8 @@ func List(ctx *context.Context) {
|
|||||||
actionsConfig := ctx.Repo.Repository.MustGetUnit(ctx, unit.TypeActions).ActionsConfig()
|
actionsConfig := ctx.Repo.Repository.MustGetUnit(ctx, unit.TypeActions).ActionsConfig()
|
||||||
ctx.Data["ActionsConfig"] = actionsConfig
|
ctx.Data["ActionsConfig"] = actionsConfig
|
||||||
|
|
||||||
if len(workflowID) > 0 && ctx.Repo.IsAdmin() {
|
if len(workflowID) > 0 && ctx.Repo.CanWrite(unit.TypeActions) {
|
||||||
ctx.Data["AllowDisableOrEnableWorkflow"] = true
|
ctx.Data["AllowDisableOrEnableWorkflow"] = ctx.Repo.IsAdmin()
|
||||||
isWorkflowDisabled := actionsConfig.IsWorkflowDisabled(workflowID)
|
isWorkflowDisabled := actionsConfig.IsWorkflowDisabled(workflowID)
|
||||||
ctx.Data["CurWorkflowDisabled"] = isWorkflowDisabled
|
ctx.Data["CurWorkflowDisabled"] = isWorkflowDisabled
|
||||||
|
|
||||||
|
@ -1406,7 +1406,7 @@ func registerRoutes(m *web.Router) {
|
|||||||
m.Get("", actions.List)
|
m.Get("", actions.List)
|
||||||
m.Post("/disable", reqRepoAdmin, actions.DisableWorkflowFile)
|
m.Post("/disable", reqRepoAdmin, actions.DisableWorkflowFile)
|
||||||
m.Post("/enable", reqRepoAdmin, actions.EnableWorkflowFile)
|
m.Post("/enable", reqRepoAdmin, actions.EnableWorkflowFile)
|
||||||
m.Post("/run", reqRepoAdmin, actions.Run)
|
m.Post("/run", reqRepoActionsWriter, actions.Run)
|
||||||
|
|
||||||
m.Group("/runs/{run}", func() {
|
m.Group("/runs/{run}", func() {
|
||||||
m.Combo("").
|
m.Combo("").
|
||||||
|
@ -390,6 +390,12 @@ func (a *actionNotifier) DeleteRef(ctx context.Context, doer *user_model.User, r
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (a *actionNotifier) SyncPushCommits(ctx context.Context, pusher *user_model.User, repo *repo_model.Repository, opts *repository.PushUpdateOptions, commits *repository.PushCommits) {
|
func (a *actionNotifier) SyncPushCommits(ctx context.Context, pusher *user_model.User, repo *repo_model.Repository, opts *repository.PushUpdateOptions, commits *repository.PushCommits) {
|
||||||
|
// ignore pull sync message for pull requests refs
|
||||||
|
// TODO: it's better to have a UI to let users chose
|
||||||
|
if opts.RefFullName.IsPull() {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
data, err := json.Marshal(commits)
|
data, err := json.Marshal(commits)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("json.Marshal: %v", err)
|
log.Error("json.Marshal: %v", err)
|
||||||
|
@ -51,7 +51,7 @@ function getIconForDiffType(pType) {
|
|||||||
<div v-else class="item-directory" :title="item.name" @click.stop="collapsed = !collapsed">
|
<div v-else class="item-directory" :title="item.name" @click.stop="collapsed = !collapsed">
|
||||||
<!-- directory -->
|
<!-- directory -->
|
||||||
<SvgIcon :name="collapsed ? 'octicon-chevron-right' : 'octicon-chevron-down'"/>
|
<SvgIcon :name="collapsed ? 'octicon-chevron-right' : 'octicon-chevron-down'"/>
|
||||||
<SvgIcon class="text primary" name="octicon-file-directory-fill"/>
|
<SvgIcon class="text primary" :name="collapsed ? 'octicon-file-directory-fill' : 'octicon-file-directory-open-fill'"/>
|
||||||
<span class="gt-ellipsis">{{ item.name }}</span>
|
<span class="gt-ellipsis">{{ item.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -87,12 +87,16 @@ a, a:hover {
|
|||||||
color: var(--color-text-light-3);
|
color: var(--color-text-light-3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.item-directory {
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
.item-file,
|
.item-file,
|
||||||
.item-directory {
|
.item-directory {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.25em;
|
gap: 0.25em;
|
||||||
padding: 3px 6px;
|
padding: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-file:hover,
|
.item-file:hover,
|
||||||
|
@ -27,6 +27,7 @@ import octiconDownload from '../../public/assets/img/svg/octicon-download.svg';
|
|||||||
import octiconEye from '../../public/assets/img/svg/octicon-eye.svg';
|
import octiconEye from '../../public/assets/img/svg/octicon-eye.svg';
|
||||||
import octiconFile from '../../public/assets/img/svg/octicon-file.svg';
|
import octiconFile from '../../public/assets/img/svg/octicon-file.svg';
|
||||||
import octiconFileDirectoryFill from '../../public/assets/img/svg/octicon-file-directory-fill.svg';
|
import octiconFileDirectoryFill from '../../public/assets/img/svg/octicon-file-directory-fill.svg';
|
||||||
|
import octiconFileDirectoryOpenFill from '../../public/assets/img/svg/octicon-file-directory-open-fill.svg';
|
||||||
import octiconFilter from '../../public/assets/img/svg/octicon-filter.svg';
|
import octiconFilter from '../../public/assets/img/svg/octicon-filter.svg';
|
||||||
import octiconGear from '../../public/assets/img/svg/octicon-gear.svg';
|
import octiconGear from '../../public/assets/img/svg/octicon-gear.svg';
|
||||||
import octiconGitBranch from '../../public/assets/img/svg/octicon-git-branch.svg';
|
import octiconGitBranch from '../../public/assets/img/svg/octicon-git-branch.svg';
|
||||||
@ -101,6 +102,7 @@ const svgs = {
|
|||||||
'octicon-eye': octiconEye,
|
'octicon-eye': octiconEye,
|
||||||
'octicon-file': octiconFile,
|
'octicon-file': octiconFile,
|
||||||
'octicon-file-directory-fill': octiconFileDirectoryFill,
|
'octicon-file-directory-fill': octiconFileDirectoryFill,
|
||||||
|
'octicon-file-directory-open-fill': octiconFileDirectoryOpenFill,
|
||||||
'octicon-filter': octiconFilter,
|
'octicon-filter': octiconFilter,
|
||||||
'octicon-gear': octiconGear,
|
'octicon-gear': octiconGear,
|
||||||
'octicon-git-branch': octiconGitBranch,
|
'octicon-git-branch': octiconGitBranch,
|
||||||
|
Loading…
Reference in New Issue
Block a user