Skip to content

[typespec-python] Push regenerated tests to dedicated branch#46995

Merged
iscai-msft merged 1 commit into
Azure:mainfrom
iscai-msft:move-regen-to-dedicated-branch
May 19, 2026
Merged

[typespec-python] Push regenerated tests to dedicated branch#46995
iscai-msft merged 1 commit into
Azure:mainfrom
iscai-msft:move-regen-to-dedicated-branch

Conversation

@iscai-msft
Copy link
Copy Markdown
Contributor

Summary

Update the regeneration workflow to push generated test files directly to the typespec-python-generated-tests branch instead of creating tracking issues/PRs targeting main. This avoids false security reports triggered by generated code on the default branch.

Changes

  • Workflow (typespec-python-regenerate.yml): Push directly to typespec-python-generated-tests branch using --force-with-lease, removing all PR/issue creation logic
  • Removed: pull-requests: write permission (no longer needed)
  • Updated docs: eng/tools/emitter/README.md, eng/tools/emitter/gen/README.md, and .github/skills/emitter-package-update/SKILL.md to reference the new branch
  • Failure notification: Existing notify-on-failure job still creates a GitHub issue assigned to @iscai-msft and @msyyc on any failure
  • The typespec-python-generated-tests branch will be created automatically on the first workflow run after this PR merges

What's next\n\nAfter this PR merges, a follow-up PR will remove the generated files (eng/tools/emitter/gen/azure and eng/tools/emitter/gen/unbranded) from main. They will only exist on the dedicated branch going forward.

Copilot AI review requested due to automatic review settings May 19, 2026 19:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR updates the TypeSpec Python regeneration workflow to push regenerated test artifacts directly to a dedicated branch (typespec-python-generated-tests) rather than creating tracking issues/PRs against main, and updates documentation accordingly.

Changes:

  • Update typespec-python-regenerate.yml to commit and force-push generated files directly to typespec-python-generated-tests (removing PR/issue creation logic and pull-requests: write permission).
  • Update emitter docs to clarify generated output is stored on the dedicated branch, not main.
  • Update skill documentation to reference the dedicated branch and revised failure behavior.

Reviewed changes

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

File Description
.github/workflows/typespec-python-regenerate.yml Switch regeneration output publishing from PR/issue flow to direct pushes to typespec-python-generated-tests.
eng/tools/emitter/README.md Document that gen/ output lives on the dedicated branch and is force-pushed by automation.
eng/tools/emitter/gen/README.md Add prominent note that generated files live on the dedicated branch and update regeneration description.
.github/skills/emitter-package-update/SKILL.md Update training docs to reference the new dedicated branch approach.

Comment thread .github/workflows/typespec-python-regenerate.yml
Comment thread .github/skills/emitter-package-update/SKILL.md Outdated
@iscai-msft iscai-msft force-pushed the move-regen-to-dedicated-branch branch from 961edb1 to a5858d4 Compare May 19, 2026 19:12
@iscai-msft iscai-msft force-pushed the move-regen-to-dedicated-branch branch from a5858d4 to f58958e Compare May 19, 2026 19:13
@iscai-msft iscai-msft requested a review from Copilot May 19, 2026 19:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread .github/workflows/typespec-python-regenerate.yml
Comment thread .github/workflows/typespec-python-regenerate.yml Outdated
…path

Update the regeneration workflow to:
- Push generated test files to eng/tools/azure-sdk-tools/emitter/generated/
  on the 'typespec-python-generated-tests' branch (instead of creating
  PRs to main at eng/tools/emitter/gen/)
- Remove tracking issue creation and PR-related steps
- Remove pull-requests permission (no longer needed)

Also updates READMEs, emitter docs, and skill docs to reference the
new branch and path. The eng/tools/emitter/ folder will be fully
removed in a follow-up PR.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@iscai-msft iscai-msft merged commit 6968c0c into Azure:main May 19, 2026
17 of 18 checks passed
@iscai-msft iscai-msft deleted the move-regen-to-dedicated-branch branch May 19, 2026 23:01
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