[typespec-python regenerate pipeline] Allow TypeSpec regenerate workflow to use fork PR heads - #48164
Closed
msyyc wants to merge 1 commit into
Closed
[typespec-python regenerate pipeline] Allow TypeSpec regenerate workflow to use fork PR heads#48164msyyc wants to merge 1 commit into
msyyc wants to merge 1 commit into
Conversation
msyyc
requested review from
a team,
ChenxiJiang333,
iscai-msft and
tadelesh
as code owners
July 21, 2026 07:01
|
Azure Pipelines: Successfully started running 1 pipeline(s). 9 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
Enables TypeSpec regeneration from fork-backed microsoft/typespec pull requests.
Changes:
- Resolves the pull request’s head repository and SHA.
- Adds validation for inaccessible/deleted forks.
- Includes the fork repository in display output.
| echo "::error::Unable to resolve the head repository for microsoft/typespec PR #${PR_NUMBER}. The fork may be deleted or inaccessible." | ||
| exit 1 | ||
| fi | ||
| REPO="${HEAD_OWNER}/${HEAD_REPO_NAME}" |
Member
Author
|
For security risk of #48164 (comment), we can't accept this PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Allow the TypeSpec Python regenerate workflow to resolve a
microsoft/typespecPR URL to the PR's actual head repository and SHA, including forked PR branches.This keeps the accepted input surface limited to
https://github.com/microsoft/typespec/pull/<number>, but no longer rejects PRs whose head repository is a fork such asJennyPng/typespec.Validation
.github/workflows/typespec-python-regenerate.ymlas UTF-8 YAMLgit diff --check -- .github/workflows/typespec-python-regenerate.yml