Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
fd2ab3d
Add generate_api_text.py script.
tjprescott May 28, 2026
ebb3870
Add PR creation script.
tjprescott May 29, 2026
2d24fa9
Review feedback.
tjprescott May 29, 2026
e4b2876
Add scripts for syncing api.md
tjprescott Jun 2, 2026
dd1b565
Refactor create_api_review_pr from Python to JS in a module way.
tjprescott Jun 2, 2026
688e16f
Remove update process and just have a consistency check.
tjprescott Jun 2, 2026
323d4f3
Add minor change to azure-template to test pipeline.
tjprescott Jun 2, 2026
93184af
Add API.md to test mismatch.
tjprescott Jun 2, 2026
7680ff6
Apply actual api.md
tjprescott Jun 2, 2026
33c39cf
Update GitHub Actions to latest major versions
Copilot Jun 3, 2026
15534d7
Add shared JS scripts from rest-api-specs repo.
tjprescott Jun 3, 2026
19f65ac
Refactor scripts to use shared code and simplify.
tjprescott Jun 3, 2026
9d0946e
Code review feedback.
tjprescott Jun 3, 2026
ec760b0
Add generated API.md for azure-template
Copilot Jun 3, 2026
d04b5db
Refactor to use `azpysdk apistub --md` command.
tjprescott Jun 3, 2026
825c684
Merge branch 'GenerateAPITextScript' of https://github.com/Azure/azur…
tjprescott Jun 3, 2026
7f8eeb5
Remove Python 3.10 limit on apistub.py.
tjprescott Jun 3, 2026
c75faac
Refactor `azpysdk apistub` command. Extract metadata from API.md.
tjprescott Jun 3, 2026
dfe985c
Add validation for select metadata fields.
tjprescott Jun 3, 2026
9d8137c
CI fixes.
tjprescott Jun 3, 2026
760fc63
Add skill for generating review PR.
tjprescott Jun 3, 2026
1517d58
Update review generation logic.
tjprescott Jun 3, 2026
258a36a
fix(python adapter): add shell:true on Windows for spawnSync
tjprescott Jun 3, 2026
89e6c98
fix(python adapter): pass --dest-dir so API.md lands in package dir
tjprescott Jun 3, 2026
62f81e3
fix(python adapter): skip _generated dirs in readVersion to avoid sta…
tjprescott Jun 3, 2026
92e0c92
Make script idempotent and reuse branches with the same API hash.
tjprescott Jun 4, 2026
bb253fa
Code review feedback.
tjprescott Jun 5, 2026
317bd4c
Updates.
tjprescott Jun 5, 2026
a82a7ee
Make review PR creation only work for updates, not new packages.
tjprescott Jun 5, 2026
8d07492
CI fixes.
tjprescott Jun 5, 2026
da6a96e
Use shared helper method.
tjprescott Jun 8, 2026
8fdfca0
Add metadata to review PRs.
tjprescott Jun 8, 2026
341ee63
Code review feedback.
tjprescott Jun 8, 2026
6c93b82
Add package-lock.json
tjprescott Jun 8, 2026
c7903bc
Merge branch 'main' into GenerateAPITextScript
tjprescott Jun 9, 2026
8859f30
Refactor to use simple-git and octokit
tjprescott Jun 9, 2026
7e82410
Code review feedback.
tjprescott Jun 9, 2026
3d207c2
Remove template APIs.
tjprescott Jun 9, 2026
650f534
Code review feedback.
tjprescott Jun 9, 2026
c151395
Refactor review create script to Python.
tjprescott Jun 10, 2026
a94221a
Test consistency refactor.
tjprescott Jun 10, 2026
109aec8
Improve failure logging. Fix CI
tjprescott Jun 10, 2026
58ff53e
Test resovling consistency
tjprescott Jun 10, 2026
a7cabe5
Script fixes.
tjprescott Jun 10, 2026
dd3e9d9
Tweaks and remove APIs (more testing)
tjprescott Jun 10, 2026
143033b
Code review feedback.
tjprescott Jun 10, 2026
75f904e
Consolidate package.json.
tjprescott Jun 10, 2026
9cde269
Initial plan
tjprescott Jun 8, 2026
183b91a
Initial implementations.
tjprescott Jun 10, 2026
e1c4f1f
Updates to preserve APIView behavior of "no API unless all checks pass"
tjprescott Jun 12, 2026
44ac469
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python …
tjprescott Jun 15, 2026
25dd817
Restore Chronus package files
tjprescott Jun 15, 2026
9a81464
Remove unused shared scripts.
tjprescott Jun 15, 2026
52bc95f
Code review feedback.
tjprescott Jun 15, 2026
c4748a5
Code review feedback.
tjprescott Jun 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5,220 changes: 5,220 additions & 0 deletions .github/package-lock.json

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions .github/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "azure-sdk-for-python-github-tools",
"private": true,
"type": "module",
"description": "Pinned Node dependencies used by GitHub automation and API markdown workflows.",
"dependencies": {
"@apidevtools/json-schema-ref-parser": "^15.1.3",
"debug": "^4.4.3",
"js-yaml": "^4.1.0",
"marked": "^18.0.0",
"simple-git": "^3.36.0",
"zod": "^4.3.5"
},
"devDependencies": {
"@chronus/chronus": "1.3.1",
"@chronus/github": "1.0.6",
"@eslint/js": "^10.0.0",
"@tsconfig/node20": "^20.1.4",
"@types/debug": "^4.1.12",
"@types/js-yaml": "^4.0.9",
"@types/node": "^20.0.0",
"@types/semver": "^7.7.1",
"@vitest/coverage-v8": "^4.1.0",
"cross-env": "^10.1.0",
"eslint": "^10.0.0",
"globals": "^17.0.0",
"prettier": "3.8.3",
"prettier-plugin-organize-imports": "^4.2.0",
"semver": "^7.7.1",
"tinybench": "^6.0.0",
"typescript": "~6.0.2",
"typescript-eslint": "^8.58.0",
"vitest": "^4.1.0"
}
}
9 changes: 9 additions & 0 deletions .github/workflows/api-consistency.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,12 @@ jobs:
const { default: apiMdConsistency } =
await import('${{ github.workspace }}/.github/workflows/src/api-md-consistency/api-md-consistency.js');
return await apiMdConsistency({ github, context, core });

- name: Upload affected API.md packages
if: always()
uses: actions/upload-artifact@v7
with:
name: api-md-affected-packages
path: .artifacts/affected_package_dirs.txt
if-no-files-found: error
include-hidden-files: true
82 changes: 82 additions & 0 deletions .github/workflows/api-md-dispatch-review-syncs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: API.md Dispatch Review Syncs

on:
workflow_run:
workflows: ["API.md Consistency"]
types: [completed]
status:
check_run:
types: [completed]

permissions:
actions: write
checks: read
contents: read
pull-requests: read
statuses: read

concurrency:
group: api-md-dispatch-review-syncs-${{ github.event.workflow_run.head_sha || github.event.check_run.head_sha || github.event.sha }}
cancel-in-progress: true

jobs:
dispatch:
if: >-
github.event_name != 'check_run' || github.event.check_run.name != 'dispatch'
runs-on: ubuntu-latest
steps:
- name: Checkout trusted workflow scripts
uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: lts/*

- name: Resolve final CI gate
id: gate
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
node .github/workflows/src/api-md-review-sync/dispatch_review_branch_syncs.js
--resolve-gate
--working-sha "${{ github.event.workflow_run.head_sha || github.event.check_run.head_sha || github.event.sha }}"
--consistency-run-id "${{ github.event.workflow_run.id || '' }}"
--current-run-id "${{ github.run_id }}"

- name: Checkout working SHA for package metadata
if: ${{ steps.gate.outputs.should_dispatch == 'true' }}
uses: actions/checkout@v6
with:
repository: ${{ steps.gate.outputs.working_owner }}/azure-sdk-for-python
ref: ${{ steps.gate.outputs.working_sha }}
path: working
fetch-depth: 1
persist-credentials: false

- name: Download API.md consistency artifacts
if: ${{ steps.gate.outputs.should_dispatch == 'true' }}
env:
GH_TOKEN: ${{ github.token }}
run: |
gh run download "${{ steps.gate.outputs.consistency_run_id }}" --name api-md-affected-packages --dir .artifacts

Comment thread
tjprescott marked this conversation as resolved.
- name: Dispatch matching review branch syncs
if: ${{ steps.gate.outputs.should_dispatch == 'true' && hashFiles('.artifacts/affected_package_dirs.txt') != '' }}
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
node .github/workflows/src/api-md-review-sync/dispatch_review_branch_syncs.js
--packages-file .artifacts/affected_package_dirs.txt
--working-owner "${{ steps.gate.outputs.working_owner }}"
--working-branch "${{ steps.gate.outputs.working_branch }}"
--working-sha "${{ steps.gate.outputs.working_sha }}"
--repo-root working

- name: No affected packages
if: ${{ steps.gate.outputs.should_dispatch == 'true' && hashFiles('.artifacts/affected_package_dirs.txt') == '' }}
run: echo "No affected API.md packages were published by the consistency run."

- name: Final CI gate not ready
if: ${{ steps.gate.outputs.should_dispatch != 'true' }}
run: echo "${{ steps.gate.outputs.reason }}"
72 changes: 72 additions & 0 deletions .github/workflows/api-md-sync-review-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: API.md Sync Review Branch

on:
workflow_dispatch:
inputs:
packageDir:
description: Package directory containing api.md and api.metadata.yml.
required: true
reviewBranch:
description: API review branch to update.
required: true
workingOwner:
description: Owner of the working branch repository.
required: true
workingBranch:
description: Working branch name.
required: true
workingSha:
description: Consistency-verified working branch SHA.
required: true

permissions:
contents: write

concurrency:
group: api-md-sync-review-branch-${{ inputs.reviewBranch }}
cancel-in-progress: false

jobs:
sync:
if: ${{ startsWith(inputs.reviewBranch, 'apireview/review_') && !startsWith(inputs.workingBranch, 'apireview/') }}
runs-on: ubuntu-latest
steps:
- name: Checkout trusted workflow scripts
uses: actions/checkout@v6
with:
path: trusted

- name: Checkout working SHA
uses: actions/checkout@v6
with:
repository: ${{ inputs.workingOwner }}/azure-sdk-for-python
ref: ${{ inputs.workingSha }}
path: working
fetch-depth: 1
persist-credentials: false

- name: Checkout review branch
uses: actions/checkout@v6
with:
ref: ${{ inputs.reviewBranch }}
path: review
fetch-depth: 1

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: lts/*

- name: Sync API.md artifacts
working-directory: review
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
node ../trusted/.github/workflows/src/api-md-review-sync/sync_review_branch.js
--working-root ../working
--review-root .
--package-dir "${{ inputs.packageDir }}"
--review-branch "${{ inputs.reviewBranch }}"
--working-owner "${{ inputs.workingOwner }}"
--working-branch "${{ inputs.workingBranch }}"
--working-sha "${{ inputs.workingSha }}"
Loading
Loading