@aqajooon/mcp-server-azure-devops 0.0.0-stage → 0.1.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +318 -2
- package/dist/clients/azure-devops.d.ts +105 -0
- package/dist/clients/azure-devops.js +501 -0
- package/dist/clients/azure-devops.js.map +1 -0
- package/dist/features/environments/feature.d.ts +24 -0
- package/dist/features/environments/feature.js +48 -0
- package/dist/features/environments/feature.js.map +1 -0
- package/dist/features/environments/index.d.ts +10 -0
- package/dist/features/environments/index.js +42 -0
- package/dist/features/environments/index.js.map +1 -0
- package/dist/features/environments/schema.d.ts +7 -0
- package/dist/features/environments/schema.js +28 -0
- package/dist/features/environments/schema.js.map +1 -0
- package/dist/features/libraries/feature.d.ts +27 -0
- package/dist/features/libraries/feature.js +47 -0
- package/dist/features/libraries/feature.js.map +1 -0
- package/dist/features/libraries/index.d.ts +10 -0
- package/dist/features/libraries/index.js +42 -0
- package/dist/features/libraries/index.js.map +1 -0
- package/dist/features/libraries/schema.d.ts +7 -0
- package/dist/features/libraries/schema.js +27 -0
- package/dist/features/libraries/schema.js.map +1 -0
- package/dist/features/organizations/__test__/test-helpers.d.ts +13 -0
- package/dist/features/organizations/__test__/test-helpers.js +38 -0
- package/dist/features/organizations/__test__/test-helpers.js.map +1 -0
- package/dist/features/organizations/index.d.ts +13 -0
- package/dist/features/organizations/index.js +63 -0
- package/dist/features/organizations/index.js.map +1 -0
- package/dist/features/organizations/list-organizations/feature.d.ts +13 -0
- package/dist/features/organizations/list-organizations/feature.js +101 -0
- package/dist/features/organizations/list-organizations/feature.js.map +1 -0
- package/dist/features/organizations/list-organizations/index.d.ts +2 -0
- package/dist/features/organizations/list-organizations/index.js +19 -0
- package/dist/features/organizations/list-organizations/index.js.map +1 -0
- package/dist/features/organizations/list-organizations/schema.d.ts +2 -0
- package/dist/features/organizations/list-organizations/schema.js +6 -0
- package/dist/features/organizations/list-organizations/schema.js.map +1 -0
- package/dist/features/organizations/schemas.d.ts +6 -0
- package/dist/features/organizations/schemas.js +10 -0
- package/dist/features/organizations/schemas.js.map +1 -0
- package/dist/features/organizations/tool-definitions.d.ts +5 -0
- package/dist/features/organizations/tool-definitions.js +16 -0
- package/dist/features/organizations/tool-definitions.js.map +1 -0
- package/dist/features/organizations/types.d.ts +21 -0
- package/dist/features/organizations/types.js +8 -0
- package/dist/features/organizations/types.js.map +1 -0
- package/dist/features/pipelines/artifacts.d.ts +11 -0
- package/dist/features/pipelines/artifacts.js +288 -0
- package/dist/features/pipelines/artifacts.js.map +1 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.d.ts +3 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.js +222 -0
- package/dist/features/pipelines/download-pipeline-artifact/feature.js.map +1 -0
- package/dist/features/pipelines/download-pipeline-artifact/index.d.ts +2 -0
- package/dist/features/pipelines/download-pipeline-artifact/index.js +19 -0
- package/dist/features/pipelines/download-pipeline-artifact/index.js.map +1 -0
- package/dist/features/pipelines/download-pipeline-artifact/schema.d.ts +7 -0
- package/dist/features/pipelines/download-pipeline-artifact/schema.js +23 -0
- package/dist/features/pipelines/download-pipeline-artifact/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline/feature.d.ts +10 -0
- package/dist/features/pipelines/get-pipeline/feature.js +46 -0
- package/dist/features/pipelines/get-pipeline/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline/index.js +19 -0
- package/dist/features/pipelines/get-pipeline/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline/schema.d.ts +9 -0
- package/dist/features/pipelines/get-pipeline/schema.js +29 -0
- package/dist/features/pipelines/get-pipeline/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-log/feature.d.ts +3 -0
- package/dist/features/pipelines/get-pipeline-log/feature.js +57 -0
- package/dist/features/pipelines/get-pipeline-log/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-log/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline-log/index.js +19 -0
- package/dist/features/pipelines/get-pipeline-log/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-log/schema.d.ts +13 -0
- package/dist/features/pipelines/get-pipeline-log/schema.js +40 -0
- package/dist/features/pipelines/get-pipeline-log/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run/feature.d.ts +3 -0
- package/dist/features/pipelines/get-pipeline-run/feature.js +76 -0
- package/dist/features/pipelines/get-pipeline-run/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline-run/index.js +19 -0
- package/dist/features/pipelines/get-pipeline-run/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run/schema.d.ts +6 -0
- package/dist/features/pipelines/get-pipeline-run/schema.js +19 -0
- package/dist/features/pipelines/get-pipeline-run/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-sources/feature.d.ts +26 -0
- package/dist/features/pipelines/get-pipeline-run-sources/feature.js +105 -0
- package/dist/features/pipelines/get-pipeline-run-sources/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-sources/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline-run-sources/index.js +19 -0
- package/dist/features/pipelines/get-pipeline-run-sources/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-sources/schema.d.ts +6 -0
- package/dist/features/pipelines/get-pipeline-run-sources/schema.js +19 -0
- package/dist/features/pipelines/get-pipeline-run-sources/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/feature.d.ts +47 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/feature.js +185 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/index.js +19 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/schema.d.ts +7 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/schema.js +21 -0
- package/dist/features/pipelines/get-pipeline-run-stage-tasks/schema.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/feature.d.ts +41 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/feature.js +450 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/feature.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/index.d.ts +2 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/index.js +19 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/index.js.map +1 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/schema.d.ts +6 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/schema.js +19 -0
- package/dist/features/pipelines/get-pipeline-run-yaml/schema.js.map +1 -0
- package/dist/features/pipelines/helpers.d.ts +3 -0
- package/dist/features/pipelines/helpers.js +29 -0
- package/dist/features/pipelines/helpers.js.map +1 -0
- package/dist/features/pipelines/index.d.ts +22 -0
- package/dist/features/pipelines/index.js +216 -0
- package/dist/features/pipelines/index.js.map +1 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.d.ts +3 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.js +98 -0
- package/dist/features/pipelines/list-pipeline-runs/feature.js.map +1 -0
- package/dist/features/pipelines/list-pipeline-runs/index.d.ts +2 -0
- package/dist/features/pipelines/list-pipeline-runs/index.js +19 -0
- package/dist/features/pipelines/list-pipeline-runs/index.js.map +1 -0
- package/dist/features/pipelines/list-pipeline-runs/schema.d.ts +28 -0
- package/dist/features/pipelines/list-pipeline-runs/schema.js +50 -0
- package/dist/features/pipelines/list-pipeline-runs/schema.js.map +1 -0
- package/dist/features/pipelines/list-pipelines/feature.d.ts +10 -0
- package/dist/features/pipelines/list-pipelines/feature.js +42 -0
- package/dist/features/pipelines/list-pipelines/feature.js.map +1 -0
- package/dist/features/pipelines/list-pipelines/index.d.ts +2 -0
- package/dist/features/pipelines/list-pipelines/index.js +19 -0
- package/dist/features/pipelines/list-pipelines/index.js.map +1 -0
- package/dist/features/pipelines/list-pipelines/schema.d.ts +9 -0
- package/dist/features/pipelines/list-pipelines/schema.js +23 -0
- package/dist/features/pipelines/list-pipelines/schema.js.map +1 -0
- package/dist/features/pipelines/pipeline-timeline/feature.d.ts +3 -0
- package/dist/features/pipelines/pipeline-timeline/feature.js +95 -0
- package/dist/features/pipelines/pipeline-timeline/feature.js.map +1 -0
- package/dist/features/pipelines/pipeline-timeline/index.d.ts +2 -0
- package/dist/features/pipelines/pipeline-timeline/index.js +19 -0
- package/dist/features/pipelines/pipeline-timeline/index.js.map +1 -0
- package/dist/features/pipelines/pipeline-timeline/schema.d.ts +31 -0
- package/dist/features/pipelines/pipeline-timeline/schema.js +51 -0
- package/dist/features/pipelines/pipeline-timeline/schema.js.map +1 -0
- package/dist/features/pipelines/tool-definitions.d.ts +5 -0
- package/dist/features/pipelines/tool-definitions.js +87 -0
- package/dist/features/pipelines/tool-definitions.js.map +1 -0
- package/dist/features/pipelines/trigger-pipeline/feature.d.ts +10 -0
- package/dist/features/pipelines/trigger-pipeline/feature.js +65 -0
- package/dist/features/pipelines/trigger-pipeline/feature.js.map +1 -0
- package/dist/features/pipelines/trigger-pipeline/index.d.ts +2 -0
- package/dist/features/pipelines/trigger-pipeline/index.js +8 -0
- package/dist/features/pipelines/trigger-pipeline/index.js.map +1 -0
- package/dist/features/pipelines/trigger-pipeline/schema.d.ts +15 -0
- package/dist/features/pipelines/trigger-pipeline/schema.js +45 -0
- package/dist/features/pipelines/trigger-pipeline/schema.js.map +1 -0
- package/dist/features/pipelines/types.d.ts +122 -0
- package/dist/features/pipelines/types.js +3 -0
- package/dist/features/pipelines/types.js.map +1 -0
- package/dist/features/projects/__test__/test-helpers.d.ts +13 -0
- package/dist/features/projects/__test__/test-helpers.js +35 -0
- package/dist/features/projects/__test__/test-helpers.js.map +1 -0
- package/dist/features/projects/get-project/feature.d.ts +11 -0
- package/dist/features/projects/get-project/feature.js +29 -0
- package/dist/features/projects/get-project/feature.js.map +1 -0
- package/dist/features/projects/get-project/index.d.ts +2 -0
- package/dist/features/projects/get-project/index.js +19 -0
- package/dist/features/projects/get-project/index.js.map +1 -0
- package/dist/features/projects/get-project/schema.d.ts +2 -0
- package/dist/features/projects/get-project/schema.js +6 -0
- package/dist/features/projects/get-project/schema.js.map +1 -0
- package/dist/features/projects/get-project-details/feature.d.ts +78 -0
- package/dist/features/projects/get-project-details/feature.js +185 -0
- package/dist/features/projects/get-project-details/feature.js.map +1 -0
- package/dist/features/projects/get-project-details/index.d.ts +2 -0
- package/dist/features/projects/get-project-details/index.js +8 -0
- package/dist/features/projects/get-project-details/index.js.map +1 -0
- package/dist/features/projects/get-project-details/schema.d.ts +2 -0
- package/dist/features/projects/get-project-details/schema.js +6 -0
- package/dist/features/projects/get-project-details/schema.js.map +1 -0
- package/dist/features/projects/index.d.ts +15 -0
- package/dist/features/projects/index.js +80 -0
- package/dist/features/projects/index.js.map +1 -0
- package/dist/features/projects/list-projects/feature.d.ts +10 -0
- package/dist/features/projects/list-projects/feature.js +25 -0
- package/dist/features/projects/list-projects/feature.js.map +1 -0
- package/dist/features/projects/list-projects/index.d.ts +2 -0
- package/dist/features/projects/list-projects/index.js +19 -0
- package/dist/features/projects/list-projects/index.js.map +1 -0
- package/dist/features/projects/list-projects/schema.d.ts +2 -0
- package/dist/features/projects/list-projects/schema.js +6 -0
- package/dist/features/projects/list-projects/schema.js.map +1 -0
- package/dist/features/projects/schemas.d.ts +30 -0
- package/dist/features/projects/schemas.js +76 -0
- package/dist/features/projects/schemas.js.map +1 -0
- package/dist/features/projects/tool-definitions.d.ts +5 -0
- package/dist/features/projects/tool-definitions.js +26 -0
- package/dist/features/projects/tool-definitions.js.map +1 -0
- package/dist/features/projects/types.d.ts +11 -0
- package/dist/features/projects/types.js +3 -0
- package/dist/features/projects/types.js.map +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.d.ts +13 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.js +161 -0
- package/dist/features/pull-requests/add-pull-request-comment/feature.js.map +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/index.d.ts +1 -0
- package/dist/features/pull-requests/add-pull-request-comment/index.js +18 -0
- package/dist/features/pull-requests/add-pull-request-comment/index.js.map +1 -0
- package/dist/features/pull-requests/create-pull-request/feature.d.ts +12 -0
- package/dist/features/pull-requests/create-pull-request/feature.js +99 -0
- package/dist/features/pull-requests/create-pull-request/feature.js.map +1 -0
- package/dist/features/pull-requests/create-pull-request/index.d.ts +2 -0
- package/dist/features/pull-requests/create-pull-request/index.js +19 -0
- package/dist/features/pull-requests/create-pull-request/index.js.map +1 -0
- package/dist/features/pull-requests/create-pull-request/schema.d.ts +2 -0
- package/dist/features/pull-requests/create-pull-request/schema.js +6 -0
- package/dist/features/pull-requests/create-pull-request/schema.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request/feature.d.ts +6 -0
- package/dist/features/pull-requests/get-pull-request/feature.js +22 -0
- package/dist/features/pull-requests/get-pull-request/feature.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request/index.d.ts +2 -0
- package/dist/features/pull-requests/get-pull-request/index.js +19 -0
- package/dist/features/pull-requests/get-pull-request/index.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request/schema.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request/schema.js +6 -0
- package/dist/features/pull-requests/get-pull-request/schema.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.d.ts +22 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.js +60 -0
- package/dist/features/pull-requests/get-pull-request-changes/feature.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-changes/index.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-changes/index.js +18 -0
- package/dist/features/pull-requests/get-pull-request-changes/index.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.d.ts +51 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.js +259 -0
- package/dist/features/pull-requests/get-pull-request-checks/feature.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-checks/index.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-checks/index.js +18 -0
- package/dist/features/pull-requests/get-pull-request-checks/index.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.d.ts +13 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.js +88 -0
- package/dist/features/pull-requests/get-pull-request-comments/feature.js.map +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/index.d.ts +1 -0
- package/dist/features/pull-requests/get-pull-request-comments/index.js +18 -0
- package/dist/features/pull-requests/get-pull-request-comments/index.js.map +1 -0
- package/dist/features/pull-requests/index.d.ts +21 -0
- package/dist/features/pull-requests/index.js +167 -0
- package/dist/features/pull-requests/index.js.map +1 -0
- package/dist/features/pull-requests/list-pull-requests/feature.d.ts +17 -0
- package/dist/features/pull-requests/list-pull-requests/feature.js +81 -0
- package/dist/features/pull-requests/list-pull-requests/feature.js.map +1 -0
- package/dist/features/pull-requests/list-pull-requests/index.d.ts +2 -0
- package/dist/features/pull-requests/list-pull-requests/index.js +19 -0
- package/dist/features/pull-requests/list-pull-requests/index.js.map +1 -0
- package/dist/features/pull-requests/list-pull-requests/schema.d.ts +1 -0
- package/dist/features/pull-requests/list-pull-requests/schema.js +6 -0
- package/dist/features/pull-requests/list-pull-requests/schema.js.map +1 -0
- package/dist/features/pull-requests/schemas.d.ts +157 -0
- package/dist/features/pull-requests/schemas.js +337 -0
- package/dist/features/pull-requests/schemas.js.map +1 -0
- package/dist/features/pull-requests/tool-definitions.d.ts +5 -0
- package/dist/features/pull-requests/tool-definitions.js +60 -0
- package/dist/features/pull-requests/tool-definitions.js.map +1 -0
- package/dist/features/pull-requests/types.d.ts +118 -0
- package/dist/features/pull-requests/types.js +3 -0
- package/dist/features/pull-requests/types.js.map +1 -0
- package/dist/features/pull-requests/update-pull-request/feature.d.ts +9 -0
- package/dist/features/pull-requests/update-pull-request/feature.js +250 -0
- package/dist/features/pull-requests/update-pull-request/feature.js.map +1 -0
- package/dist/features/pull-requests/update-pull-request/index.d.ts +1 -0
- package/dist/features/pull-requests/update-pull-request/index.js +18 -0
- package/dist/features/pull-requests/update-pull-request/index.js.map +1 -0
- package/dist/features/pull-requests/update-pull-request-thread-status/feature.d.ts +14 -0
- package/dist/features/pull-requests/update-pull-request-thread-status/feature.js +87 -0
- package/dist/features/pull-requests/update-pull-request-thread-status/feature.js.map +1 -0
- package/dist/features/pull-requests/update-pull-request-thread-status/index.d.ts +1 -0
- package/dist/features/pull-requests/update-pull-request-thread-status/index.js +18 -0
- package/dist/features/pull-requests/update-pull-request-thread-status/index.js.map +1 -0
- package/dist/features/repositories/__test__/test-helpers.d.ts +13 -0
- package/dist/features/repositories/__test__/test-helpers.js +35 -0
- package/dist/features/repositories/__test__/test-helpers.js.map +1 -0
- package/dist/features/repositories/create-branch/feature.d.ts +6 -0
- package/dist/features/repositories/create-branch/feature.js +33 -0
- package/dist/features/repositories/create-branch/feature.js.map +1 -0
- package/dist/features/repositories/create-branch/index.d.ts +1 -0
- package/dist/features/repositories/create-branch/index.js +18 -0
- package/dist/features/repositories/create-branch/index.js.map +1 -0
- package/dist/features/repositories/create-commit/feature.d.ts +6 -0
- package/dist/features/repositories/create-commit/feature.js +122 -0
- package/dist/features/repositories/create-commit/feature.js.map +1 -0
- package/dist/features/repositories/create-commit/index.d.ts +1 -0
- package/dist/features/repositories/create-commit/index.js +18 -0
- package/dist/features/repositories/create-commit/index.js.map +1 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.d.ts +22 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.js +303 -0
- package/dist/features/repositories/get-all-repositories-tree/feature.js.map +1 -0
- package/dist/features/repositories/get-all-repositories-tree/index.d.ts +2 -0
- package/dist/features/repositories/get-all-repositories-tree/index.js +19 -0
- package/dist/features/repositories/get-all-repositories-tree/index.js.map +1 -0
- package/dist/features/repositories/get-all-repositories-tree/schema.d.ts +2 -0
- package/dist/features/repositories/get-all-repositories-tree/schema.js +6 -0
- package/dist/features/repositories/get-all-repositories-tree/schema.js.map +1 -0
- package/dist/features/repositories/get-file-content/feature.d.ts +23 -0
- package/dist/features/repositories/get-file-content/feature.js +96 -0
- package/dist/features/repositories/get-file-content/feature.js.map +1 -0
- package/dist/features/repositories/get-file-content/index.d.ts +2 -0
- package/dist/features/repositories/get-file-content/index.js +19 -0
- package/dist/features/repositories/get-file-content/index.js.map +1 -0
- package/dist/features/repositories/get-file-content/schema.d.ts +2 -0
- package/dist/features/repositories/get-file-content/schema.js +6 -0
- package/dist/features/repositories/get-file-content/schema.js.map +1 -0
- package/dist/features/repositories/get-repository/feature.d.ts +12 -0
- package/dist/features/repositories/get-repository/feature.js +30 -0
- package/dist/features/repositories/get-repository/feature.js.map +1 -0
- package/dist/features/repositories/get-repository/index.d.ts +2 -0
- package/dist/features/repositories/get-repository/index.js +19 -0
- package/dist/features/repositories/get-repository/index.js.map +1 -0
- package/dist/features/repositories/get-repository/schema.d.ts +2 -0
- package/dist/features/repositories/get-repository/schema.js +6 -0
- package/dist/features/repositories/get-repository/schema.js.map +1 -0
- package/dist/features/repositories/get-repository-details/feature.d.ts +11 -0
- package/dist/features/repositories/get-repository-details/feature.js +67 -0
- package/dist/features/repositories/get-repository-details/feature.js.map +1 -0
- package/dist/features/repositories/get-repository-details/index.d.ts +2 -0
- package/dist/features/repositories/get-repository-details/index.js +19 -0
- package/dist/features/repositories/get-repository-details/index.js.map +1 -0
- package/dist/features/repositories/get-repository-details/schema.d.ts +2 -0
- package/dist/features/repositories/get-repository-details/schema.js +6 -0
- package/dist/features/repositories/get-repository-details/schema.js.map +1 -0
- package/dist/features/repositories/get-repository-tree/feature.d.ts +6 -0
- package/dist/features/repositories/get-repository-tree/feature.js +65 -0
- package/dist/features/repositories/get-repository-tree/feature.js.map +1 -0
- package/dist/features/repositories/get-repository-tree/index.d.ts +1 -0
- package/dist/features/repositories/get-repository-tree/index.js +18 -0
- package/dist/features/repositories/get-repository-tree/index.js.map +1 -0
- package/dist/features/repositories/index.d.ts +23 -0
- package/dist/features/repositories/index.js +207 -0
- package/dist/features/repositories/index.js.map +1 -0
- package/dist/features/repositories/list-branches/feature.d.ts +14 -0
- package/dist/features/repositories/list-branches/feature.js +56 -0
- package/dist/features/repositories/list-branches/feature.js.map +1 -0
- package/dist/features/repositories/list-branches/index.d.ts +2 -0
- package/dist/features/repositories/list-branches/index.js +19 -0
- package/dist/features/repositories/list-branches/index.js.map +1 -0
- package/dist/features/repositories/list-branches/schema.d.ts +8 -0
- package/dist/features/repositories/list-branches/schema.js +28 -0
- package/dist/features/repositories/list-branches/schema.js.map +1 -0
- package/dist/features/repositories/list-commits/feature.d.ts +6 -0
- package/dist/features/repositories/list-commits/feature.js +75 -0
- package/dist/features/repositories/list-commits/feature.js.map +1 -0
- package/dist/features/repositories/list-commits/index.d.ts +1 -0
- package/dist/features/repositories/list-commits/index.js +18 -0
- package/dist/features/repositories/list-commits/index.js.map +1 -0
- package/dist/features/repositories/list-repositories/feature.d.ts +10 -0
- package/dist/features/repositories/list-repositories/feature.js +25 -0
- package/dist/features/repositories/list-repositories/feature.js.map +1 -0
- package/dist/features/repositories/list-repositories/index.d.ts +2 -0
- package/dist/features/repositories/list-repositories/index.js +19 -0
- package/dist/features/repositories/list-repositories/index.js.map +1 -0
- package/dist/features/repositories/list-repositories/schema.d.ts +2 -0
- package/dist/features/repositories/list-repositories/schema.js +6 -0
- package/dist/features/repositories/list-repositories/schema.js.map +1 -0
- package/dist/features/repositories/list-tags/feature.d.ts +13 -0
- package/dist/features/repositories/list-tags/feature.js +52 -0
- package/dist/features/repositories/list-tags/feature.js.map +1 -0
- package/dist/features/repositories/list-tags/index.d.ts +2 -0
- package/dist/features/repositories/list-tags/index.js +19 -0
- package/dist/features/repositories/list-tags/index.js.map +1 -0
- package/dist/features/repositories/list-tags/schema.d.ts +8 -0
- package/dist/features/repositories/list-tags/schema.js +28 -0
- package/dist/features/repositories/list-tags/schema.js.map +1 -0
- package/dist/features/repositories/schemas.d.ts +101 -0
- package/dist/features/repositories/schemas.js +306 -0
- package/dist/features/repositories/schemas.js.map +1 -0
- package/dist/features/repositories/tool-definitions.d.ts +5 -0
- package/dist/features/repositories/tool-definitions.js +106 -0
- package/dist/features/repositories/tool-definitions.js.map +1 -0
- package/dist/features/repositories/types.d.ts +167 -0
- package/dist/features/repositories/types.js +3 -0
- package/dist/features/repositories/types.js.map +1 -0
- package/dist/features/search/index.d.ts +15 -0
- package/dist/features/search/index.js +65 -0
- package/dist/features/search/index.js.map +1 -0
- package/dist/features/search/schemas.d.ts +58 -0
- package/dist/features/search/schemas.js +159 -0
- package/dist/features/search/schemas.js.map +1 -0
- package/dist/features/search/search-code/feature.d.ts +10 -0
- package/dist/features/search/search-code/feature.js +178 -0
- package/dist/features/search/search-code/feature.js.map +1 -0
- package/dist/features/search/search-code/index.d.ts +2 -0
- package/dist/features/search/search-code/index.js +19 -0
- package/dist/features/search/search-code/index.js.map +1 -0
- package/dist/features/search/search-wiki/feature.d.ts +10 -0
- package/dist/features/search/search-wiki/feature.js +133 -0
- package/dist/features/search/search-wiki/feature.js.map +1 -0
- package/dist/features/search/search-wiki/index.d.ts +1 -0
- package/dist/features/search/search-wiki/index.js +18 -0
- package/dist/features/search/search-wiki/index.js.map +1 -0
- package/dist/features/search/search-work-items/feature.d.ts +10 -0
- package/dist/features/search/search-work-items/feature.js +119 -0
- package/dist/features/search/search-work-items/feature.js.map +1 -0
- package/dist/features/search/search-work-items/index.d.ts +1 -0
- package/dist/features/search/search-work-items/index.js +18 -0
- package/dist/features/search/search-work-items/index.js.map +1 -0
- package/dist/features/search/tool-definitions.d.ts +5 -0
- package/dist/features/search/tool-definitions.js +26 -0
- package/dist/features/search/tool-definitions.js.map +1 -0
- package/dist/features/search/types.d.ts +537 -0
- package/dist/features/search/types.js +3 -0
- package/dist/features/search/types.js.map +1 -0
- package/dist/features/service-connections/feature.d.ts +21 -0
- package/dist/features/service-connections/feature.js +51 -0
- package/dist/features/service-connections/feature.js.map +1 -0
- package/dist/features/service-connections/index.d.ts +10 -0
- package/dist/features/service-connections/index.js +42 -0
- package/dist/features/service-connections/index.js.map +1 -0
- package/dist/features/service-connections/schema.d.ts +8 -0
- package/dist/features/service-connections/schema.js +28 -0
- package/dist/features/service-connections/schema.js.map +1 -0
- package/dist/features/users/get-me/feature.d.ts +12 -0
- package/dist/features/users/get-me/feature.js +96 -0
- package/dist/features/users/get-me/feature.js.map +1 -0
- package/dist/features/users/get-me/index.d.ts +2 -0
- package/dist/features/users/get-me/index.js +19 -0
- package/dist/features/users/get-me/index.js.map +1 -0
- package/dist/features/users/get-me/schema.d.ts +2 -0
- package/dist/features/users/get-me/schema.js +6 -0
- package/dist/features/users/get-me/schema.js.map +1 -0
- package/dist/features/users/index.d.ts +17 -0
- package/dist/features/users/index.js +52 -0
- package/dist/features/users/index.js.map +1 -0
- package/dist/features/users/schemas.d.ts +5 -0
- package/dist/features/users/schemas.js +9 -0
- package/dist/features/users/schemas.js.map +1 -0
- package/dist/features/users/tool-definitions.d.ts +5 -0
- package/dist/features/users/tool-definitions.js +16 -0
- package/dist/features/users/tool-definitions.js.map +1 -0
- package/dist/features/users/types.d.ts +17 -0
- package/dist/features/users/types.js +3 -0
- package/dist/features/users/types.js.map +1 -0
- package/dist/features/wikis/create-wiki/feature.d.ts +49 -0
- package/dist/features/wikis/create-wiki/feature.js +56 -0
- package/dist/features/wikis/create-wiki/feature.js.map +1 -0
- package/dist/features/wikis/create-wiki/index.d.ts +2 -0
- package/dist/features/wikis/create-wiki/index.js +9 -0
- package/dist/features/wikis/create-wiki/index.js.map +1 -0
- package/dist/features/wikis/create-wiki/schema.d.ts +25 -0
- package/dist/features/wikis/create-wiki/schema.js +60 -0
- package/dist/features/wikis/create-wiki/schema.js.map +1 -0
- package/dist/features/wikis/create-wiki-page/feature.d.ts +18 -0
- package/dist/features/wikis/create-wiki-page/feature.js +95 -0
- package/dist/features/wikis/create-wiki-page/feature.js.map +1 -0
- package/dist/features/wikis/create-wiki-page/index.d.ts +2 -0
- package/dist/features/wikis/create-wiki-page/index.js +8 -0
- package/dist/features/wikis/create-wiki-page/index.js.map +1 -0
- package/dist/features/wikis/create-wiki-page/schema.d.ts +12 -0
- package/dist/features/wikis/create-wiki-page/schema.js +36 -0
- package/dist/features/wikis/create-wiki-page/schema.js.map +1 -0
- package/dist/features/wikis/get-wiki-page/feature.d.ts +33 -0
- package/dist/features/wikis/get-wiki-page/feature.js +68 -0
- package/dist/features/wikis/get-wiki-page/feature.js.map +1 -0
- package/dist/features/wikis/get-wiki-page/index.d.ts +2 -0
- package/dist/features/wikis/get-wiki-page/index.js +8 -0
- package/dist/features/wikis/get-wiki-page/index.js.map +1 -0
- package/dist/features/wikis/get-wiki-page/schema.d.ts +10 -0
- package/dist/features/wikis/get-wiki-page/schema.js +23 -0
- package/dist/features/wikis/get-wiki-page/schema.js.map +1 -0
- package/dist/features/wikis/get-wikis/feature.d.ts +25 -0
- package/dist/features/wikis/get-wikis/feature.js +37 -0
- package/dist/features/wikis/get-wikis/feature.js.map +1 -0
- package/dist/features/wikis/get-wikis/index.d.ts +2 -0
- package/dist/features/wikis/get-wikis/index.js +8 -0
- package/dist/features/wikis/get-wikis/index.js.map +1 -0
- package/dist/features/wikis/get-wikis/schema.d.ts +8 -0
- package/dist/features/wikis/get-wikis/schema.js +21 -0
- package/dist/features/wikis/get-wikis/schema.js.map +1 -0
- package/dist/features/wikis/index.d.ts +16 -0
- package/dist/features/wikis/index.js +141 -0
- package/dist/features/wikis/index.js.map +1 -0
- package/dist/features/wikis/list-wiki-pages/feature.d.ts +20 -0
- package/dist/features/wikis/list-wiki-pages/feature.js +79 -0
- package/dist/features/wikis/list-wiki-pages/feature.js.map +1 -0
- package/dist/features/wikis/list-wiki-pages/index.d.ts +2 -0
- package/dist/features/wikis/list-wiki-pages/index.js +8 -0
- package/dist/features/wikis/list-wiki-pages/index.js.map +1 -0
- package/dist/features/wikis/list-wiki-pages/schema.d.ts +10 -0
- package/dist/features/wikis/list-wiki-pages/schema.js +22 -0
- package/dist/features/wikis/list-wiki-pages/schema.js.map +1 -0
- package/dist/features/wikis/tool-definitions.d.ts +5 -0
- package/dist/features/wikis/tool-definitions.js +46 -0
- package/dist/features/wikis/tool-definitions.js.map +1 -0
- package/dist/features/wikis/update-wiki-page/feature.d.ts +12 -0
- package/dist/features/wikis/update-wiki-page/feature.js +63 -0
- package/dist/features/wikis/update-wiki-page/feature.js.map +1 -0
- package/dist/features/wikis/update-wiki-page/index.d.ts +2 -0
- package/dist/features/wikis/update-wiki-page/index.js +8 -0
- package/dist/features/wikis/update-wiki-page/index.js.map +1 -0
- package/dist/features/wikis/update-wiki-page/schema.d.ts +12 -0
- package/dist/features/wikis/update-wiki-page/schema.js +32 -0
- package/dist/features/wikis/update-wiki-page/schema.js.map +1 -0
- package/dist/features/work-items/__test__/fixtures.d.ts +9 -0
- package/dist/features/work-items/__test__/fixtures.js +28 -0
- package/dist/features/work-items/__test__/fixtures.js.map +1 -0
- package/dist/features/work-items/__test__/test-helpers.d.ts +13 -0
- package/dist/features/work-items/__test__/test-helpers.js +35 -0
- package/dist/features/work-items/__test__/test-helpers.js.map +1 -0
- package/dist/features/work-items/__test__/test-utils.d.ts +17 -0
- package/dist/features/work-items/__test__/test-utils.js +39 -0
- package/dist/features/work-items/__test__/test-utils.js.map +1 -0
- package/dist/features/work-items/attachment-schemas.d.ts +24 -0
- package/dist/features/work-items/attachment-schemas.js +46 -0
- package/dist/features/work-items/attachment-schemas.js.map +1 -0
- package/dist/features/work-items/create-work-item/feature.d.ts +12 -0
- package/dist/features/work-items/create-work-item/feature.js +107 -0
- package/dist/features/work-items/create-work-item/feature.js.map +1 -0
- package/dist/features/work-items/create-work-item/index.d.ts +2 -0
- package/dist/features/work-items/create-work-item/index.js +19 -0
- package/dist/features/work-items/create-work-item/index.js.map +1 -0
- package/dist/features/work-items/create-work-item/schema.d.ts +2 -0
- package/dist/features/work-items/create-work-item/schema.js +6 -0
- package/dist/features/work-items/create-work-item/schema.js.map +1 -0
- package/dist/features/work-items/create-work-item-attachment/feature.d.ts +11 -0
- package/dist/features/work-items/create-work-item-attachment/feature.js +107 -0
- package/dist/features/work-items/create-work-item-attachment/feature.js.map +1 -0
- package/dist/features/work-items/create-work-item-attachment/index.d.ts +2 -0
- package/dist/features/work-items/create-work-item-attachment/index.js +19 -0
- package/dist/features/work-items/create-work-item-attachment/index.js.map +1 -0
- package/dist/features/work-items/create-work-item-attachment/schema.d.ts +2 -0
- package/dist/features/work-items/create-work-item-attachment/schema.js +6 -0
- package/dist/features/work-items/create-work-item-attachment/schema.js.map +1 -0
- package/dist/features/work-items/delete-work-item-attachment/feature.d.ts +10 -0
- package/dist/features/work-items/delete-work-item-attachment/feature.js +51 -0
- package/dist/features/work-items/delete-work-item-attachment/feature.js.map +1 -0
- package/dist/features/work-items/delete-work-item-attachment/index.d.ts +2 -0
- package/dist/features/work-items/delete-work-item-attachment/index.js +19 -0
- package/dist/features/work-items/delete-work-item-attachment/index.js.map +1 -0
- package/dist/features/work-items/delete-work-item-attachment/schema.d.ts +2 -0
- package/dist/features/work-items/delete-work-item-attachment/schema.js +6 -0
- package/dist/features/work-items/delete-work-item-attachment/schema.js.map +1 -0
- package/dist/features/work-items/get-work-item/feature.d.ts +12 -0
- package/dist/features/work-items/get-work-item/feature.js +69 -0
- package/dist/features/work-items/get-work-item/feature.js.map +1 -0
- package/dist/features/work-items/get-work-item/index.d.ts +2 -0
- package/dist/features/work-items/get-work-item/index.js +19 -0
- package/dist/features/work-items/get-work-item/index.js.map +1 -0
- package/dist/features/work-items/get-work-item/schema.d.ts +2 -0
- package/dist/features/work-items/get-work-item/schema.js +6 -0
- package/dist/features/work-items/get-work-item/schema.js.map +1 -0
- package/dist/features/work-items/get-work-item-attachment/feature.d.ts +10 -0
- package/dist/features/work-items/get-work-item-attachment/feature.js +108 -0
- package/dist/features/work-items/get-work-item-attachment/feature.js.map +1 -0
- package/dist/features/work-items/get-work-item-attachment/index.d.ts +2 -0
- package/dist/features/work-items/get-work-item-attachment/index.js +19 -0
- package/dist/features/work-items/get-work-item-attachment/index.js.map +1 -0
- package/dist/features/work-items/get-work-item-attachment/schema.d.ts +2 -0
- package/dist/features/work-items/get-work-item-attachment/schema.js +6 -0
- package/dist/features/work-items/get-work-item-attachment/schema.js.map +1 -0
- package/dist/features/work-items/get-work-item-comments/feature.d.ts +10 -0
- package/dist/features/work-items/get-work-item-comments/feature.js +78 -0
- package/dist/features/work-items/get-work-item-comments/feature.js.map +1 -0
- package/dist/features/work-items/get-work-item-comments/index.d.ts +2 -0
- package/dist/features/work-items/get-work-item-comments/index.js +19 -0
- package/dist/features/work-items/get-work-item-comments/index.js.map +1 -0
- package/dist/features/work-items/get-work-item-comments/schema.d.ts +2 -0
- package/dist/features/work-items/get-work-item-comments/schema.js +6 -0
- package/dist/features/work-items/get-work-item-comments/schema.js.map +1 -0
- package/dist/features/work-items/index.d.ts +21 -0
- package/dist/features/work-items/index.js +181 -0
- package/dist/features/work-items/index.js.map +1 -0
- package/dist/features/work-items/list-work-items/feature.d.ts +10 -0
- package/dist/features/work-items/list-work-items/feature.js +92 -0
- package/dist/features/work-items/list-work-items/feature.js.map +1 -0
- package/dist/features/work-items/list-work-items/index.d.ts +2 -0
- package/dist/features/work-items/list-work-items/index.js +19 -0
- package/dist/features/work-items/list-work-items/index.js.map +1 -0
- package/dist/features/work-items/list-work-items/schema.d.ts +2 -0
- package/dist/features/work-items/list-work-items/schema.js +6 -0
- package/dist/features/work-items/list-work-items/schema.js.map +1 -0
- package/dist/features/work-items/manage-work-item-link/feature.d.ts +24 -0
- package/dist/features/work-items/manage-work-item-link/feature.js +91 -0
- package/dist/features/work-items/manage-work-item-link/feature.js.map +1 -0
- package/dist/features/work-items/manage-work-item-link/index.d.ts +2 -0
- package/dist/features/work-items/manage-work-item-link/index.js +8 -0
- package/dist/features/work-items/manage-work-item-link/index.js.map +1 -0
- package/dist/features/work-items/manage-work-item-link/schema.d.ts +2 -0
- package/dist/features/work-items/manage-work-item-link/schema.js +6 -0
- package/dist/features/work-items/manage-work-item-link/schema.js.map +1 -0
- package/dist/features/work-items/schemas.d.ts +99 -0
- package/dist/features/work-items/schemas.js +181 -0
- package/dist/features/work-items/schemas.js.map +1 -0
- package/dist/features/work-items/tool-definitions.d.ts +5 -0
- package/dist/features/work-items/tool-definitions.js +56 -0
- package/dist/features/work-items/tool-definitions.js.map +1 -0
- package/dist/features/work-items/types.d.ts +87 -0
- package/dist/features/work-items/types.js +3 -0
- package/dist/features/work-items/types.js.map +1 -0
- package/dist/features/work-items/update-work-item/feature.d.ts +12 -0
- package/dist/features/work-items/update-work-item/feature.js +155 -0
- package/dist/features/work-items/update-work-item/feature.js.map +1 -0
- package/dist/features/work-items/update-work-item/index.d.ts +2 -0
- package/dist/features/work-items/update-work-item/index.js +19 -0
- package/dist/features/work-items/update-work-item/index.js.map +1 -0
- package/dist/features/work-items/update-work-item/schema.d.ts +2 -0
- package/dist/features/work-items/update-work-item/schema.js +6 -0
- package/dist/features/work-items/update-work-item/schema.js.map +1 -0
- package/dist/http-server.d.ts +22 -0
- package/dist/http-server.js +137 -0
- package/dist/http-server.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +138 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +21 -0
- package/dist/server.js +379 -0
- package/dist/server.js.map +1 -0
- package/dist/shared/api/client.d.ts +91 -0
- package/dist/shared/api/client.js +242 -0
- package/dist/shared/api/client.js.map +1 -0
- package/dist/shared/api/index.d.ts +1 -0
- package/dist/shared/api/index.js +18 -0
- package/dist/shared/api/index.js.map +1 -0
- package/dist/shared/auth/auth-factory.d.ts +53 -0
- package/dist/shared/auth/auth-factory.js +194 -0
- package/dist/shared/auth/auth-factory.js.map +1 -0
- package/dist/shared/auth/client-factory.d.ts +109 -0
- package/dist/shared/auth/client-factory.js +272 -0
- package/dist/shared/auth/client-factory.js.map +1 -0
- package/dist/shared/auth/index.d.ts +11 -0
- package/dist/shared/auth/index.js +18 -0
- package/dist/shared/auth/index.js.map +1 -0
- package/dist/shared/azure-devops-url.d.ts +17 -0
- package/dist/shared/azure-devops-url.js +120 -0
- package/dist/shared/azure-devops-url.js.map +1 -0
- package/dist/shared/config/index.d.ts +1 -0
- package/dist/shared/config/index.js +18 -0
- package/dist/shared/config/index.js.map +1 -0
- package/dist/shared/config/version.d.ts +4 -0
- package/dist/shared/config/version.js +8 -0
- package/dist/shared/config/version.js.map +1 -0
- package/dist/shared/enums/index.d.ts +40 -0
- package/dist/shared/enums/index.js +87 -0
- package/dist/shared/enums/index.js.map +1 -0
- package/dist/shared/errors/azure-devops-errors.d.ts +107 -0
- package/dist/shared/errors/azure-devops-errors.js +161 -0
- package/dist/shared/errors/azure-devops-errors.js.map +1 -0
- package/dist/shared/errors/handle-request-error.d.ts +32 -0
- package/dist/shared/errors/handle-request-error.js +121 -0
- package/dist/shared/errors/handle-request-error.js.map +1 -0
- package/dist/shared/errors/index.d.ts +1 -0
- package/dist/shared/errors/index.js +18 -0
- package/dist/shared/errors/index.js.map +1 -0
- package/dist/shared/test/test-helpers.d.ts +20 -0
- package/dist/shared/test/test-helpers.js +57 -0
- package/dist/shared/test/test-helpers.js.map +1 -0
- package/dist/shared/test/text-content.d.ts +10 -0
- package/dist/shared/test/text-content.js +20 -0
- package/dist/shared/test/text-content.js.map +1 -0
- package/dist/shared/types/config.d.ts +27 -0
- package/dist/shared/types/config.js +3 -0
- package/dist/shared/types/config.js.map +1 -0
- package/dist/shared/types/index.d.ts +1 -0
- package/dist/shared/types/index.js +18 -0
- package/dist/shared/types/index.js.map +1 -0
- package/dist/shared/types/request-handler.d.ts +21 -0
- package/dist/shared/types/request-handler.js +3 -0
- package/dist/shared/types/request-handler.js.map +1 -0
- package/dist/shared/types/tool-definition.d.ts +9 -0
- package/dist/shared/types/tool-definition.js +3 -0
- package/dist/shared/types/tool-definition.js.map +1 -0
- package/dist/shared/utils/to-json-schema.d.ts +6 -0
- package/dist/shared/utils/to-json-schema.js +12 -0
- package/dist/shared/utils/to-json-schema.js.map +1 -0
- package/dist/utils/environment.d.ts +21 -0
- package/dist/utils/environment.js +58 -0
- package/dist/utils/environment.js.map +1 -0
- package/docs/SOLUTION_SUMMARY.md +145 -0
- package/docs/authentication.md +293 -0
- package/docs/azure-identity-authentication.md +187 -0
- package/docs/ci-setup.md +61 -0
- package/docs/docker.md +135 -0
- package/docs/examples/README.md +33 -0
- package/docs/examples/azure-cli-authentication.env +25 -0
- package/docs/examples/azure-identity-authentication.env +33 -0
- package/docs/examples/pat-authentication.env +24 -0
- package/docs/important-knowledge/azure-devops-rest-api-research.md +88 -0
- package/docs/important-knowledge/llm-tldr-cli.md +37 -0
- package/docs/npm-trusted-publishers-migration.md +142 -0
- package/docs/release-troubleshooting.md +153 -0
- package/docs/testing/README.md +140 -0
- package/docs/testing/setup.md +72 -0
- package/docs/tools/README.md +76 -0
- package/docs/tools/core-navigation.md +114 -0
- package/docs/tools/organizations.md +73 -0
- package/docs/tools/pipelines.md +532 -0
- package/docs/tools/projects.md +114 -0
- package/docs/tools/pull-requests.md +1110 -0
- package/docs/tools/repositories.md +610 -0
- package/docs/tools/resources.md +133 -0
- package/docs/tools/search.md +165 -0
- package/docs/tools/user-tools.md +39 -0
- package/docs/tools/wiki.md +192 -0
- package/docs/tools/work-items.md +244 -0
- package/package.json +125 -4
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Schema for getting a project
|
|
4
|
+
*/
|
|
5
|
+
export declare const GetProjectSchema: z.ZodObject<{
|
|
6
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
7
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
/**
|
|
10
|
+
* Schema for getting detailed project information
|
|
11
|
+
*/
|
|
12
|
+
export declare const GetProjectDetailsSchema: z.ZodObject<{
|
|
13
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
14
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
15
|
+
includeProcess: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
16
|
+
includeWorkItemTypes: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
17
|
+
includeFields: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
18
|
+
includeTeams: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
19
|
+
expandTeamIdentity: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
/**
|
|
22
|
+
* Schema for listing projects
|
|
23
|
+
*/
|
|
24
|
+
export declare const ListProjectsSchema: z.ZodObject<{
|
|
25
|
+
organizationId: z.ZodOptional<z.ZodString>;
|
|
26
|
+
stateFilter: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
top: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
skip: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
continuationToken: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ListProjectsSchema = exports.GetProjectDetailsSchema = exports.GetProjectSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const environment_1 = require("../../utils/environment");
|
|
6
|
+
/**
|
|
7
|
+
* Schema for getting a project
|
|
8
|
+
*/
|
|
9
|
+
exports.GetProjectSchema = zod_1.z.object({
|
|
10
|
+
projectId: zod_1.z
|
|
11
|
+
.string()
|
|
12
|
+
.optional()
|
|
13
|
+
.describe(`The ID or name of the project (Default: ${environment_1.defaultProject})`),
|
|
14
|
+
organizationId: zod_1.z
|
|
15
|
+
.string()
|
|
16
|
+
.optional()
|
|
17
|
+
.describe(`The ID or name of the organization (Default: ${environment_1.defaultOrg})`),
|
|
18
|
+
});
|
|
19
|
+
/**
|
|
20
|
+
* Schema for getting detailed project information
|
|
21
|
+
*/
|
|
22
|
+
exports.GetProjectDetailsSchema = zod_1.z.object({
|
|
23
|
+
projectId: zod_1.z
|
|
24
|
+
.string()
|
|
25
|
+
.optional()
|
|
26
|
+
.describe(`The ID or name of the project (Default: ${environment_1.defaultProject})`),
|
|
27
|
+
organizationId: zod_1.z
|
|
28
|
+
.string()
|
|
29
|
+
.optional()
|
|
30
|
+
.describe(`The ID or name of the organization (Default: ${environment_1.defaultOrg})`),
|
|
31
|
+
includeProcess: zod_1.z
|
|
32
|
+
.boolean()
|
|
33
|
+
.optional()
|
|
34
|
+
.default(false)
|
|
35
|
+
.describe('Include process information in the project result'),
|
|
36
|
+
includeWorkItemTypes: zod_1.z
|
|
37
|
+
.boolean()
|
|
38
|
+
.optional()
|
|
39
|
+
.default(false)
|
|
40
|
+
.describe('Include work item types and their structure'),
|
|
41
|
+
includeFields: zod_1.z
|
|
42
|
+
.boolean()
|
|
43
|
+
.optional()
|
|
44
|
+
.default(false)
|
|
45
|
+
.describe('Include field information for work item types'),
|
|
46
|
+
includeTeams: zod_1.z
|
|
47
|
+
.boolean()
|
|
48
|
+
.optional()
|
|
49
|
+
.default(false)
|
|
50
|
+
.describe('Include associated teams in the project result'),
|
|
51
|
+
expandTeamIdentity: zod_1.z
|
|
52
|
+
.boolean()
|
|
53
|
+
.optional()
|
|
54
|
+
.default(false)
|
|
55
|
+
.describe('Expand identity information in the team objects'),
|
|
56
|
+
});
|
|
57
|
+
/**
|
|
58
|
+
* Schema for listing projects
|
|
59
|
+
*/
|
|
60
|
+
exports.ListProjectsSchema = zod_1.z.object({
|
|
61
|
+
organizationId: zod_1.z
|
|
62
|
+
.string()
|
|
63
|
+
.optional()
|
|
64
|
+
.describe(`The ID or name of the organization (Default: ${environment_1.defaultOrg})`),
|
|
65
|
+
stateFilter: zod_1.z
|
|
66
|
+
.number()
|
|
67
|
+
.optional()
|
|
68
|
+
.describe('Filter on team project state (0: all, 1: well-formed, 2: creating, 3: deleting, 4: new)'),
|
|
69
|
+
top: zod_1.z.number().optional().describe('Maximum number of projects to return'),
|
|
70
|
+
skip: zod_1.z.number().optional().describe('Number of projects to skip'),
|
|
71
|
+
continuationToken: zod_1.z
|
|
72
|
+
.number()
|
|
73
|
+
.optional()
|
|
74
|
+
.describe('Gets the projects after the continuation token provided'),
|
|
75
|
+
});
|
|
76
|
+
//# sourceMappingURL=schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../src/features/projects/schemas.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,yDAAqE;AAErE;;GAEG;AACU,QAAA,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,SAAS,EAAE,OAAC;SACT,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,2CAA2C,4BAAc,GAAG,CAAC;IACzE,cAAc,EAAE,OAAC;SACd,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,gDAAgD,wBAAU,GAAG,CAAC;CAC3E,CAAC,CAAC;AAEH;;GAEG;AACU,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,SAAS,EAAE,OAAC;SACT,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,2CAA2C,4BAAc,GAAG,CAAC;IACzE,cAAc,EAAE,OAAC;SACd,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,gDAAgD,wBAAU,GAAG,CAAC;IAC1E,cAAc,EAAE,OAAC;SACd,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,OAAO,CAAC,KAAK,CAAC;SACd,QAAQ,CAAC,mDAAmD,CAAC;IAChE,oBAAoB,EAAE,OAAC;SACpB,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,OAAO,CAAC,KAAK,CAAC;SACd,QAAQ,CAAC,6CAA6C,CAAC;IAC1D,aAAa,EAAE,OAAC;SACb,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,OAAO,CAAC,KAAK,CAAC;SACd,QAAQ,CAAC,+CAA+C,CAAC;IAC5D,YAAY,EAAE,OAAC;SACZ,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,OAAO,CAAC,KAAK,CAAC;SACd,QAAQ,CAAC,gDAAgD,CAAC;IAC7D,kBAAkB,EAAE,OAAC;SAClB,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,OAAO,CAAC,KAAK,CAAC;SACd,QAAQ,CAAC,iDAAiD,CAAC;CAC/D,CAAC,CAAC;AAEH;;GAEG;AACU,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IACzC,cAAc,EAAE,OAAC;SACd,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,gDAAgD,wBAAU,GAAG,CAAC;IAC1E,WAAW,EAAE,OAAC;SACX,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,yFAAyF,CAC1F;IACH,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;IAC3E,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;IAClE,iBAAiB,EAAE,OAAC;SACjB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,yDAAyD,CAAC;CACvE,CAAC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.projectsTools = void 0;
|
|
4
|
+
const to_json_schema_1 = require("../../shared/utils/to-json-schema");
|
|
5
|
+
const schemas_1 = require("./schemas");
|
|
6
|
+
/**
|
|
7
|
+
* List of projects tools
|
|
8
|
+
*/
|
|
9
|
+
exports.projectsTools = [
|
|
10
|
+
{
|
|
11
|
+
name: 'list_projects',
|
|
12
|
+
description: 'List all projects in an organization',
|
|
13
|
+
inputSchema: (0, to_json_schema_1.toJsonSchema)(schemas_1.ListProjectsSchema),
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'get_project',
|
|
17
|
+
description: 'Get details of a specific project',
|
|
18
|
+
inputSchema: (0, to_json_schema_1.toJsonSchema)(schemas_1.GetProjectSchema),
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'get_project_details',
|
|
22
|
+
description: 'Get comprehensive details of a project including process, work item types, and teams',
|
|
23
|
+
inputSchema: (0, to_json_schema_1.toJsonSchema)(schemas_1.GetProjectDetailsSchema),
|
|
24
|
+
},
|
|
25
|
+
];
|
|
26
|
+
//# sourceMappingURL=tool-definitions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-definitions.js","sourceRoot":"","sources":["../../../src/features/projects/tool-definitions.ts"],"names":[],"mappings":";;;AAAA,sEAAiE;AAEjE,uCAImB;AAEnB;;GAEG;AACU,QAAA,aAAa,GAAqB;IAC7C;QACE,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,sCAAsC;QACnD,WAAW,EAAE,IAAA,6BAAY,EAAC,4BAAkB,CAAC;KAC9C;IACD;QACE,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,mCAAmC;QAChD,WAAW,EAAE,IAAA,6BAAY,EAAC,0BAAgB,CAAC;KAC5C;IACD;QACE,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EACT,sFAAsF;QACxF,WAAW,EAAE,IAAA,6BAAY,EAAC,iCAAuB,CAAC;KACnD;CACF,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TeamProject } from 'azure-devops-node-api/interfaces/CoreInterfaces';
|
|
2
|
+
/**
|
|
3
|
+
* Options for listing projects
|
|
4
|
+
*/
|
|
5
|
+
export interface ListProjectsOptions {
|
|
6
|
+
stateFilter?: number;
|
|
7
|
+
top?: number;
|
|
8
|
+
skip?: number;
|
|
9
|
+
continuationToken?: number;
|
|
10
|
+
}
|
|
11
|
+
export type { TeamProject };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/features/projects/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { WebApi } from 'azure-devops-node-api';
|
|
2
|
+
import { AddPullRequestCommentOptions, AddCommentResponse } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Add a comment to a pull request
|
|
5
|
+
*
|
|
6
|
+
* @param connection The Azure DevOps WebApi connection
|
|
7
|
+
* @param projectId The ID or name of the project
|
|
8
|
+
* @param repositoryId The ID or name of the repository
|
|
9
|
+
* @param pullRequestId The ID of the pull request
|
|
10
|
+
* @param options Options for adding the comment
|
|
11
|
+
* @returns The created comment or thread
|
|
12
|
+
*/
|
|
13
|
+
export declare function addPullRequestComment(connection: WebApi, projectId: string | undefined, repositoryId: string | undefined, pullRequestId: number, options: AddPullRequestCommentOptions): Promise<AddCommentResponse>;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addPullRequestComment = addPullRequestComment;
|
|
4
|
+
const GitInterfaces_1 = require("azure-devops-node-api/interfaces/GitInterfaces");
|
|
5
|
+
const errors_1 = require("../../../shared/errors");
|
|
6
|
+
const enums_1 = require("../../../shared/enums");
|
|
7
|
+
/**
|
|
8
|
+
* Get the length of a line of a file at the source commit of a pull request.
|
|
9
|
+
*
|
|
10
|
+
* A thread anchors on a character range. Ending it at the end of the line, as the web UI does
|
|
11
|
+
* when a line is selected, lets the "Apply change" button of a suggestion replace the line
|
|
12
|
+
* instead of inserting the suggestion in front of it.
|
|
13
|
+
*
|
|
14
|
+
* @param pullRequest The pull request if it was already fetched, to avoid fetching it again
|
|
15
|
+
* @returns The length of the line, or undefined if the file or line cannot be read
|
|
16
|
+
*/
|
|
17
|
+
async function getLineLength(gitApi, repositoryId, pullRequestId, project, filePath, lineNumber, pullRequest) {
|
|
18
|
+
try {
|
|
19
|
+
const pr = pullRequest ?? (await gitApi.getPullRequestById(pullRequestId, project));
|
|
20
|
+
const commitId = pr?.lastMergeSourceCommit?.commitId;
|
|
21
|
+
if (!commitId) {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
const item = await gitApi.getItem(repositoryId, filePath, project, undefined, undefined, undefined, undefined, undefined, { version: commitId, versionType: GitInterfaces_1.GitVersionType.Commit }, true, // includeContent
|
|
25
|
+
true);
|
|
26
|
+
// A byte order mark is not part of the first line
|
|
27
|
+
const content = item?.content?.replace(/^\uFEFF/, '');
|
|
28
|
+
// Split on the same line breaks as the diff view, which also counts a lone CR
|
|
29
|
+
const line = content?.split(/\r\n|\r|\n/)[lineNumber - 1];
|
|
30
|
+
return line === undefined ? undefined : line.length;
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Add a comment to a pull request
|
|
38
|
+
*
|
|
39
|
+
* @param connection The Azure DevOps WebApi connection
|
|
40
|
+
* @param projectId The ID or name of the project
|
|
41
|
+
* @param repositoryId The ID or name of the repository
|
|
42
|
+
* @param pullRequestId The ID of the pull request
|
|
43
|
+
* @param options Options for adding the comment
|
|
44
|
+
* @returns The created comment or thread
|
|
45
|
+
*/
|
|
46
|
+
async function addPullRequestComment(connection, projectId, repositoryId, pullRequestId, options) {
|
|
47
|
+
try {
|
|
48
|
+
const gitApi = await connection.getGitApi();
|
|
49
|
+
const project = projectId || undefined;
|
|
50
|
+
let pullRequest;
|
|
51
|
+
let resolvedRepositoryId = repositoryId;
|
|
52
|
+
if (!resolvedRepositoryId) {
|
|
53
|
+
pullRequest = await gitApi.getPullRequestById(pullRequestId, project);
|
|
54
|
+
resolvedRepositoryId = pullRequest?.repository?.id;
|
|
55
|
+
}
|
|
56
|
+
if (!resolvedRepositoryId) {
|
|
57
|
+
throw new Error('repositoryId is required (or must be derivable from pullRequestId)');
|
|
58
|
+
}
|
|
59
|
+
// Create comment object
|
|
60
|
+
const comment = {
|
|
61
|
+
content: options.content,
|
|
62
|
+
commentType: GitInterfaces_1.CommentType.Text, // Default to Text type
|
|
63
|
+
parentCommentId: options.parentCommentId,
|
|
64
|
+
};
|
|
65
|
+
// Case 1: Add comment to an existing thread
|
|
66
|
+
if (options.threadId) {
|
|
67
|
+
const createdComment = await gitApi.createComment(comment, resolvedRepositoryId, pullRequestId, options.threadId, project);
|
|
68
|
+
if (!createdComment) {
|
|
69
|
+
throw new Error('Failed to create pull request comment');
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
comment: {
|
|
73
|
+
...createdComment,
|
|
74
|
+
commentType: (0, enums_1.transformCommentType)(createdComment.commentType),
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
// Case 2: Create new thread with comment
|
|
79
|
+
else {
|
|
80
|
+
// Map status string to CommentThreadStatus enum
|
|
81
|
+
let threadStatus;
|
|
82
|
+
if (options.status) {
|
|
83
|
+
switch (options.status) {
|
|
84
|
+
case 'active':
|
|
85
|
+
threadStatus = GitInterfaces_1.CommentThreadStatus.Active;
|
|
86
|
+
break;
|
|
87
|
+
case 'fixed':
|
|
88
|
+
threadStatus = GitInterfaces_1.CommentThreadStatus.Fixed;
|
|
89
|
+
break;
|
|
90
|
+
case 'wontFix':
|
|
91
|
+
threadStatus = GitInterfaces_1.CommentThreadStatus.WontFix;
|
|
92
|
+
break;
|
|
93
|
+
case 'closed':
|
|
94
|
+
threadStatus = GitInterfaces_1.CommentThreadStatus.Closed;
|
|
95
|
+
break;
|
|
96
|
+
case 'pending':
|
|
97
|
+
threadStatus = GitInterfaces_1.CommentThreadStatus.Pending;
|
|
98
|
+
break;
|
|
99
|
+
case 'byDesign':
|
|
100
|
+
threadStatus = GitInterfaces_1.CommentThreadStatus.ByDesign;
|
|
101
|
+
break;
|
|
102
|
+
case 'unknown':
|
|
103
|
+
threadStatus = GitInterfaces_1.CommentThreadStatus.Unknown;
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
// Create thread with comment
|
|
108
|
+
const thread = {
|
|
109
|
+
comments: [comment],
|
|
110
|
+
status: threadStatus,
|
|
111
|
+
};
|
|
112
|
+
// Add file context if specified (file comment)
|
|
113
|
+
if (options.filePath) {
|
|
114
|
+
thread.threadContext = { filePath: options.filePath };
|
|
115
|
+
// Only add line information if provided
|
|
116
|
+
if (options.lineNumber) {
|
|
117
|
+
const endLineNumber = options.endLineNumber ?? options.lineNumber;
|
|
118
|
+
const endLineLength = await getLineLength(gitApi, resolvedRepositoryId, pullRequestId, project, options.filePath, endLineNumber, pullRequest);
|
|
119
|
+
thread.threadContext.rightFileStart = {
|
|
120
|
+
line: options.lineNumber,
|
|
121
|
+
offset: 1,
|
|
122
|
+
};
|
|
123
|
+
// If the length of the end line cannot be determined, fall back to a single-line anchor
|
|
124
|
+
// at the start of lineNumber. Ending the range at the start of endLineNumber instead
|
|
125
|
+
// would make "Apply change" keep that line in place.
|
|
126
|
+
thread.threadContext.rightFileEnd =
|
|
127
|
+
endLineLength === undefined
|
|
128
|
+
? { line: options.lineNumber, offset: 1 }
|
|
129
|
+
: { line: endLineNumber, offset: endLineLength + 1 };
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
const createdThread = await gitApi.createThread(thread, resolvedRepositoryId, pullRequestId, project);
|
|
133
|
+
if (!createdThread ||
|
|
134
|
+
!createdThread.comments ||
|
|
135
|
+
createdThread.comments.length === 0) {
|
|
136
|
+
throw new Error('Failed to create pull request comment thread');
|
|
137
|
+
}
|
|
138
|
+
return {
|
|
139
|
+
comment: {
|
|
140
|
+
...createdThread.comments[0],
|
|
141
|
+
commentType: (0, enums_1.transformCommentType)(createdThread.comments[0].commentType),
|
|
142
|
+
},
|
|
143
|
+
thread: {
|
|
144
|
+
...createdThread,
|
|
145
|
+
status: (0, enums_1.transformCommentThreadStatus)(createdThread.status),
|
|
146
|
+
comments: createdThread.comments?.map((comment) => ({
|
|
147
|
+
...comment,
|
|
148
|
+
commentType: (0, enums_1.transformCommentType)(comment.commentType),
|
|
149
|
+
})),
|
|
150
|
+
},
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
catch (error) {
|
|
155
|
+
if (error instanceof errors_1.AzureDevOpsError) {
|
|
156
|
+
throw error;
|
|
157
|
+
}
|
|
158
|
+
throw new Error(`Failed to add pull request comment: ${error instanceof Error ? error.message : String(error)}`);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.js","sourceRoot":"","sources":["../../../../src/features/pull-requests/add-pull-request-comment/feature.ts"],"names":[],"mappings":";;;AACA,kFAOwD;AAExD,mDAA0D;AAE1D,iDAG+B;AAE/B;;;;;;;;;GASG;AACH,KAAK,UAAU,aAAa,CAC1B,MAAe,EACf,YAAoB,EACpB,aAAqB,EACrB,OAA2B,EAC3B,QAAgB,EAChB,UAAkB,EAClB,WAA4B;IAE5B,IAAI,CAAC;QACH,MAAM,EAAE,GACN,WAAW,IAAI,CAAC,MAAM,MAAM,CAAC,kBAAkB,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC;QAC3E,MAAM,QAAQ,GAAG,EAAE,EAAE,qBAAqB,EAAE,QAAQ,CAAC;QACrD,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,OAAO,CAC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;gBACD,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;YAClE,CAAC;YAED,OAAO;gBACL,OAAO,EAAE;oBACP,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;oBAC5B,WAAW,EAAE,IAAA,4BAAoB,EAC/B,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,WAAW,CACtC;iBACF;gBACD,MAAM,EAAE;oBACN,GAAG,aAAa;oBAChB,MAAM,EAAE,IAAA,oCAA4B,EAAC,aAAa,CAAC,MAAM,CAAC;oBAC1D,QAAQ,EAAE,aAAa,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;wBAClD,GAAG,OAAO;wBACV,WAAW,EAAE,IAAA,4BAAoB,EAAC,OAAO,CAAC,WAAW,CAAC;qBACvD,CAAC,CAAC;iBACJ;aACF,CAAC;QACJ,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,yBAAgB,EAAE,CAAC;YACtC,MAAM,KAAK,CAAC;QACd,CAAC;QACD,MAAM,IAAI,KAAK,CACb,uCAAuC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAChG,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './feature';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./feature"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/pull-requests/add-pull-request-comment/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { WebApi } from 'azure-devops-node-api';
|
|
2
|
+
import { CreatePullRequestOptions, PullRequest } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Create a pull request
|
|
5
|
+
*
|
|
6
|
+
* @param connection The Azure DevOps WebApi connection
|
|
7
|
+
* @param projectId The ID or name of the project
|
|
8
|
+
* @param repositoryId The ID or name of the repository
|
|
9
|
+
* @param options Options for creating the pull request
|
|
10
|
+
* @returns The created pull request
|
|
11
|
+
*/
|
|
12
|
+
export declare function createPullRequest(connection: WebApi, projectId: string, repositoryId: string, options: CreatePullRequestOptions): Promise<PullRequest>;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createPullRequest = createPullRequest;
|
|
4
|
+
const errors_1 = require("../../../shared/errors");
|
|
5
|
+
function normalizeTags(tags) {
|
|
6
|
+
if (!tags) {
|
|
7
|
+
return [];
|
|
8
|
+
}
|
|
9
|
+
const seen = new Set();
|
|
10
|
+
const normalized = [];
|
|
11
|
+
for (const rawTag of tags) {
|
|
12
|
+
const trimmed = rawTag.trim();
|
|
13
|
+
if (!trimmed) {
|
|
14
|
+
continue;
|
|
15
|
+
}
|
|
16
|
+
const key = trimmed.toLowerCase();
|
|
17
|
+
if (seen.has(key)) {
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
seen.add(key);
|
|
21
|
+
normalized.push(trimmed);
|
|
22
|
+
}
|
|
23
|
+
return normalized;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Create a pull request
|
|
27
|
+
*
|
|
28
|
+
* @param connection The Azure DevOps WebApi connection
|
|
29
|
+
* @param projectId The ID or name of the project
|
|
30
|
+
* @param repositoryId The ID or name of the repository
|
|
31
|
+
* @param options Options for creating the pull request
|
|
32
|
+
* @returns The created pull request
|
|
33
|
+
*/
|
|
34
|
+
async function createPullRequest(connection, projectId, repositoryId, options) {
|
|
35
|
+
try {
|
|
36
|
+
if (!options.title) {
|
|
37
|
+
throw new Error('Title is required');
|
|
38
|
+
}
|
|
39
|
+
if (!options.sourceRefName) {
|
|
40
|
+
throw new Error('Source branch is required');
|
|
41
|
+
}
|
|
42
|
+
if (!options.targetRefName) {
|
|
43
|
+
throw new Error('Target branch is required');
|
|
44
|
+
}
|
|
45
|
+
const gitApi = await connection.getGitApi();
|
|
46
|
+
const normalizedTags = normalizeTags(options.tags);
|
|
47
|
+
// Create the pull request object
|
|
48
|
+
const pullRequest = {
|
|
49
|
+
title: options.title,
|
|
50
|
+
description: options.description,
|
|
51
|
+
sourceRefName: options.sourceRefName,
|
|
52
|
+
targetRefName: options.targetRefName,
|
|
53
|
+
isDraft: options.isDraft || false,
|
|
54
|
+
workItemRefs: options.workItemRefs?.map((id) => ({
|
|
55
|
+
id: id.toString(),
|
|
56
|
+
})),
|
|
57
|
+
reviewers: options.reviewers?.map((reviewer) => ({
|
|
58
|
+
id: reviewer,
|
|
59
|
+
isRequired: true,
|
|
60
|
+
})),
|
|
61
|
+
};
|
|
62
|
+
if (options.additionalProperties) {
|
|
63
|
+
Object.assign(pullRequest, options.additionalProperties);
|
|
64
|
+
}
|
|
65
|
+
if (normalizedTags.length > 0) {
|
|
66
|
+
pullRequest.labels = normalizedTags.map((tag) => ({ name: tag }));
|
|
67
|
+
}
|
|
68
|
+
// Create the pull request
|
|
69
|
+
const createdPullRequest = await gitApi.createPullRequest(pullRequest, repositoryId, projectId);
|
|
70
|
+
if (!createdPullRequest) {
|
|
71
|
+
throw new Error('Failed to create pull request');
|
|
72
|
+
}
|
|
73
|
+
if (normalizedTags.length > 0) {
|
|
74
|
+
const pullRequestId = createdPullRequest.pullRequestId;
|
|
75
|
+
if (!pullRequestId) {
|
|
76
|
+
throw new Error('Pull request created without identifier for tagging');
|
|
77
|
+
}
|
|
78
|
+
const existing = new Set((createdPullRequest.labels ?? [])
|
|
79
|
+
.map((label) => label.name?.toLowerCase())
|
|
80
|
+
.filter((name) => Boolean(name)));
|
|
81
|
+
const tagsToCreate = normalizedTags.filter((tag) => !existing.has(tag.toLowerCase()));
|
|
82
|
+
if (tagsToCreate.length > 0) {
|
|
83
|
+
const createdLabels = await Promise.all(tagsToCreate.map((tag) => gitApi.createPullRequestLabel({ name: tag }, repositoryId, pullRequestId, projectId)));
|
|
84
|
+
createdPullRequest.labels = [
|
|
85
|
+
...(createdPullRequest.labels ?? []),
|
|
86
|
+
...createdLabels,
|
|
87
|
+
];
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return createdPullRequest;
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
if (error instanceof errors_1.AzureDevOpsError) {
|
|
94
|
+
throw error;
|
|
95
|
+
}
|
|
96
|
+
throw new Error(`Failed to create pull request: ${error instanceof Error ? error.message : String(error)}`);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.js","sourceRoot":"","sources":["../../../../src/features/pull-requests/create-pull-request/feature.ts"],"names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ACH,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./schema"), exports);
|
|
18
|
+
__exportStar(require("./feature"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/pull-requests/create-pull-request/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,4CAA0B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreatePullRequestSchema = void 0;
|
|
4
|
+
const schemas_1 = require("../schemas");
|
|
5
|
+
Object.defineProperty(exports, "CreatePullRequestSchema", { enumerable: true, get: function () { return schemas_1.CreatePullRequestSchema; } });
|
|
6
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/features/pull-requests/create-pull-request/schema.ts"],"names":[],"mappings":";;;AAAA,wCAAqD;wGAA5C,iCAAuB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPullRequest = getPullRequest;
|
|
4
|
+
const errors_1 = require("../../../shared/errors");
|
|
5
|
+
async function getPullRequest(connection, options) {
|
|
6
|
+
try {
|
|
7
|
+
const gitApi = await connection.getGitApi();
|
|
8
|
+
const project = options.projectId;
|
|
9
|
+
const pr = await gitApi.getPullRequestById(options.pullRequestId, project);
|
|
10
|
+
if (!pr) {
|
|
11
|
+
throw new errors_1.AzureDevOpsResourceNotFoundError(`Pull request not found: ${options.pullRequestId}`);
|
|
12
|
+
}
|
|
13
|
+
return pr;
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
if (error instanceof errors_1.AzureDevOpsError) {
|
|
17
|
+
throw error;
|
|
18
|
+
}
|
|
19
|
+
throw new Error(`Failed to get pull request: ${error instanceof Error ? error.message : String(error)}`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature.js","sourceRoot":"","sources":["../../../../src/features/pull-requests/get-pull-request/feature.ts"],"names":[],"mappings":";;;AACA,mDAGgC;AAGzB,KAAK,yBACV,UAAkB,EAClB,OAGC;IAED,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,SAAS,EAAE,CAAC;QAC5C,MAAM,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC;QAElC,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,OAAO,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;QAC3E,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,MAAM,IAAI,yCAAgC,CACxC,2BAA2B,OAAO,CAAC,aAAa,EAAE,CACnD,CAAC;QACJ,CAAC;QAED,OAAO,EAAE,CAAC;IACZ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,yBAAgB,EAAE,CAAC;YACtC,MAAM,KAAK,CAAC;QACd,CAAC;QACD,MAAM,IAAI,KAAK,CACb,+BAA+B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CACxF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./feature"), exports);
|
|
18
|
+
__exportStar(require("./schema"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/pull-requests/get-pull-request/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,2CAAyB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GetPullRequestSchema } from '../schemas';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetPullRequestSchema = void 0;
|
|
4
|
+
var schemas_1 = require("../schemas");
|
|
5
|
+
Object.defineProperty(exports, "GetPullRequestSchema", { enumerable: true, get: function () { return schemas_1.GetPullRequestSchema; } });
|
|
6
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/features/pull-requests/get-pull-request/schema.ts"],"names":[],"mappings":";;;AAAA,sCAAkD;AAAzC,+GAAA,oBAAoB,OAAA"}
|