Repository navigation
Align require_actor_write_permission cloud automation option naming with GitHub.com and ensure compliance with repository policies - #344444
Conversation
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
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Ulugbek Abdullaev (@ulugbekna)Matched files:
|
require_actor_write_permission cloud automation option naming with GitHub.com and ensure compliance with repository policies
There was a problem hiding this comment.
🟡 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, |
There was a problem hiding this comment.
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
abc2b20
into
microsoft:release/1.144

Summary
Targets
release/1.144.require_actor_write_permission: false; unchecked sendstrue.allow_read_access_triggersfrom the repository configuration API. When explicitlyfalse, 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.Validation
npm run watchclient type-check completed with zero errors after the final changes.git diff --check.Manual verification
Live-server verification was not performed. Suggested checks:
require_actor_write_permissionhas the inverse value.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.