Skip to content

🔑 Rename safe-output-projects to safe-output-custom-tokens - #19156

Merged
dsyme merged 8 commits into
mainfrom
auth56
Mar 2, 2026
Merged

🔑 Rename safe-output-projects to safe-output-custom-tokens#19156
dsyme merged 8 commits into
mainfrom
auth56

Conversation

@dsyme

@dsymedsyme commented Mar 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Renamed the safe-output-projects setup input to safe-output-custom-tokens, broadening its scope to cover any per-handler github-token (not just project handlers)
  • Updated hasProjectRelatedSafeOutputs to hasCustomTokenSafeOutputs, which now checks all safe output types for a custom token before enabling @actions/github installation
  • Renamed all internal variables from authClient to githubClient across handler .cjs files for clarity

CopilotAI review requested due to automatic review settings March 2, 2026 02:19

CopilotAI 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.

Pull request overview

Renames the setup action input safe-output-projects to safe-output-custom-tokens and updates the compiler/runtime logic so @actions/github is installed only when needed for per-handler token (github-token) Octokit creation.

Changes:

  • Renamed setup input and wiring from safe-output-projectssafe-output-custom-tokens (action.yml, setup.sh, workflow generation).
  • Replaced hasProjectRelatedSafeOutputs with hasCustomTokenSafeOutputs to decide when to enable runtime installation of @actions/github.
  • Renamed handler-local variable authClientgithubClient across safe-output handler .cjs files.

Reviewed changes

Copilot reviewed 37 out of 37 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
pkg/workflow/compiler_yaml_helpers.goUpdates generated setup-step YAML to use the new safe-output-custom-tokens input/env var.
pkg/workflow/compiler_safe_outputs_job.goSwitches setup-step enabling logic to hasCustomTokenSafeOutputs.
pkg/workflow/compiler_safe_outputs_core.goImplements hasCustomTokenSafeOutputs and helper to scan safe output configs for per-handler tokens.
pkg/workflow/cjs_require_validation_test.goAdds an exception entry intended to allow @actions/github usage for handler_auth.cjs.
actions/setup/setup.shRenames the flag/env var and installs @actions/github when custom tokens are enabled.
actions/setup/js/update_release.cjsRenames authClientgithubClient.
actions/setup/js/update_handler_factory.cjsRenames authClientgithubClient and updates comments/calls.
actions/setup/js/unassign_from_user.cjsRenames authClientgithubClient.
actions/setup/js/submit_pr_review.cjsRenames authClientgithubClient.
actions/setup/js/set_issue_type.cjsRenames authClientgithubClient, including JSDoc param names and call sites.
actions/setup/js/resolve_pr_review_thread.cjsRenames authClientgithubClient.
actions/setup/js/reply_to_pr_review_comment.cjsRenames authClientgithubClient.
actions/setup/js/remove_labels.cjsRenames authClientgithubClient.
actions/setup/js/push_to_pull_request_branch.cjsRenames authClientgithubClient.
actions/setup/js/mark_pull_request_as_ready_for_review.cjsRenames authClientgithubClient.
actions/setup/js/link_sub_issue.cjsRenames authClientgithubClient.
actions/setup/js/hide_comment.cjsRenames authClientgithubClient.
actions/setup/js/handler_auth.cjsUpdates usage examples to githubClient and relies on @actions/github via dynamic import when needed.
actions/setup/js/dispatch_workflow.cjsRenames authClientgithubClient.
actions/setup/js/create_pull_request.cjsRenames authClientgithubClient.
actions/setup/js/create_pr_review_comment.cjsRenames authClientgithubClient.
actions/setup/js/create_issue.cjsRenames authClientgithubClient (including argument object key usage).
actions/setup/js/create_discussion.cjsRenames authClientgithubClient.
actions/setup/js/close_pull_request.cjsRenames authClientgithubClient.
actions/setup/js/close_issue.cjsRenames authClientgithubClient.
actions/setup/js/close_discussion.cjsRenames authClientgithubClient.
actions/setup/js/assign_to_user.cjsRenames authClientgithubClient.
actions/setup/js/assign_milestone.cjsRenames authClientgithubClient.
actions/setup/js/add_reviewer.cjsRenames authClientgithubClient.
actions/setup/js/add_labels.cjsRenames authClientgithubClient.
actions/setup/js/add_comment.cjsRenames authClientgithubClient.
actions/setup/action.ymlRenames composite action input/env wiring to safe-output-custom-tokens.
.github/workflows/test-project-url-default.lock.ymlRemoves old safe-output-projects input from the locked workflow.
.github/workflows/smoke-update-cross-repo-pr.lock.ymlAdds safe-output-custom-tokens: 'true' to the locked workflow.
.github/workflows/smoke-project.lock.ymlReplaces safe-output-projects with safe-output-custom-tokens.
.github/workflows/smoke-create-cross-repo-pr.lock.ymlAdds safe-output-custom-tokens: 'true' to the locked workflow.
.github/workflows/security-alert-burndown.campaign.g.lock.ymlRemoves old safe-output-projects input from the locked workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadpkg/workflow/compiler_safe_outputs_core.go
Comment threadpkg/workflow/cjs_require_validation_test.go
@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot - Cross-repo create PR 22559015980 — IN PROGRESS

  • Create smoke test file on branch ✅
  • Create PR in side repo ⏳

Run: https://github.com/github/gh-aw/actions/runs/22559015980

🔬 Cross-repo smoke test by Smoke Create Cross-Repo PR

@dsyme
dsyme merged commit 88319be into mainMar 2, 2026
48 checks passed
@dsyme
dsyme deleted the auth56 branch March 2, 2026 03:20
@albokynk

Copy link
Copy Markdown

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@dsyme@albokynk