-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
add disable workflow feature #26413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
silverwind
merged 23 commits into
go-gitea:main
from
a1012112796:zzc/dev/disable_workflow
Aug 14, 2023
+180
−2
Merged
add disable workflow feature #26413
Changes from 8 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
95841b7
add disable workflow feature
a1012112796 c0cfb1a
Merge branch 'main' into zzc/dev/disable_workflow
silverwind 5951e46
Apply suggestions from code review
a1012112796 19f0a9d
fix build
a1012112796 7300fae
Merge remote-tracking branch 'origin/main' into zzc/dev/disable_workflow
a1012112796 c176633
vertically center button
silverwind d22cfc1
ui enhancements
silverwind 7522147
classname cleanup
silverwind 9538f45
fix template lint
silverwind 665f1c0
Apply suggestions from code review
a1012112796 00df673
use a instead of div for menu item
silverwind 1fd8b6d
remove unused translations
silverwind 3e758a8
fix typo
a1012112796 2d0bbe4
Merge remote-tracking branch 'origin/main' into zzc/dev/disable_workflow
a1012112796 f0cfff2
remove useless async
silverwind b2a5c22
remove unnecessary button classes
silverwind a76819d
fix mobile view, remove negative margin from .ui.secondary.menu
silverwind 70d758b
Apply suggestions from code review
a1012112796 3d97409
Merge remote-tracking branch 'origin/main' into zzc/dev/disable_workflow
a1012112796 0ac99a2
use gap for item spacing in secondary menu, remove clearfix
silverwind 6abdd1a
fix whitespace
silverwind 952b509
Merge branch 'main' into zzc/dev/disable_workflow
GiteaBot 3728333
Merge branch 'main' into zzc/dev/disable_workflow
GiteaBot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright 2023 The Gitea Authors. All rights reserved. | ||
// SPDX-License-Identifier: MIT | ||
|
||
package repo | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestActionsConfig(t *testing.T) { | ||
cfg := &ActionsConfig{} | ||
cfg.DisableWrokflow("test1.yaml") | ||
assert.EqualValues(t, []string{"test1.yaml"}, cfg.DisabledWorkflows) | ||
|
||
cfg.DisableWrokflow("test1.yaml") | ||
assert.EqualValues(t, []string{"test1.yaml"}, cfg.DisabledWorkflows) | ||
|
||
cfg.EnableWrokflow("test1.yaml") | ||
assert.EqualValues(t, []string{}, cfg.DisabledWorkflows) | ||
|
||
cfg.EnableWrokflow("test1.yaml") | ||
assert.EqualValues(t, []string{}, cfg.DisabledWorkflows) | ||
|
||
cfg.DisableWrokflow("test1.yaml") | ||
cfg.DisableWrokflow("test2.yaml") | ||
cfg.DisableWrokflow("test3.yaml") | ||
assert.EqualValues(t, "test1.yaml,test2.yaml,test3.yaml", cfg.ToString()) | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export function initRepoActionList() { | ||
const disableWorkflowBtn = document.getElementById('disable-workflow-btn'); | ||
if (disableWorkflowBtn) { | ||
disableWorkflowBtn.addEventListener('click', async () => { | ||
document.getElementById('disable-workflow-form').submit(); | ||
}); | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.