Skip to content

新增“开关自动化”行动#81

Merged
Programmer-MrWang merged 27 commits into
Programmer-MrWang:mainfrom
ywydog:main
Jun 18, 2026
Merged

新增“开关自动化”行动#81
Programmer-MrWang merged 27 commits into
Programmer-MrWang:mainfrom
ywydog:main

Conversation

@ywydog

@ywydog ywydog commented May 28, 2026

Copy link
Copy Markdown
Contributor

增加开关自动化的行动,以增加可玩性

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3423c55762

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

// 1. 尝试通过索引查找
if (Settings.TargetWorkflowIndex >= 0 && Settings.TargetWorkflowIndex < automationService.Workflows.Count)
{
targetWorkflow = automationService.Workflows[Settings.TargetWorkflowIndex];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate saved index before using it

When the workflow list has been reordered or a new workflow is inserted before the saved target, this path accepts any in-range TargetWorkflowIndex and never checks it against TargetWorkflowName, so the action can toggle a different automation than the one the user selected. Falling back to the saved name when the indexed workflow's name does not match would avoid silently changing the wrong workflow.

Useful? React with 👍 / 👎.

var actionSet = targetWorkflow.ActionSet;
var currentStatus = actionSet.IsEnabled;

if (IsRevertable)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor the revert opt-out

If the user clears “触发器恢复时自动还原原状态”, Settings.RevertToOriginal is still ignored here: any revertable trigger records a snapshot and OnRevert will restore it anyway. In revertable trigger scenarios this makes the new checkbox ineffective and prevents users from keeping the toggled workflow state after the trigger ends.

Useful? React with 👍 / 👎.

@DryIce-cc

DryIce-cc commented Jun 13, 2026

Copy link
Copy Markdown

hey, 我看到了你的 pr!
虽然尚未实际使用,但阁下的想法与在下编写第三代自动化时所想到的不谋而合。很欣喜在这里看到它居然真的被实现了。
我十分期待能用上它,并看到更多更创意的可玩性,帮助用户在自动化的流程控制中得心应手。
我会关注相关动态,并适时跟进。我其实有将相关功能写进ci本体,或者向你们的插件中贡献的想法,但时间尚不确定。@DryIce-cc
@ywydog @Programmer-MrWang,此致。谢谢你们的工作、付出与贡献。

@Programmer-MrWang Programmer-MrWang merged commit c3a4786 into Programmer-MrWang:main Jun 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants