atlassian-python-api 3.41.16__tar.gz → 3.41.19__tar.gz
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.
- {atlassian_python_api-3.41.16/atlassian_python_api.egg-info → atlassian_python_api-3.41.19}/PKG-INFO +16 -2
- atlassian_python_api-3.41.19/atlassian/VERSION +1 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/__init__.py +58 -8
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/base.py +3 -1
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/repositories/__init__.py +2 -2
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/repositories/commits.py +27 -1
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/server/projects/repos/__init__.py +2 -1
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/confluence.py +295 -44
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/insight.py +2 -3
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/jira.py +42 -33
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/rest_client.py +120 -25
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/service_desk.py +11 -9
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19/atlassian_python_api.egg-info}/PKG-INFO +16 -2
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian_python_api.egg-info/SOURCES.txt +1 -43
- atlassian_python_api-3.41.19/tests/responses/jira/rest/api/2/issue/FOO-123/remotelink/POST +17 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/test_jira.py +37 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tox.ini +8 -1
- atlassian_python_api-3.41.16/atlassian/VERSION +0 -1
- atlassian_python_api-3.41.16/tests/__pycache__/__init__.cpython-311.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/mockup.cpython-311.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_base.cpython-311-pytest-7.2.0.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_base.cpython-311-pytest-7.2.1.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_base.cpython-311-pytest-7.3.1.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_base.cpython-311-pytest-7.4.0.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_base.cpython-311-pytest-7.4.2.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_bitbucket_cloud_oo.cpython-311-pytest-7.2.0.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_bitbucket_cloud_oo.cpython-311-pytest-7.2.1.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_bitbucket_cloud_oo.cpython-311-pytest-7.3.1.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_bitbucket_cloud_oo.cpython-311-pytest-7.4.0.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_bitbucket_cloud_oo.cpython-311-pytest-7.4.2.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_bitbucket_server.cpython-311-pytest-7.2.0.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_bitbucket_server.cpython-311-pytest-7.2.1.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_bitbucket_server.cpython-311-pytest-7.3.1.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_bitbucket_server.cpython-311-pytest-7.4.0.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_bitbucket_server.cpython-311-pytest-7.4.2.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_bitbucket_server_oo.cpython-311-pytest-7.2.0.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_bitbucket_server_oo.cpython-311-pytest-7.2.1.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_bitbucket_server_oo.cpython-311-pytest-7.3.1.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_bitbucket_server_oo.cpython-311-pytest-7.4.0.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_bitbucket_server_oo.cpython-311-pytest-7.4.2.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_confluence_advanced_mode.cpython-311-pytest-7.2.0.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_confluence_advanced_mode.cpython-311-pytest-7.2.1.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_confluence_advanced_mode.cpython-311-pytest-7.3.1.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_confluence_advanced_mode.cpython-311-pytest-7.4.0.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_confluence_advanced_mode.cpython-311-pytest-7.4.2.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_confluence_attach.cpython-311-pytest-7.2.0.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_confluence_attach.cpython-311-pytest-7.2.1.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_confluence_attach.cpython-311-pytest-7.3.1.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_confluence_attach.cpython-311-pytest-7.4.0.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_confluence_attach.cpython-311-pytest-7.4.2.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_jira.cpython-311-pytest-7.2.0.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_jira.cpython-311-pytest-7.2.1.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_jira.cpython-311-pytest-7.3.1.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_jira.cpython-311-pytest-7.4.0.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_jira.cpython-311-pytest-7.4.2.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_jira.cpython-311-pytest-8.0.0.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_servicedesk.cpython-311-pytest-7.2.0.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_servicedesk.cpython-311-pytest-7.2.1.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_servicedesk.cpython-311-pytest-7.3.1.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_servicedesk.cpython-311-pytest-7.4.0.pyc +0 -0
- atlassian_python_api-3.41.16/tests/__pycache__/test_servicedesk.cpython-311-pytest-7.4.2.pyc +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/LICENSE +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/MANIFEST.in +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/README.rst +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/__init__.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bamboo.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/base.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/__init__.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/common/__init__.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/common/builds.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/common/comments.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/common/users.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/repositories/branchRestrictions.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/repositories/defaultReviewers.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/repositories/deploymentEnvironments.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/repositories/diffstat.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/repositories/groupPermissions.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/repositories/hooks.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/repositories/issues.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/repositories/pipelines.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/repositories/pullRequests.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/repositories/refs.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/repositories/repositoryVariables.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/workspaces/__init__.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/workspaces/members.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/workspaces/permissions.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/workspaces/projects.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/server/__init__.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/server/base.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/server/common/__init__.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/server/common/permissions.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/server/globalPermissions.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/server/projects/__init__.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/cloud_admin.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/crowd.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/errors.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/marketplace.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/portfolio.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/request_utils.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/statuspage.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/utils.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/xray.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian_python_api.egg-info/dependency_links.txt +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian_python_api.egg-info/not-zip-safe +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian_python_api.egg-info/requires.txt +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian_python_api.egg-info/top_level.txt +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/pyproject.toml +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/requirements.txt +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/setup.cfg +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/setup.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/__init__.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/mockup.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/TestRepositoryCreated/POST +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/branch-restrictions/17203842/DELETE +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/branch-restrictions/17203842/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/branch-restrictions/17203842/PUT +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/branch-restrictions/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/default-reviewers/DefaultReviewer1Uuid/DELETE +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/default-reviewers/DefaultReviewer1Uuid/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/default-reviewers/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/issues/3/DELETE +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/issues/3/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/issues/3/PUT +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/issues/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/issues/POST +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/POST +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/{PipelineUuid}/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/{PipelineUuid}/steps/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/{PipelineUuid}/steps/{PipelineStep1Uuid}/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/{PipelineUuid}/steps/{PipelineStep2Uuid}/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/{PipelineUuid}/steps/{PipelineStep2Uuid}/log/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pipelines/{PipelineUuid}/stopPipeline/POST +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/approve/DELETE +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/approve/POST +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/comments/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/comments/POST +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/commits/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/decline/POST +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/merge/POST +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/request-changes/DELETE +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/request-changes/POST +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/statuses/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/tasks/123456/DELETE +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/tasks/123456/PUT +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/tasks/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/1/tasks/POST +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/25/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/repositories/TestWorkspace1/testrepository1/pullrequests/POST +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/workspaces/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/workspaces/TestWorkspace1/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/workspaces/TestWorkspace2/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/cloud/2.0/workspaces/TestWorkspace3/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/groups/DELETE +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/groups/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/groups/none/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/users/DELETE +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/users/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/admin/permissions/users/none/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/PUT +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/groups/DELETE +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/groups/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/groups/none/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/users/DELETE +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/users/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/permissions/users/none/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/PUT +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/archive/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/contributing/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/default-branch/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/default-branch/PUT +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/forks/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/license/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/groups/DELETE +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/groups/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/groups/none/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/users/DELETE +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/users/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/permissions/users/none/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/readme/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/related/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/webhooks/3/DELETE +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/webhooks/3/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/webhooks/3/PUT +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/webhooks/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/bitbucket/server/rest/api/1.0/projects/PRJ/repos/my-repo1-slug/webhooks/POST +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/jira/rest/agile/1.0/epic/BAR-22/issue/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/jira/rest/agile/1.0/epic/none/issue/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/jira/rest/api/2/comment/list/POST +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/jira/rest/api/2/issue/FOO-123/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/jira/rest/api/2/issue/FOO-123/comment/10000/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/jira/rest/api/2/issue/FOO-123/comment/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/jira/rest/api/2/issue/FOO-123/properties/Bar1/DELETE +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/jira/rest/api/2/issue/FOO-123/properties/Bar1/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/jira/rest/api/2/issue/FOO-123/properties/Bar1/PUT +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/jira/rest/api/2/issue/FOO-123/properties/Bar2New/PUT +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/jira/rest/api/2/issue/FOO-123/properties/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/jira/rest/api/2/issue/POST +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/jira/rest/api/2/issue/REGEX-123/file.txt +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/customer/POST +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/organization/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/organization/POST +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/organization/{organizationId}/DELETE +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/organization/{organizationId}/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/organization/{organizationId}/property/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/organization/{organizationId}/user/DELETE +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/organization/{organizationId}/user/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/organization/{organizationId}/user/POST +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/servicedesk/{serviceDeskId}/customer/DELETE +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/servicedesk/{serviceDeskId}/customer/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/servicedesk/{serviceDeskId}/customer/POST +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/servicedesk/{serviceDeskId}/organization/DELETE +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/servicedesk/{serviceDeskId}/organization/GET +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/responses/servicedesk/rest/servicedeskapi/servicedesk/{serviceDeskId}/organization/POST +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/test_base.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/test_bitbucket_cloud_oo.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/test_bitbucket_server.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/test_bitbucket_server_oo.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/test_confluence_advanced_mode.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/test_confluence_attach.py +0 -0
- {atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/tests/test_servicedesk.py +0 -0
{atlassian_python_api-3.41.16/atlassian_python_api.egg-info → atlassian_python_api-3.41.19}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: atlassian-python-api
|
|
3
|
-
Version: 3.41.
|
|
3
|
+
Version: 3.41.19
|
|
4
4
|
Summary: Python Atlassian REST API Wrapper
|
|
5
5
|
Home-page: https://github.com/atlassian-api/atlassian-python-api
|
|
6
6
|
Download-URL: https://github.com/atlassian-api/atlassian-python-api
|
|
@@ -54,6 +54,20 @@ Requires-Dist: jmespath
|
|
|
54
54
|
Requires-Dist: beautifulsoup4
|
|
55
55
|
Provides-Extra: kerberos
|
|
56
56
|
Requires-Dist: requests-kerberos; extra == "kerberos"
|
|
57
|
+
Dynamic: author
|
|
58
|
+
Dynamic: author-email
|
|
59
|
+
Dynamic: classifier
|
|
60
|
+
Dynamic: description
|
|
61
|
+
Dynamic: download-url
|
|
62
|
+
Dynamic: home-page
|
|
63
|
+
Dynamic: keywords
|
|
64
|
+
Dynamic: license
|
|
65
|
+
Dynamic: maintainer
|
|
66
|
+
Dynamic: maintainer-email
|
|
67
|
+
Dynamic: platform
|
|
68
|
+
Dynamic: provides-extra
|
|
69
|
+
Dynamic: requires-dist
|
|
70
|
+
Dynamic: summary
|
|
57
71
|
|
|
58
72
|
============================
|
|
59
73
|
Atlassian Python API wrapper
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.41.19
|
{atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/__init__.py
RENAMED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
2
|
import logging
|
|
3
3
|
from enum import Enum
|
|
4
|
-
from typing import Optional, Union
|
|
5
4
|
|
|
6
5
|
from deprecated import deprecated
|
|
7
6
|
from requests import HTTPError
|
|
@@ -1907,6 +1906,22 @@ class Bitbucket(BitbucketBase):
|
|
|
1907
1906
|
params["limit"] = limit
|
|
1908
1907
|
return self._get_paged(url, params)
|
|
1909
1908
|
|
|
1909
|
+
def assign_pull_request_participant_role(
|
|
1910
|
+
self, project_key: str, repository_slug: str, pull_request_id: int, role: str, user: str
|
|
1911
|
+
) -> dict:
|
|
1912
|
+
"""
|
|
1913
|
+
Assign a role to a user for a pull request
|
|
1914
|
+
:param project_key: The project key
|
|
1915
|
+
:param repository_slug: The repository key
|
|
1916
|
+
:param pull_request_id: The pull request id
|
|
1917
|
+
:param role: The role to assign, currently it only accepts REVIEWER
|
|
1918
|
+
:param user: The user to assign the role to
|
|
1919
|
+
:return:
|
|
1920
|
+
"""
|
|
1921
|
+
url = self._url_pull_request_participants(project_key, repository_slug, pull_request_id)
|
|
1922
|
+
data = {"role": role, "user": {"name": user}}
|
|
1923
|
+
return self.post(url, data=data)
|
|
1924
|
+
|
|
1910
1925
|
def get_dashboard_pull_requests(
|
|
1911
1926
|
self,
|
|
1912
1927
|
start=0,
|
|
@@ -2105,6 +2120,37 @@ class Bitbucket(BitbucketBase):
|
|
|
2105
2120
|
data = {"version": comment_version}
|
|
2106
2121
|
return self.delete(url, params=data)
|
|
2107
2122
|
|
|
2123
|
+
def _url_pull_request_blocker_comments(self, project_key, repository_slug, pull_request_id) -> str:
|
|
2124
|
+
url = "{}/blocker-comments".format(self._url_pull_request(project_key, repository_slug, pull_request_id))
|
|
2125
|
+
return url
|
|
2126
|
+
|
|
2127
|
+
def add_pull_request_blocker_comment(
|
|
2128
|
+
self, project_key: str, repository_slug: str, pull_request_id: int, text: dict, severity: str
|
|
2129
|
+
) -> dict:
|
|
2130
|
+
"""
|
|
2131
|
+
Add a comment to a pull request that blocks the merge
|
|
2132
|
+
:param project_key: The project key
|
|
2133
|
+
:param repository_slug: The repository key
|
|
2134
|
+
:param pull_request_id: The pull request id
|
|
2135
|
+
:param text: The text of the comment
|
|
2136
|
+
:param severity: The severity of the comment
|
|
2137
|
+
:return:
|
|
2138
|
+
"""
|
|
2139
|
+
url = self._url_pull_request_blocker_comments(project_key, repository_slug, pull_request_id)
|
|
2140
|
+
data = {"text": text, "severity": severity}
|
|
2141
|
+
return self.post(url, data=data)
|
|
2142
|
+
|
|
2143
|
+
def search_pull_request_blocker_comment(self, project_key: str, repository_slug: str, pull_request_id: int) -> dict:
|
|
2144
|
+
"""
|
|
2145
|
+
Get all comments that block the merge of a pull request
|
|
2146
|
+
:param project_key: The project key
|
|
2147
|
+
:param repository_slug: The repository key
|
|
2148
|
+
:param pull_request_id: The pull request id
|
|
2149
|
+
:return:
|
|
2150
|
+
"""
|
|
2151
|
+
url = self._url_pull_request_blocker_comments(project_key, repository_slug, pull_request_id)
|
|
2152
|
+
return self.get(url)
|
|
2153
|
+
|
|
2108
2154
|
def decline_pull_request(self, project_key, repository_slug, pr_id, pr_version):
|
|
2109
2155
|
"""
|
|
2110
2156
|
Decline a pull request.
|
|
@@ -2208,13 +2254,13 @@ class Bitbucket(BitbucketBase):
|
|
|
2208
2254
|
|
|
2209
2255
|
def merge_pull_request(
|
|
2210
2256
|
self,
|
|
2211
|
-
project_key
|
|
2212
|
-
repository_slug
|
|
2213
|
-
pr_id
|
|
2214
|
-
merge_message
|
|
2215
|
-
close_source_branch
|
|
2216
|
-
merge_strategy
|
|
2217
|
-
pr_version
|
|
2257
|
+
project_key,
|
|
2258
|
+
repository_slug,
|
|
2259
|
+
pr_id,
|
|
2260
|
+
merge_message,
|
|
2261
|
+
close_source_branch=False,
|
|
2262
|
+
merge_strategy=MergeStrategy.MERGE_COMMIT,
|
|
2263
|
+
pr_version=None,
|
|
2218
2264
|
):
|
|
2219
2265
|
"""
|
|
2220
2266
|
Merge pull request
|
|
@@ -2330,6 +2376,7 @@ class Bitbucket(BitbucketBase):
|
|
|
2330
2376
|
limit=None,
|
|
2331
2377
|
until=None,
|
|
2332
2378
|
since=None,
|
|
2379
|
+
path=None,
|
|
2333
2380
|
):
|
|
2334
2381
|
"""
|
|
2335
2382
|
Get commit list from repo
|
|
@@ -2347,6 +2394,7 @@ class Bitbucket(BitbucketBase):
|
|
|
2347
2394
|
fixed system limits. Default by built-in method: None
|
|
2348
2395
|
:param until: OPTIONAL: The commit ID or ref (inclusively) to retrieve commits before
|
|
2349
2396
|
:param since: OPTIONAL: The commit ID or ref (exclusively) to retrieve commits after
|
|
2397
|
+
:param path: OPTIONAL: An optional path to filter commits by
|
|
2350
2398
|
:return:
|
|
2351
2399
|
"""
|
|
2352
2400
|
url = self._url_commits(project_key, repository_slug)
|
|
@@ -2373,6 +2421,8 @@ class Bitbucket(BitbucketBase):
|
|
|
2373
2421
|
params["since"] = since
|
|
2374
2422
|
if until:
|
|
2375
2423
|
params["until"] = until
|
|
2424
|
+
if path:
|
|
2425
|
+
params["path"] = path
|
|
2376
2426
|
return self._get_paged(url, params=params)
|
|
2377
2427
|
|
|
2378
2428
|
def get_commit_changes(self, project_key, repository_slug, hash_newest=None, merges="include", commit_id=None):
|
{atlassian_python_api-3.41.16 → atlassian_python_api-3.41.19}/atlassian/bitbucket/cloud/base.py
RENAMED
|
@@ -113,7 +113,9 @@ class BitbucketCloudBase(BitbucketBase):
|
|
|
113
113
|
e = j["error"]
|
|
114
114
|
error_msg = e["message"]
|
|
115
115
|
if e.get("detail"):
|
|
116
|
-
|
|
116
|
+
# It uses interpolation instead of concatenation because of
|
|
117
|
+
# https://github.com/atlassian-api/atlassian-python-api/issues/1481
|
|
118
|
+
error_msg = "{}\n{}".format(error_msg, str(e["detail"]))
|
|
117
119
|
except Exception as e:
|
|
118
120
|
log.error(e)
|
|
119
121
|
response.raise_for_status()
|
|
@@ -263,8 +263,8 @@ class Repository(BitbucketCloudBase):
|
|
|
263
263
|
self.__hooks = Hooks(
|
|
264
264
|
"{}/hooks".format(self.url),
|
|
265
265
|
data={"links": {"hooks": {"href": "{}/hooks".format(self.url)}}},
|
|
266
|
-
**self._new_session_args
|
|
267
|
-
)
|
|
266
|
+
**self._new_session_args
|
|
267
|
+
) # fmt: skip
|
|
268
268
|
self.__default_reviewers = DefaultReviewers("{}/default-reviewers".format(self.url), **self._new_session_args)
|
|
269
269
|
self.__deployment_environments = DeploymentEnvironments(
|
|
270
270
|
"{}/environments".format(self.url), **self._new_session_args
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from ..base import BitbucketCloudBase
|
|
4
4
|
from ..common.builds import Build
|
|
5
5
|
from ..common.comments import Comment
|
|
6
|
-
from ..common.users import
|
|
6
|
+
from ..common.users import Participant, User
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class Commits(BitbucketCloudBase):
|
|
@@ -186,3 +186,29 @@ class Commit(BitbucketCloudBase):
|
|
|
186
186
|
API docs: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-commit-commit-approve-delete
|
|
187
187
|
"""
|
|
188
188
|
return super(BitbucketCloudBase, self).delete("approve")
|
|
189
|
+
|
|
190
|
+
def get_pull_requests(self, start=0, pagelen=0):
|
|
191
|
+
"""
|
|
192
|
+
Retrieves pull requests associated with the current commit.
|
|
193
|
+
|
|
194
|
+
Pull Request Commit Links app must be installed first before using this API;
|
|
195
|
+
installation automatically occurs when 'Go to pull request' is clicked
|
|
196
|
+
from the web interface for a commit's details.
|
|
197
|
+
|
|
198
|
+
API docs: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/#api-repositories-workspace-repo-slug-commit-commit-pullrequests-get
|
|
199
|
+
|
|
200
|
+
:param start: int, OPTIONAL: The starting page of pull requests to retrieve. Defaults to 0.
|
|
201
|
+
:param pagelen: int, OPTIONAL: The number of pull requests to retrieve per page. Defaults to 0.
|
|
202
|
+
:return: Generator[PullRequest]: A generator that yields `PullRequest` objects.
|
|
203
|
+
"""
|
|
204
|
+
# NOTE: Import moved inside the method to avoid circular import issues
|
|
205
|
+
from ...cloud.repositories.pullRequests import PullRequest
|
|
206
|
+
|
|
207
|
+
params = {}
|
|
208
|
+
if start:
|
|
209
|
+
params["page"] = start
|
|
210
|
+
if pagelen:
|
|
211
|
+
params["pagelen"] = pagelen
|
|
212
|
+
|
|
213
|
+
for pull_request in self._get_paged(url="pullrequests", params=params):
|
|
214
|
+
yield PullRequest(pull_request, **self._new_session_args)
|
|
@@ -301,7 +301,8 @@ class Repository(BitbucketServerBase):
|
|
|
301
301
|
For further information visit:
|
|
302
302
|
https://docs.atlassian.com/bitbucket-server/rest/7.13.0/bitbucket-rest.html#idp199
|
|
303
303
|
:param dest_fd: a file-like object to which the archive will be written
|
|
304
|
-
:param at: string: Optional, the commit to download an archive of; if not supplied,
|
|
304
|
+
:param at: string: Optional, the commit to download an archive of; if not supplied,
|
|
305
|
+
an archive of the default branch is downloaded
|
|
305
306
|
:param filename: string: Optional, a filename to include the "Content-Disposition" header
|
|
306
307
|
:param format: string: Optional, the format to stream the archive in; must be one of: zip, tar, tar.gz or tgz.
|
|
307
308
|
If not specified, then the archive will be in zip format.
|
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
+
import io
|
|
3
|
+
import json
|
|
2
4
|
import logging
|
|
3
5
|
import os
|
|
4
|
-
import time
|
|
5
|
-
import json
|
|
6
6
|
import re
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
from deprecated import deprecated
|
|
7
|
+
import time
|
|
8
|
+
|
|
10
9
|
from bs4 import BeautifulSoup
|
|
10
|
+
from deprecated import deprecated
|
|
11
|
+
import requests
|
|
12
|
+
from requests import HTTPError
|
|
13
|
+
|
|
11
14
|
from atlassian import utils
|
|
12
|
-
from .errors import
|
|
15
|
+
from .errors import (
|
|
16
|
+
ApiConflictError,
|
|
17
|
+
ApiError,
|
|
18
|
+
ApiNotAcceptable,
|
|
19
|
+
ApiNotFoundError,
|
|
20
|
+
ApiPermissionError,
|
|
21
|
+
ApiValueError,
|
|
22
|
+
)
|
|
13
23
|
from .rest_client import AtlassianRestAPI
|
|
14
24
|
|
|
15
25
|
log = logging.getLogger(__name__)
|
|
@@ -136,6 +146,24 @@ class Confluence(AtlassianRestAPI):
|
|
|
136
146
|
else:
|
|
137
147
|
return False
|
|
138
148
|
|
|
149
|
+
def share_with_others(self, page_id, group, message):
|
|
150
|
+
"""
|
|
151
|
+
Notify members (currently only groups implemented) about something on that page
|
|
152
|
+
"""
|
|
153
|
+
url = "rest/share-page/latest/share"
|
|
154
|
+
params = {
|
|
155
|
+
"contextualPageId": page_id,
|
|
156
|
+
# "emails": [],
|
|
157
|
+
"entityId": page_id,
|
|
158
|
+
"entityType": "page",
|
|
159
|
+
"groups": group,
|
|
160
|
+
"note": message,
|
|
161
|
+
# "users":[]
|
|
162
|
+
}
|
|
163
|
+
r = self.post(url, json=params, headers={"contentType": "application/json; charset=utf-8"}, advanced_mode=True)
|
|
164
|
+
if r.status_code != 200:
|
|
165
|
+
raise Exception("failed sharing content {code}: {reason}".format(code=r.status_code, reason=r.text))
|
|
166
|
+
|
|
139
167
|
def get_page_child_by_type(self, page_id, type="page", start=None, limit=None, expand=None):
|
|
140
168
|
"""
|
|
141
169
|
Provide content by type (page, blog, comment)
|
|
@@ -362,7 +390,8 @@ class Confluence(AtlassianRestAPI):
|
|
|
362
390
|
"""
|
|
363
391
|
Fetches html tables added to confluence page
|
|
364
392
|
:param page_id: integer confluence page_id
|
|
365
|
-
:return: json object with page_id, number_of_tables_in_page
|
|
393
|
+
:return: json object with page_id, number_of_tables_in_page
|
|
394
|
+
and list of list tables_content representing scraped tables
|
|
366
395
|
"""
|
|
367
396
|
try:
|
|
368
397
|
page_content = self.get_page_by_id(page_id, expand="body.storage")["body"]["storage"]["value"]
|
|
@@ -692,10 +721,76 @@ class Confluence(AtlassianRestAPI):
|
|
|
692
721
|
|
|
693
722
|
return response.get("results")
|
|
694
723
|
|
|
724
|
+
def get_all_pages_by_space_ids_confluence_cloud(
|
|
725
|
+
self,
|
|
726
|
+
space_ids,
|
|
727
|
+
batch_size=250,
|
|
728
|
+
sort=None,
|
|
729
|
+
status=None,
|
|
730
|
+
title=None,
|
|
731
|
+
body_format=None,
|
|
732
|
+
):
|
|
733
|
+
"""
|
|
734
|
+
Get all pages from a set of space ids:
|
|
735
|
+
https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-get
|
|
736
|
+
:param space_ids: A Set of space IDs passed as a filter to Confluence
|
|
737
|
+
:param batch_size: OPTIONAL: The batch size of pages to retrieve from confluence per request MAX is 250.
|
|
738
|
+
Default: 250
|
|
739
|
+
:param sort: OPTIONAL: The order the pages are retrieved in.
|
|
740
|
+
Valid values:
|
|
741
|
+
id, -id, created-date, -created-date, modified-date, -modified-date, title, -title
|
|
742
|
+
:param status: OPTIONAL: Filter pages based on their status.
|
|
743
|
+
Valid values: current, archived, deleted, trashed
|
|
744
|
+
Default: current,archived
|
|
745
|
+
:param title: OPTIONAL: Filter pages based on their title.
|
|
746
|
+
:param body_format: OPTIONAL: The format of the body in the response. Valid values: storage, atlas_doc_format
|
|
747
|
+
:return:
|
|
748
|
+
"""
|
|
749
|
+
path = "/api/v2/pages"
|
|
750
|
+
params = {}
|
|
751
|
+
if space_ids:
|
|
752
|
+
params["space-id"] = ",".join(space_ids)
|
|
753
|
+
if batch_size:
|
|
754
|
+
params["limit"] = batch_size
|
|
755
|
+
if sort:
|
|
756
|
+
params["sort"] = sort
|
|
757
|
+
if status:
|
|
758
|
+
params["status"] = status
|
|
759
|
+
if title:
|
|
760
|
+
params["title"] = title
|
|
761
|
+
if body_format:
|
|
762
|
+
params["body-format"] = body_format
|
|
763
|
+
|
|
764
|
+
_all_pages = []
|
|
765
|
+
try:
|
|
766
|
+
while True:
|
|
767
|
+
response = self.get(path, params=params)
|
|
768
|
+
|
|
769
|
+
pages = response.get("results")
|
|
770
|
+
_all_pages = _all_pages + pages
|
|
771
|
+
|
|
772
|
+
links = response.get("_links")
|
|
773
|
+
if links is not None and "next" in links:
|
|
774
|
+
path = response["_links"]["next"].removeprefix("/wiki/")
|
|
775
|
+
params = {}
|
|
776
|
+
else:
|
|
777
|
+
break
|
|
778
|
+
except HTTPError as e:
|
|
779
|
+
if e.response.status_code == 400:
|
|
780
|
+
raise ApiValueError(
|
|
781
|
+
"The configured params cannot be interpreted by Confluence"
|
|
782
|
+
"Check the api documentation for valid values for status, expand, and sort params",
|
|
783
|
+
reason=e,
|
|
784
|
+
)
|
|
785
|
+
if e.response.status_code == 401:
|
|
786
|
+
raise HTTPError("Unauthorized (401)", response=response)
|
|
787
|
+
raise
|
|
788
|
+
|
|
789
|
+
return _all_pages
|
|
790
|
+
|
|
695
791
|
@deprecated(version="2.4.2", reason="Use get_all_restrictions_for_content()")
|
|
696
792
|
def get_all_restictions_for_content(self, content_id):
|
|
697
793
|
"""Let's use the get_all_restrictions_for_content()"""
|
|
698
|
-
log.warning("Please, be informed that is deprecated as typo naming")
|
|
699
794
|
return self.get_all_restrictions_for_content(content_id=content_id)
|
|
700
795
|
|
|
701
796
|
def get_all_restrictions_for_content(self, content_id):
|
|
@@ -1324,40 +1419,83 @@ class Confluence(AtlassianRestAPI):
|
|
|
1324
1419
|
comment=comment,
|
|
1325
1420
|
)
|
|
1326
1421
|
|
|
1327
|
-
def download_attachments_from_page(self, page_id, path=None, start=0, limit=50):
|
|
1328
|
-
"""
|
|
1329
|
-
Downloads
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
:param
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1422
|
+
def download_attachments_from_page(self, page_id, path=None, start=0, limit=50, filename=None, to_memory=False):
|
|
1423
|
+
"""
|
|
1424
|
+
Downloads attachments from a Confluence page. Supports downloading all files or a specific file.
|
|
1425
|
+
Files can either be saved to disk or returned as BytesIO objects for in-memory handling.
|
|
1426
|
+
|
|
1427
|
+
:param page_id: str
|
|
1428
|
+
The ID of the Confluence page to fetch attachments from.
|
|
1429
|
+
:param path: str, optional
|
|
1430
|
+
Directory where attachments will be saved. If None, defaults to the current working directory.
|
|
1431
|
+
Ignored if `to_memory` is True.
|
|
1432
|
+
:param start: int, optional
|
|
1433
|
+
The start point for paginated attachment fetching. Default is 0. Ignored if `filename` is specified.
|
|
1434
|
+
:param limit: int, optional
|
|
1435
|
+
The maximum number of attachments to fetch per request. Default is 50. Ignored if `filename` is specified.
|
|
1436
|
+
:param filename: str, optional
|
|
1437
|
+
The name of a specific file to download. If provided, only this file will be fetched.
|
|
1438
|
+
:param to_memory: bool, optional
|
|
1439
|
+
If True, attachments are returned as a dictionary of {filename: BytesIO object}.
|
|
1440
|
+
If False, files are written to the specified directory on disk.
|
|
1441
|
+
:return:
|
|
1442
|
+
- If `to_memory` is True, returns a dictionary {filename: BytesIO object}.
|
|
1443
|
+
- If `to_memory` is False, returns a summary dict: {"attachments_downloaded": int, "path": str}.
|
|
1444
|
+
:raises:
|
|
1445
|
+
- FileNotFoundError: If the specified path does not exist.
|
|
1446
|
+
- PermissionError: If there are permission issues with the specified path.
|
|
1447
|
+
- requests.HTTPError: If the HTTP request to fetch an attachment fails.
|
|
1448
|
+
- Exception: For any unexpected errors.
|
|
1449
|
+
"""
|
|
1450
|
+
# Default path to current working directory if not provided
|
|
1451
|
+
if not to_memory and path is None:
|
|
1338
1452
|
path = os.getcwd()
|
|
1453
|
+
|
|
1339
1454
|
try:
|
|
1340
|
-
attachments
|
|
1341
|
-
if
|
|
1342
|
-
|
|
1455
|
+
# Fetch attachments based on the specified parameters
|
|
1456
|
+
if filename:
|
|
1457
|
+
# Fetch specific file by filename
|
|
1458
|
+
attachments = self.get_attachments_from_content(page_id=page_id, filename=filename)["results"]
|
|
1459
|
+
if not attachments:
|
|
1460
|
+
return "No attachment with filename '{0}' found on the page.".format(filename)
|
|
1461
|
+
else:
|
|
1462
|
+
# Fetch all attachments with pagination
|
|
1463
|
+
attachments = self.get_attachments_from_content(page_id=page_id, start=start, limit=limit)["results"]
|
|
1464
|
+
if not attachments:
|
|
1465
|
+
return "No attachments found on the page."
|
|
1466
|
+
|
|
1467
|
+
# Prepare to handle downloads
|
|
1468
|
+
downloaded_files = {}
|
|
1343
1469
|
for attachment in attachments:
|
|
1344
|
-
file_name = attachment["title"]
|
|
1345
|
-
if not file_name:
|
|
1346
|
-
file_name = attachment["id"] # if the attachment has no title, use attachment_id as a filename
|
|
1470
|
+
file_name = attachment["title"] or attachment["id"] # Use attachment ID if title is unavailable
|
|
1347
1471
|
download_link = self.url + attachment["_links"]["download"]
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1472
|
+
# Fetch the file content
|
|
1473
|
+
response = self._session.get(str(download_link))
|
|
1474
|
+
response.raise_for_status() # Raise error if request fails
|
|
1475
|
+
|
|
1476
|
+
if to_memory:
|
|
1477
|
+
# Store in BytesIO object
|
|
1478
|
+
file_obj = io.BytesIO(response.content)
|
|
1479
|
+
downloaded_files[file_name] = file_obj
|
|
1480
|
+
else:
|
|
1481
|
+
# Save file to disk
|
|
1482
|
+
file_path = os.path.join(path, file_name)
|
|
1483
|
+
with open(file_path, "wb") as file:
|
|
1484
|
+
file.write(response.content)
|
|
1485
|
+
|
|
1486
|
+
# Return results based on storage mode
|
|
1487
|
+
if to_memory:
|
|
1488
|
+
return downloaded_files
|
|
1489
|
+
else:
|
|
1490
|
+
return {"attachments_downloaded": len(attachments), "path": path}
|
|
1352
1491
|
except NotADirectoryError:
|
|
1353
|
-
raise
|
|
1492
|
+
raise FileNotFoundError("The directory '{path}' does not exist.".format(path=path))
|
|
1354
1493
|
except PermissionError:
|
|
1355
|
-
raise PermissionError(
|
|
1356
|
-
|
|
1357
|
-
)
|
|
1358
|
-
except Exception as
|
|
1359
|
-
raise
|
|
1360
|
-
return {"attachments downloaded": len(attachments), " to path ": path}
|
|
1494
|
+
raise PermissionError("Permission denied when trying to save files to '{path}'.".format(path=path))
|
|
1495
|
+
except requests.HTTPError as http_err:
|
|
1496
|
+
raise Exception("HTTP error occurred while downloading attachments: {http_err}".format(http_err=http_err))
|
|
1497
|
+
except Exception as err:
|
|
1498
|
+
raise Exception("An unexpected error occurred: {error}".format(error=err))
|
|
1361
1499
|
|
|
1362
1500
|
def delete_attachment(self, page_id, filename, version=None):
|
|
1363
1501
|
"""
|
|
@@ -1383,9 +1521,11 @@ class Confluence(AtlassianRestAPI):
|
|
|
1383
1521
|
:param version: file version
|
|
1384
1522
|
:return:
|
|
1385
1523
|
"""
|
|
1386
|
-
|
|
1387
|
-
"rest/
|
|
1388
|
-
|
|
1524
|
+
if self.cloud:
|
|
1525
|
+
url = "rest/api/content/{id}/version/{versionId}".format(id=attachment_id, versionId=version)
|
|
1526
|
+
else:
|
|
1527
|
+
url = "rest/experimental/content/{id}/version/{versionId}".format(id=attachment_id, versionId=version)
|
|
1528
|
+
return self.delete(url)
|
|
1389
1529
|
|
|
1390
1530
|
def remove_page_attachment_keep_version(self, page_id, filename, keep_last_versions):
|
|
1391
1531
|
"""
|
|
@@ -1422,7 +1562,10 @@ class Confluence(AtlassianRestAPI):
|
|
|
1422
1562
|
:return
|
|
1423
1563
|
"""
|
|
1424
1564
|
params = {"limit": limit, "start": start}
|
|
1425
|
-
|
|
1565
|
+
if self.cloud:
|
|
1566
|
+
url = "rest/api/content/{id}/version".format(id=attachment_id)
|
|
1567
|
+
else:
|
|
1568
|
+
url = "rest/experimental/content/{id}/version".format(id=attachment_id)
|
|
1426
1569
|
return (self.get(url, params=params) or {}).get("results")
|
|
1427
1570
|
|
|
1428
1571
|
# @todo prepare more attachments info
|
|
@@ -2217,7 +2360,7 @@ class Confluence(AtlassianRestAPI):
|
|
|
2217
2360
|
:param name: str
|
|
2218
2361
|
:return:
|
|
2219
2362
|
"""
|
|
2220
|
-
log.
|
|
2363
|
+
log.info("Removing group: %s during Confluence remove_group method execution", name)
|
|
2221
2364
|
url = "rest/api/admin/group/{groupName}".format(groupName=name)
|
|
2222
2365
|
|
|
2223
2366
|
try:
|
|
@@ -2590,6 +2733,113 @@ class Confluence(AtlassianRestAPI):
|
|
|
2590
2733
|
url = "exportword?pageId={pageId}".format(pageId=page_id)
|
|
2591
2734
|
return self.get(url, headers=headers, not_json_response=True)
|
|
2592
2735
|
|
|
2736
|
+
def get_space_export(self, space_key: str, export_type: str) -> str:
|
|
2737
|
+
"""
|
|
2738
|
+
Export a Confluence space to a file of the specified type.
|
|
2739
|
+
(!) This method was developed for Confluence Cloud and may not work with Confluence on-prem.
|
|
2740
|
+
(!) This is an experimental method that does not trigger an officially supported REST endpoint.
|
|
2741
|
+
It may break if Atlassian changes the space export front-end logic.
|
|
2742
|
+
|
|
2743
|
+
:param space_key: The key of the space to export.
|
|
2744
|
+
:param export_type: The type of export to perform. Valid values are: 'html', 'csv', 'xml', 'pdf'.
|
|
2745
|
+
:return: The URL to download the exported file.
|
|
2746
|
+
"""
|
|
2747
|
+
|
|
2748
|
+
def get_atl_request(url: str):
|
|
2749
|
+
# Nested function used to get atl_token used for XSRF protection.
|
|
2750
|
+
# This is only applicable to html/csv/xml space exports
|
|
2751
|
+
try:
|
|
2752
|
+
response = self.get(url, advanced_mode=True)
|
|
2753
|
+
parsed_html = BeautifulSoup(response.text, "html.parser")
|
|
2754
|
+
atl_token = parsed_html.find("input", {"name": "atl_token"}).get("value")
|
|
2755
|
+
return atl_token
|
|
2756
|
+
except Exception as e:
|
|
2757
|
+
raise ApiError("Problems with getting the atl_token for get_space_export method :", reason=e)
|
|
2758
|
+
|
|
2759
|
+
# Checks if space_ke parameter is valid and if api_token has relevant permissions to space
|
|
2760
|
+
self.get_space(space_key=space_key, expand="permissions")
|
|
2761
|
+
|
|
2762
|
+
try:
|
|
2763
|
+
log.info(
|
|
2764
|
+
"Initiated experimental get_space_export method for export type: "
|
|
2765
|
+
+ export_type
|
|
2766
|
+
+ " from Confluence space: "
|
|
2767
|
+
+ space_key
|
|
2768
|
+
)
|
|
2769
|
+
if export_type == "csv":
|
|
2770
|
+
form_data = {
|
|
2771
|
+
"atl_token": get_atl_request(
|
|
2772
|
+
"spaces/exportspacecsv.action?key={space_key}".format(space_key=space_key)
|
|
2773
|
+
),
|
|
2774
|
+
"exportType": "TYPE_CSV",
|
|
2775
|
+
"contentOption": "all",
|
|
2776
|
+
"includeComments": "true",
|
|
2777
|
+
"confirm": "Export",
|
|
2778
|
+
}
|
|
2779
|
+
elif export_type == "html":
|
|
2780
|
+
form_data = {
|
|
2781
|
+
"atl_token": get_atl_request(
|
|
2782
|
+
"spaces/exportspacehtml.action?key={space_key}".format(space_key=space_key)
|
|
2783
|
+
),
|
|
2784
|
+
"exportType": "TYPE_HTML",
|
|
2785
|
+
"contentOption": "visibleOnly",
|
|
2786
|
+
"includeComments": "true",
|
|
2787
|
+
"confirm": "Export",
|
|
2788
|
+
}
|
|
2789
|
+
elif export_type == "xml":
|
|
2790
|
+
form_data = {
|
|
2791
|
+
"atl_token": get_atl_request(
|
|
2792
|
+
"spaces/exportspacexml.action?key={space_key}".format(space_key=space_key)
|
|
2793
|
+
),
|
|
2794
|
+
"exportType": "TYPE_XML",
|
|
2795
|
+
"contentOption": "all",
|
|
2796
|
+
"includeComments": "true",
|
|
2797
|
+
"confirm": "Export",
|
|
2798
|
+
}
|
|
2799
|
+
elif export_type == "pdf":
|
|
2800
|
+
url = "spaces/flyingpdf/doflyingpdf.action?key=" + space_key
|
|
2801
|
+
log.info("Initiated PDF space export")
|
|
2802
|
+
return self.get_pdf_download_url_for_confluence_cloud(url)
|
|
2803
|
+
else:
|
|
2804
|
+
raise ValueError("Invalid export_type parameter value. Valid values are: 'html/csv/xml/pdf'")
|
|
2805
|
+
url = self.url_joiner(
|
|
2806
|
+
url=self.url, path="spaces/doexportspace.action?key={space_key}".format(space_key=space_key)
|
|
2807
|
+
)
|
|
2808
|
+
|
|
2809
|
+
# Sending a POST request that triggers the space export.
|
|
2810
|
+
response = self.session.post(url, headers=self.form_token_headers, data=form_data)
|
|
2811
|
+
parsed_html = BeautifulSoup(response.text, "html.parser")
|
|
2812
|
+
# Getting the poll URL to get the export progress status
|
|
2813
|
+
try:
|
|
2814
|
+
poll_url = parsed_html.find("meta", {"name": "ajs-pollURI"}).get("content")
|
|
2815
|
+
except Exception as e:
|
|
2816
|
+
raise ApiError("Problems with getting the poll_url for get_space_export method :", reason=e)
|
|
2817
|
+
running_task = True
|
|
2818
|
+
while running_task:
|
|
2819
|
+
try:
|
|
2820
|
+
progress_response = self.get(poll_url)
|
|
2821
|
+
log.info("Space" + space_key + " export status: " + progress_response["message"])
|
|
2822
|
+
if progress_response["complete"]:
|
|
2823
|
+
parsed_html = BeautifulSoup(progress_response["message"], "html.parser")
|
|
2824
|
+
download_url = parsed_html.find("a", {"class": "space-export-download-path"}).get("href")
|
|
2825
|
+
if self.url in download_url:
|
|
2826
|
+
return download_url
|
|
2827
|
+
else:
|
|
2828
|
+
combined_url = self.url + download_url
|
|
2829
|
+
# Ensure only one /wiki is included in the path
|
|
2830
|
+
if combined_url.count("/wiki") > 1:
|
|
2831
|
+
combined_url = combined_url.replace("/wiki/wiki", "/wiki")
|
|
2832
|
+
return combined_url
|
|
2833
|
+
time.sleep(30)
|
|
2834
|
+
except Exception as e:
|
|
2835
|
+
raise ApiError(
|
|
2836
|
+
"Encountered error during space export status check from space " + space_key, reason=e
|
|
2837
|
+
)
|
|
2838
|
+
|
|
2839
|
+
return "None" # Return None if the while loop does not return a value
|
|
2840
|
+
except Exception as e:
|
|
2841
|
+
raise ApiError("Encountered error during space export from space " + space_key, reason=e)
|
|
2842
|
+
|
|
2593
2843
|
def export_page(self, page_id):
|
|
2594
2844
|
"""
|
|
2595
2845
|
Alias method for export page as pdf
|
|
@@ -2838,6 +3088,7 @@ class Confluence(AtlassianRestAPI):
|
|
|
2838
3088
|
and provides a link to download the PDF once the process completes.
|
|
2839
3089
|
This functions polls the long-running task page and returns the
|
|
2840
3090
|
download url of the PDF.
|
|
3091
|
+
This method is used in get_space_export() method for space-> PDF export.
|
|
2841
3092
|
:param url: URL to initiate PDF export
|
|
2842
3093
|
:return: Download url for PDF file
|
|
2843
3094
|
"""
|
|
@@ -2927,7 +3178,7 @@ class Confluence(AtlassianRestAPI):
|
|
|
2927
3178
|
|
|
2928
3179
|
def get_whiteboard(self, whiteboard_id):
|
|
2929
3180
|
try:
|
|
2930
|
-
url =
|
|
3181
|
+
url = "/api/v2/whiteboards/%s" % (whiteboard_id)
|
|
2931
3182
|
return self.get(url)
|
|
2932
3183
|
except HTTPError as e:
|
|
2933
3184
|
# Default 404 error handling is ambiguous
|
|
@@ -2940,7 +3191,7 @@ class Confluence(AtlassianRestAPI):
|
|
|
2940
3191
|
|
|
2941
3192
|
def delete_whiteboard(self, whiteboard_id):
|
|
2942
3193
|
try:
|
|
2943
|
-
url =
|
|
3194
|
+
url = "/api/v2/whiteboards/%s" % (whiteboard_id)
|
|
2944
3195
|
return self.delete(url)
|
|
2945
3196
|
except HTTPError as e:
|
|
2946
3197
|
# # Default 404 error handling is ambiguous
|
|
@@ -3076,7 +3327,7 @@ class Confluence(AtlassianRestAPI):
|
|
|
3076
3327
|
:param group_name: str - name of group to add user to
|
|
3077
3328
|
:return: Current state of the group
|
|
3078
3329
|
"""
|
|
3079
|
-
url =
|
|
3330
|
+
url = "rest/api/user/%s/group/%s" % (username, group_name)
|
|
3080
3331
|
return self.put(url)
|
|
3081
3332
|
|
|
3082
3333
|
def add_space_permissions(
|