Skip to content

Commit

Permalink
Renamed Devops to Azure DevOps
Browse files Browse the repository at this point in the history
  • Loading branch information
boginw committed Nov 14, 2023
1 parent 9ea0b7e commit 34205e1
Show file tree
Hide file tree
Showing 12 changed files with 90 additions and 149 deletions.
14 changes: 7 additions & 7 deletions docs/admin/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -835,9 +835,9 @@ List for credentials for Bitbucket servers.
:ref:`vcs-bitbucket-server`,
`Bitbucket: HTTP access token <https://confluence.atlassian.com/bitbucketserver/http-access-tokens-939515499.html>`_

.. setting:: DEVOPS_CREDENTIALS
.. setting:: AZURE_DEVOPS_CREDENTIALS

DEVOPS_CREDENTIALS
AZURE_DEVOPS_CREDENTIALS
------------------

.. versionadded:: 5.2
Expand All @@ -846,7 +846,7 @@ List for credentials for Azure DevOps servers.

.. code-block:: python
DEVOPS_CREDENTIALS = {
AZURE_DEVOPS_CREDENTIALS = {
"dev.azure.com": {
"username": "project-name",
"token": "your-api-token",
Expand All @@ -861,7 +861,7 @@ example GitHub API is accessed as ``api.github.com``.
The following configuration is available for each host:

``username``
The name of the DevOps project. This is not the repository name.
The name of the Azure DevOps project. This is not the repository name.
``organization``
The name of the organization of the project.
``workItemIds``
Expand All @@ -874,8 +874,8 @@ Additional settings not described here can be found at :ref:`settings-credential

.. seealso::

:ref:`vcs-devops`,
`DevOps: Personal access token <https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=Windows>`_
:ref:`vcs-azure-devops`,
`Azure DevOps: Personal access token <https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=Windows>`_

.. setting:: GOOGLE_ANALYTICS_ID

Expand Down Expand Up @@ -1866,7 +1866,7 @@ VCS_API_DELAY

Configures minimal delay in seconds between third-party API calls in
:ref:`vcs-github`, :ref:`vcs-gitlab`, :ref:`vcs-gitea`, :ref:`vcs-pagure`, and
:ref:`vcs-devops`.
:ref:`vcs-azure-devops`.

This rate-limits API calls from Weblate to these services to avoid overloading them.

Expand Down
82 changes: 41 additions & 41 deletions docs/admin/continuous.rst
Original file line number Diff line number Diff line change
Expand Up @@ -330,49 +330,49 @@ under :guilabel:`Repository maintenance` or using API via :option:`wlc push`.
The push options differ based on the :ref:`vcs` used, more details are found in that chapter.

In case you do not want direct pushes by Weblate, there is support for
:ref:`vcs-github`, :ref:`vcs-gitlab`, :ref:`vcs-gitea`, :ref:`vcs-pagure`, :ref`vcs-devops`
pull requests or :ref:`vcs-gerrit` reviews, you can activate these by choosing
:guilabel:`GitHub`, :guilabel:`GitLab`, :guilabel:`Gitea`, :guilabel:`Gerrit`,
:guilabel:`DevOps`, or :guilabel:`Pagure` as :ref:`component-vcs` in :ref:`component`.
:ref:`vcs-github`, :ref:`vcs-gitlab`, :ref:`vcs-gitea`, :ref:`vcs-pagure`,
:ref:`vcs-azure-devops` pull requests or :ref:`vcs-gerrit` reviews, you can activate these by
choosing :guilabel:`GitHub`, :guilabel:`GitLab`, :guilabel:`Gitea`, :guilabel:`Gerrit`,
:guilabel:`Azure DevOps`, or :guilabel:`Pagure` as :ref:`component-vcs` in :ref:`component`.

Overall, following options are available with Git, Mercurial, GitHub, GitLab,
Gitea, Pagure, and DevOps:

+-----------------------------------+-------------------------------+-------------------------------+-------------------------------+
| Desired setup | :ref:`component-vcs` | :ref:`component-push` | :ref:`component-push_branch` |
+===================================+===============================+===============================+===============================+
| No push | :ref:`vcs-git` | `empty` | `empty` |
+-----------------------------------+-------------------------------+-------------------------------+-------------------------------+
| Push directly | :ref:`vcs-git` | SSH URL | `empty` |
+-----------------------------------+-------------------------------+-------------------------------+-------------------------------+
| Push to separate branch | :ref:`vcs-git` | SSH URL | Branch name |
+-----------------------------------+-------------------------------+-------------------------------+-------------------------------+
| No push | :ref:`vcs-mercurial` | `empty` | `empty` |
+-----------------------------------+-------------------------------+-------------------------------+-------------------------------+
| Push directly | :ref:`vcs-mercurial` | SSH URL | `empty` |
+-----------------------------------+-------------------------------+-------------------------------+-------------------------------+
| Push to separate branch | :ref:`vcs-mercurial` | SSH URL | Branch name |
+-----------------------------------+-------------------------------+-------------------------------+-------------------------------+
| GitHub pull request from fork | :ref:`vcs-github` | `empty` | `empty` |
+-----------------------------------+-------------------------------+-------------------------------+-------------------------------+
| GitHub pull request from branch | :ref:`vcs-github` | SSH URL [#empty]_ | Branch name |
+-----------------------------------+-------------------------------+-------------------------------+-------------------------------+
| GitLab merge request from fork | :ref:`vcs-gitlab` | `empty` | `empty` |
+-----------------------------------+-------------------------------+-------------------------------+-------------------------------+
| GitLab merge request from branch | :ref:`vcs-gitlab` | SSH URL [#empty]_ | Branch name |
+-----------------------------------+-------------------------------+-------------------------------+-------------------------------+
| Gitea merge request from fork | :ref:`vcs-gitea` | `empty` | `empty` |
+-----------------------------------+-------------------------------+-------------------------------+-------------------------------+
| Gitea merge request from branch | :ref:`vcs-gitea` | SSH URL [#empty]_ | Branch name |
+-----------------------------------+-------------------------------+-------------------------------+-------------------------------+
| Pagure merge request from fork | :ref:`vcs-pagure` | `empty` | `empty` |
+-----------------------------------+-------------------------------+-------------------------------+-------------------------------+
| Pagure merge request from branch | :ref:`vcs-pagure` | SSH URL [#empty]_ | Branch name |
+-----------------------------------+-------------------------------+-------------------------------+-------------------------------+
| DevOps pull request from fork | :ref:`vcs-devops` | `empty` | `empty` |
+-----------------------------------+-------------------------------+-------------------------------+-------------------------------+
| DevOps pull request from branch | :ref:`vcs-devops` | SSH URL [#empty]_ | Branch name |
+-----------------------------------+-------------------------------+-------------------------------+-------------------------------+
Gitea, Pagure, and Azure DevOps:

+-----------------------------------------+-------------------------------+-------------------------------+-------------------------------+
| Desired setup | :ref:`component-vcs` | :ref:`component-push` | :ref:`component-push_branch` |
+=========================================+===============================+===============================+===============================+
| No push | :ref:`vcs-git` | `empty` | `empty` |
+-----------------------------------------+-------------------------------+-------------------------------+-------------------------------+
| Push directly | :ref:`vcs-git` | SSH URL | `empty` |
+-----------------------------------------+-------------------------------+-------------------------------+-------------------------------+
| Push to separate branch | :ref:`vcs-git` | SSH URL | Branch name |
+-----------------------------------------+-------------------------------+-------------------------------+-------------------------------+
| No push | :ref:`vcs-mercurial` | `empty` | `empty` |
+-----------------------------------------+-------------------------------+-------------------------------+-------------------------------+
| Push directly | :ref:`vcs-mercurial` | SSH URL | `empty` |
+-----------------------------------------+-------------------------------+-------------------------------+-------------------------------+
| Push to separate branch | :ref:`vcs-mercurial` | SSH URL | Branch name |
+-----------------------------------------+-------------------------------+-------------------------------+-------------------------------+
| GitHub pull request from fork | :ref:`vcs-github` | `empty` | `empty` |
+-----------------------------------------+-------------------------------+-------------------------------+-------------------------------+
| GitHub pull request from branch | :ref:`vcs-github` | SSH URL [#empty]_ | Branch name |
+-----------------------------------------+-------------------------------+-------------------------------+-------------------------------+
| GitLab merge request from fork | :ref:`vcs-gitlab` | `empty` | `empty` |
+-----------------------------------------+-------------------------------+-------------------------------+-------------------------------+
| GitLab merge request from branch | :ref:`vcs-gitlab` | SSH URL [#empty]_ | Branch name |
+-----------------------------------------+-------------------------------+-------------------------------+-------------------------------+
| Gitea merge request from fork | :ref:`vcs-gitea` | `empty` | `empty` |
+-----------------------------------------+-------------------------------+-------------------------------+-------------------------------+
| Gitea merge request from branch | :ref:`vcs-gitea` | SSH URL [#empty]_ | Branch name |
+-----------------------------------------+-------------------------------+-------------------------------+-------------------------------+
| Pagure merge request from fork | :ref:`vcs-pagure` | `empty` | `empty` |
+-----------------------------------------+-------------------------------+-------------------------------+-------------------------------+
| Pagure merge request from branch | :ref:`vcs-pagure` | SSH URL [#empty]_ | Branch name |
+-----------------------------------------+-------------------------------+-------------------------------+-------------------------------+
| Azure DevOps pull request from fork | :ref:`vcs-azure-devops` | `empty` | `empty` |
+-----------------------------------------+-------------------------------+-------------------------------+-------------------------------+
| Azure DevOps pull request from branch | :ref:`vcs-azure-devops` | SSH URL [#empty]_ | Branch name |
+-----------------------------------------+-------------------------------+-------------------------------+-------------------------------+

.. [#empty] Can be empty in case :ref:`component-repo` supports pushing.
Expand Down
12 changes: 6 additions & 6 deletions docs/admin/install/docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1076,13 +1076,13 @@ Or the path to a file containing the Python dictionary:

.. seealso:: :ref:`Configuring code hosting credentials in Docker <docker-vcs-config>`

.. envvar:: WEBLATE_DEVOPS_USERNAME
.. envvar:: WEBLATE_DEVOPS_ORGANIZATION
.. envvar:: WEBLATE_DEVOPS_TOKEN
.. envvar:: WEBLATE_DEVOPS_HOST
.. envvar:: WEBLATE_DEVOPS_CREDENTIALS
.. envvar:: WEBLATE_AZURE_DEVOPS_USERNAME
.. envvar:: WEBLATE_AZURE_DEVOPS_ORGANIZATION
.. envvar:: WEBLATE_AZURE_DEVOPS_TOKEN
.. envvar:: WEBLATE_AZURE_DEVOPS_HOST
.. envvar:: WEBLATE_AZURE_DEVOPS_CREDENTIALS

Configures :ref:`vcs-devops` by changing :setting:`DEVOPS_CREDENTIALS`.
Configures :ref:`vcs-azure-devops` by changing :setting:`AZURE_DEVOPS_CREDENTIALS`.

.. seealso:: :ref:`Configuring code hosting credentials in Docker <docker-vcs-config>`

Expand Down
59 changes: 0 additions & 59 deletions docs/snippets/vcs-credentials-devops.rst

This file was deleted.

22 changes: 11 additions & 11 deletions docs/vcs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Version control integration

Weblate currently supports :ref:`vcs-git` (with extended support for
:ref:`vcs-github`, :ref:`vcs-gitlab`, :ref:`vcs-gitea`, :ref:`vcs-gerrit`,
:ref:`vcs-git-svn`, :ref:`vcs-bitbucket-server`, and :ref:`vcs-devops`) and
:ref:`vcs-git-svn`, :ref:`vcs-bitbucket-server`, and :ref:`vcs-azure-devops`) and
:ref:`vcs-mercurial` as version control back-ends.

.. _vcs-repos:
Expand Down Expand Up @@ -460,29 +460,29 @@ pushing them directly to the repository.
The Gerrit documentation has the details on the configuration necessary to set up
such repositories.

.. _vcs-devops:
.. _devops-push:
.. _vcs-azure-devops:
.. _azure-devops-push:

DevOps pull requests
--------------------
Azure DevOps pull requests
--------------------------

This adds a thin layer atop :ref:`vcs-git` using the `DevOps API`_ to allow pushing
This adds a thin layer atop :ref:`vcs-git` using the `Azure DevOps API`_ to allow pushing
translation changes as pull requests, instead of pushing directly to the repository.

:ref:`vcs-git` pushes changes directly to a repository, while
:ref:`vcs-devops` creates pull requests.
:ref:`vcs-azure-devops` creates pull requests.
The latter is not needed for merely accessing Git repositories.

You need to configure API credentials (:setting:`DEVOPS_CREDENTIALS`) in the
You need to configure API credentials (:setting:`AZURE_DEVOPS_CREDENTIALS`) in the
Weblate settings to make this work. Once configured, you will see a
:guilabel:`DevOps` option when selecting :ref:`component-vcs`.
:guilabel:`Azure DevOps` option when selecting :ref:`component-vcs`.

.. seealso::

:ref:`push-changes`,
:setting:`DEVOPS_CREDENTIALS`
:setting:`AZURE_DEVOPS_CREDENTIALS`

.. _DevOps API: https://learn.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-rest-7.2
.. _Azure DevOps API: https://learn.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-rest-7.2

.. _git-review: https://pypi.org/project/git-review/

Expand Down
2 changes: 1 addition & 1 deletion weblate/addons/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class GitSquashAddon(BaseAddon):
"gitlab",
"git-force-push",
"gitea",
"devops",
"azure_devops",
}
}
events = (EVENT_POST_COMMIT,)
Expand Down
4 changes: 2 additions & 2 deletions weblate/settings_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,9 @@
# Please see the documentation for more details.
GITHUB_CREDENTIALS = get_env_credentials("GITHUB")

# DevOps username, token, and organization for sending pull requests.
# Azure DevOps username, token, and organization for sending pull requests.
# Please see the documentation for more details.
DEVOPS_CREDENTIALS = get_env_credentials("DEVOPS")
AZURE_DEVOPS_CREDENTIALS = get_env_credentials("AZURE_DEVOPS")

# GitLab username and token for sending merge requests.
# Please see the documentation for more details.
Expand Down
4 changes: 2 additions & 2 deletions weblate/settings_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,9 @@
# Please see the documentation for more details.
GITHUB_CREDENTIALS = {}

# DevOps username and token for sending pull requests.
# Azure DevOps username and token for sending pull requests.
# Please see the documentation for more details.
DEVOPS_CREDENTIALS = {}
AZURE_DEVOPS_CREDENTIALS = {}

# GitLab username and token for sending merge requests.
# Please see the documentation for more details.
Expand Down
2 changes: 1 addition & 1 deletion weblate/trans/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1586,7 +1586,7 @@ def __init__(self, request, *args, **kwargs):
"pagure",
"local",
"git-force-push",
"devops",
"azure_devops",
)
if self.instance.vcs not in vcses:
vcses = (self.instance.vcs,)
Expand Down
Loading

0 comments on commit 34205e1

Please sign in to comment.