diff --git a/models/project/workflows.go b/models/project/workflows.go index 4c726e5b6c..24a1eae5c6 100644 --- a/models/project/workflows.go +++ b/models/project/workflows.go @@ -16,19 +16,21 @@ import ( type WorkflowEvent string const ( - WorkflowEventItemOpened WorkflowEvent = "item_opened" - WorkflowEventItemAddedToProject WorkflowEvent = "item_added_to_project" - WorkflowEventItemReopened WorkflowEvent = "item_reopened" - WorkflowEventItemClosed WorkflowEvent = "item_closed" - WorkflowEventItemColumnChanged WorkflowEvent = "item_column_changed" - WorkflowEventCodeChangesRequested WorkflowEvent = "code_changes_requested" - WorkflowEventCodeReviewApproved WorkflowEvent = "code_review_approved" - WorkflowEventPullRequestMerged WorkflowEvent = "pull_request_merged" + WorkflowEventItemOpened WorkflowEvent = "item_opened" + WorkflowEventItemAddedToProject WorkflowEvent = "item_added_to_project" + WorkflowEventItemRemovedFromProject WorkflowEvent = "item_removed_from_project" + WorkflowEventItemReopened WorkflowEvent = "item_reopened" + WorkflowEventItemClosed WorkflowEvent = "item_closed" + WorkflowEventItemColumnChanged WorkflowEvent = "item_column_changed" + WorkflowEventCodeChangesRequested WorkflowEvent = "code_changes_requested" + WorkflowEventCodeReviewApproved WorkflowEvent = "code_review_approved" + WorkflowEventPullRequestMerged WorkflowEvent = "pull_request_merged" ) var workflowEvents = []WorkflowEvent{ WorkflowEventItemOpened, WorkflowEventItemAddedToProject, + WorkflowEventItemRemovedFromProject, WorkflowEventItemReopened, WorkflowEventItemClosed, WorkflowEventItemColumnChanged, @@ -56,6 +58,8 @@ func (we WorkflowEvent) LangKey() string { return "projects.workflows.event.item_opened" case WorkflowEventItemAddedToProject: return "projects.workflows.event.item_added_to_project" + case WorkflowEventItemRemovedFromProject: + return "projects.workflows.event.item_removed_from_project" case WorkflowEventItemReopened: return "projects.workflows.event.item_reopened" case WorkflowEventItemClosed: @@ -122,6 +126,10 @@ func GetWorkflowEventCapabilities() map[WorkflowEvent]WorkflowEventCapabilities AvailableFilters: []WorkflowFilterType{WorkflowFilterTypeIssueType, WorkflowFilterTypeLabels}, AvailableActions: []WorkflowActionType{WorkflowActionTypeColumn, WorkflowActionTypeAddLabels, WorkflowActionTypeRemoveLabels, WorkflowActionTypeIssueState}, }, + WorkflowEventItemRemovedFromProject: { + AvailableFilters: []WorkflowFilterType{WorkflowFilterTypeIssueType, WorkflowFilterTypeLabels}, + AvailableActions: []WorkflowActionType{WorkflowActionTypeAddLabels, WorkflowActionTypeRemoveLabels, WorkflowActionTypeIssueState}, + }, WorkflowEventItemReopened: { AvailableFilters: []WorkflowFilterType{WorkflowFilterTypeIssueType, WorkflowFilterTypeLabels}, AvailableActions: []WorkflowActionType{WorkflowActionTypeColumn, WorkflowActionTypeAddLabels, WorkflowActionTypeRemoveLabels}, diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index dbc615dc7c..ced3c9a697 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -3924,12 +3924,45 @@ workflows = Workflows exit_fullscreen = Exit Fullscreen workflows.event.item_opened = Item opened workflows.event.item_added_to_project = Item added to project +workflows.event.item_removed_from_project = Item removed from project workflows.event.item_reopened = Item reopened workflows.event.item_closed = Item closed workflows.event.item_column_changed = Item column changed workflows.event.code_changes_requested = Code changes requested workflows.event.code_review_approved = Code review approved workflows.event.pull_request_merged = Pull request merged +workflows.view_workflow_configuration = View workflow configuration +workflows.configure_workflow = Configure automated actions for this workflow +workflows.when = When +workflows.run_when = This workflow will run when: +workflows.filters = Filters +workflows.apply_to = Apply to +workflows.when_moved_from_column = When moved from column +workflows.when_moved_to_column = When moved to column +workflows.only_if_has_labels = Only if has labels +workflows.default_workflows = Default Workflows +workflows.actions = Actions +workflows.move_to_column = Move to column +workflows.add_labels = Add labels +workflows.remove_labels = Remove labels +workflows.any_label = Any label +workflows.any_column = Any column +workflows.issue_state = Issue state +workflows.none = None +workflows.no_change = No change +workflows.edit = Edit +workflows.delete = Delete +workflows.save = Save +workflows.clone = Clone +workflows.cancel = Cancel +workflows.disable = Disable +workflows.disabled = Disabled +workflows.enable = Enable +workflows.enabled = Enabled +workflows.issuesAndPullRequests = Issues and Pull Requests +workflows.issues_only = Issues only +workflows.pull_requests_only = Pull Requests only +workflows.select_column = Select column ... [git.filemode] changed_filemode = %[1]s → %[2]s diff --git a/templates/projects/workflows.tmpl b/templates/projects/workflows.tmpl index e9222a667e..f7d18bf180 100644 --- a/templates/projects/workflows.tmpl +++ b/templates/projects/workflows.tmpl @@ -2,6 +2,40 @@
Configure automated actions for this workflow
-Configure automated actions for this workflow
-View workflow configuration
+{{ locale.configureWorkflow }}
+{{ locale.configureWorkflow }}
+{{ locale.viewWorkflowConfiguration }}