The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
fix(docs): add validation for repository format and name in API docs build workflow (#32246)
Mason Daughertydf20f111a80b
diff --git a/.github/workflows/api_doc_build.yml b/.github/workflows/api_doc_build.ymlindex 4c92dd53bb..5a1265613c 100644--- a/.github/workflows/api_doc_build.yml+++ b/.github/workflows/api_doc_build.yml@@ -50,10 +50,10 @@ jobs:# Get unique repositoriesREPOS=$(echo "$REPOS_UNSORTED" | sort -u)- # Checkout each unique repository that is in langchain-ai org+ # Checkout each unique repositoryfor repo in $REPOS; do- # Validate repository is in langchain-ai org- if [[ ! "$repo" =~ ^langchain-ai/[a-zA-Z0-9_-]+$ ]]; then+ # Validate repository format (allow any org with proper format)+ if [[ ! "$repo" =~ ^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$ ]]; thenecho "Error: Invalid repository format: $repo"exit 1fi@@ -61,7 +61,7 @@ jobs:REPO_NAME=$(echo $repo | cut -d'/' -f2)# Additional validation for repo name- if [[ ! "$REPO_NAME" =~ ^[a-zA-Z0-9_-]+$ ]]; then+ if [[ ! "$REPO_NAME" =~ ^[a-zA-Z0-9_.-]+$ ]]; thenecho "Error: Invalid repository name: $REPO_NAME"exit 1fi