Fix merged result in parse_item not passed back to parse_object_fields #1109
Workflow file for this run
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
| name: Update CLI Docs | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'tests/main/**' | |
| - 'tests/test_main_kr.py' | |
| - 'src/datamodel_code_generator/arguments.py' | |
| - 'src/datamodel_code_generator/cli_options.py' | |
| - 'scripts/build_cli_docs.py' | |
| - 'scripts/build_prompt_data.py' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - 'tests/main/**' | |
| - 'tests/test_main_kr.py' | |
| - 'src/datamodel_code_generator/arguments.py' | |
| - 'src/datamodel_code_generator/cli_options.py' | |
| - 'scripts/build_cli_docs.py' | |
| - 'scripts/build_prompt_data.py' | |
| pull_request_target: | |
| types: [labeled] | |
| paths: | |
| - 'tests/main/**' | |
| - 'tests/test_main_kr.py' | |
| - 'src/datamodel_code_generator/arguments.py' | |
| - 'src/datamodel_code_generator/cli_options.py' | |
| - 'scripts/build_cli_docs.py' | |
| - 'scripts/build_prompt_data.py' | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-cli-docs: | |
| if: | | |
| github.event_name == 'push' || | |
| !github.event.pull_request.head.repo.fork || | |
| github.actor == 'koxudaxi' || | |
| github.actor == 'gaborbernat' || | |
| github.actor == 'ilovelinux' || | |
| (github.event_name == 'pull_request_target' && github.event.label.name == 'safe-to-fix' && | |
| (github.event.sender.login == 'koxudaxi' || | |
| github.event.sender.login == 'gaborbernat' || | |
| github.event.sender.login == 'ilovelinux')) | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout for forks (no PAT available) | |
| - uses: actions/checkout@v4 | |
| if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| # Checkout for same-repo PRs, pushes, and pull_request_target | |
| - uses: actions/checkout@v4 | |
| if: github.event_name == 'push' || github.event_name == 'pull_request_target' || github.event.pull_request.head.repo.full_name == github.repository | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ github.event.pull_request.head.ref || github.ref }} | |
| repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }} | |
| token: ${{ secrets.PAT }} | |
| - name: Install the latest version of uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Install tox | |
| run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv | |
| - name: Setup environment | |
| run: tox run -vv --notest --skip-missing-interpreters false -e cli-docs | |
| env: | |
| UV_PYTHON_PREFERENCE: "only-managed" | |
| - name: Collect CLI doc metadata | |
| run: .tox/cli-docs/bin/pytest --collect-cli-docs -p no:xdist -q | |
| - name: Build CLI docs | |
| run: .tox/cli-docs/bin/python scripts/build_cli_docs.py | |
| - name: Build prompt data | |
| run: .tox/cli-docs/bin/python scripts/build_prompt_data.py | |
| - name: Commit and push if changed | |
| if: github.event_name == 'push' || github.event_name == 'pull_request_target' || github.event.pull_request.head.repo.full_name == github.repository | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add docs/cli-reference/ src/datamodel_code_generator/prompt_data.py | |
| git diff --staged --quiet || git commit -m "docs: update CLI reference documentation and prompt data | |
| 🤖 Generated by GitHub Actions" | |
| git push |