Skip to content

Align require_actor_write_permission cloud automation option naming with GitHub.com and ensure compliance with repository policies - #344444

Merged
Ben Villalobos (benvillalobos) merged 2 commits into
microsoft:release/1.144from
timrogers:align-cloud-automation-actor-permissions
Oct 27, 2026
Merged

Ben Villalobos (benvillalobos) merged 2 commits into
microsoft:release/1.144from
timrogers:align-cloud-automation-actor-permissions

Conversation

@timrogers

@timrogers Tim Rogers (timrogers) commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Targets release/1.144.

  • Rename the cloud automation checkbox to Include activity from users without write access to this repository, matching GitHub.com. Invert the UI polarity while preserving the API field: checked sends require_actor_write_permission: false; unchecked sends true.
  • Honor allow_read_access_triggers from the repository configuration API. When explicitly false, uncheck and disable the option and require actor write permission in the saved event configuration. Update the control when the selected repository or its cached configuration changes, without replacing filter controls or automatically broadening permissions when the restriction is lifted.
  • Preserve cached trigger restrictions for existing public-repository automations independently of their ineligibility for creation, including configuration refreshes.
  • Explain the restriction with a muted disabled option, a separate lock icon and Disabled by your repository settings label, and a custom hover. Preserve accessible labels and disabled-state descriptions, and update accessibility help.

Validation

  • Passed: 326 tests
    ./scripts/test.sh --run src/vs/sessions/contrib/automations/test/browser/automationDialog.test.ts --run src/vs/sessions/contrib/providers/copilotChatSessions/test/browser/githubCloudAutomationStore.test.ts --run src/vs/sessions/contrib/providers/copilotChatSessions/test/browser/cloudAutomationStore.test.ts --reporter dot
    Covers checkbox polarity, creation and editing under repository restrictions (including existing public-repository automations), blocked pointer/keyboard activation, saved values, configuration refresh and repository switching, effective disabled styles, hover content, and provider behavior. Public-repository projection regressions were reproduced before the fix.
  • Passed: targeted ESLint, with follow-up edits also rechecked:
    npm run eslint -- src/vs/sessions/contrib/automations/browser/automationDialog.ts src/vs/sessions/contrib/automations/browser/automationTriggerEditor.ts src/vs/sessions/contrib/automations/test/browser/automationDialog.test.ts src/vs/sessions/contrib/providers/copilotChatSessions/browser/githubCloudAutomationStore.ts src/vs/sessions/contrib/providers/copilotChatSessions/test/browser/githubCloudAutomationStore.test.ts src/vs/sessions/contrib/sessions/browser/views/automationsAccessibility.ts src/vs/workbench/contrib/chat/common/automations/automationService.ts
  • Passed: CSS validation, with six pre-existing advisory design-token suggestions outside the new rules:
    npm run stylelint -- src/vs/sessions/contrib/automations/browser/media/automationDialog.css
  • Passed: the existing npm run watch client type-check completed with zero errors after the final changes.
  • Passed: git diff --check.

Manual verification

Live-server verification was not performed. Suggested checks:

  1. Create or edit an Issue or Pull Request cloud automation and expand Advanced.
  2. For a repository allowing read-access triggers, verify the renamed checkbox can be toggled and the submitted require_actor_write_permission has the inverse value.
  3. For a repository returning allow_read_access_triggers: false, verify the option is unchecked and unavailable, the lock/reason and hover explain why, and saving retains the write-access requirement.

Match the read-access activity option's wording and polarity to GitHub.com, honor repository trigger restrictions, and explain the disabled state accessibly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0bc7a41e-9c6c-4cbd-b2a0-367630248e5b
Copilot AI balanced review requested due to automatic review settings October 26, 2026 22:21
@vs-code-engineering

vs-code-engineering Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Ulugbek Abdullaev (@ulugbekna)

Matched files:

  • src/vs/workbench/contrib/chat/common/automations/automationService.ts

@timrogers Tim Rogers (timrogers) changed the title Align require_actor_write_permission cloud automation option naming with GitHub.com and ensure compliance with repository policies Align require_actor_write_permission cloud automation option naming with GitHub.com and ensure compliance with repository policies Oct 26, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Repository restrictions are lost when projecting targets for editable public-repository automations.

1 open issue
What changed in this PR

This PR aligns the Agents Window’s cloud automation activity option with GitHub.com and uses repository configuration to restrict activity from users without write access.

Changes:

  • Renames the checkbox and inverts its mapping to require_actor_write_permission.
  • Propagates repository configuration changes to the trigger editor.
  • Adds disabled-state styling, explanatory hover text, accessibility help, and regression tests.
File Description
src/​vs/​workbench/​contrib/​chat/​common/​automations/​automationService.ts Adds read-access trigger policy to workspace targets.
src/​vs/​sessions/​contrib/​sessions/​browser/​views/​automationsAccessibility.ts Updates checkbox guidance and restriction explanations.
src/​vs/​sessions/​contrib/​providers/​copilotChatSessions/​test/​browser/​githubCloudAutomationStore.test.ts Tests policy propagation during configuration refresh.
src/​vs/​sessions/​contrib/​providers/​copilotChatSessions/​browser/​githubCloudAutomationStore.ts Caches repository configuration and publishes trigger eligibility.
src/​vs/​sessions/​contrib/​automations/​test/​browser/​automationDialog.test.ts Covers checkbox polarity, restrictions, and reactive updates.
src/​vs/​sessions/​contrib/​automations/​browser/​media/​automationDialog.css Styles the disabled option and restriction indicator.
src/​vs/​sessions/​contrib/​automations/​browser/​automationTriggerEditor.ts Implements inverted checkbox behavior and repository restrictions.
src/​vs/​sessions/​contrib/​automations/​browser/​automationDialog.ts Connects workspace policy updates to the trigger editor.

Review effort: Balanced

this.targetEligibility.get(targetKey)?.set(canSelect ? {
workspace: URI.from({ scheme: GITHUB_REMOTE_FILE_SCHEME, authority: 'github', path: `/${repository.owner}/${repository.repo}/HEAD` }),
repositoryLabel: repositoryDisplayName(repository),
allowReadAccessTriggers: configuration.allow_read_access_triggers,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 491db92. Both target projection paths now preserve cached allow_read_access_triggers independently of creation eligibility, so existing public-repository edits receive the restriction without making public repositories selectable for new automations. Added regression coverage for both refresh orderings, background configuration changes, and restricted public-repository edits. The provider regressions failed before the fix; all 326 focused tests now pass, along with targeted ESLint and the existing watcher type-check.

Project cached repository trigger restrictions independently of creation eligibility, including background configuration refreshes. Cover both refresh ordering and restricted public-repository edits.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0bc7a41e-9c6c-4cbd-b2a0-367630248e5b
@benvillalobos
Ben Villalobos (benvillalobos) merged commit abc2b20 into microsoft:release/1.144 Oct 27, 2026
44 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.144.0 milestone Oct 27, 2026
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.

6 participants