The AzureDevops module enables integration with one azure devops environment. The integration currently focuses on Pull Requests.
To use this module, make sure it is enabled in RepoM by opening the menu and navigate to 'Plugins'. After enabling or disabling a plugin, you should restart RepoM.
This plugin has specific configuration stored in the following directory %APPDATA%/RepoM/Module/
. This configuration file should be edit manually. The safest way to do this is, is when RepoM is not running.
The following default configuration is used:
{
"Version": 1,
"Settings": {
"PersonalAccessToken": null,
"BaseUrl": null
}
}
PersonalAccessToken
: Personal access token (PAT) to access Azure Devops. The PAT should be granted access to read and write pull requests. To create a PAT, gotohttps://dev.azure.com/[my-organisation]/_usersSettings/tokens
.BaseUrl
: The base url of azure devops for your organisation (i.e.https://dev.azure.com/[my-organisation]/
).
This module contains the following methods, variables and/or constants:
Action menu item to create a pull request in Azure Devops.
Properties:
name
: Menu item title. (Text)project-id
: The azure devops project id. (Text)pr-title
: Pull Request title. When not provided, the title will be defined based on the branch name. Title will be the last part of the branchname split on/
, sofeature/123-testBranch
will result in title123-testBranch
(Text)to-branch
: Name of the branch the pull request should be merged into. For instancedevelop
, ormain
. (Text)reviewer-ids
: List of reviewer ids. The id should be a valid Azure DevOps user id (i.e. GUID). (List)draft-pr
: Boolean specifying if th PR should be marked as draft. (Predicate)include-work-items
: Boolean specifying if workitems should be included in the PR. RepoM will try to resolve the workitems by looping through the commit messages. (Predicate)open-in-browser
: Boolean specifying if the Pull request should be opened in the browser after creation. (Predicate)context
: The context in which the action is available. (Context)active
: Whether the menu item is enabled. (Predicate)auto-complete
: Auto complete options. Please take a look at the same for more information (AutoCompleteOptionsV1, optional)
- type: azure-devops-create-pr@1
project-id: "{{ project_id }}"
name: Create feature to develop ({{ repository.branch | string.replace "feature/" "" | string.strip | string.truncate 20 ".." }})
pr-title: 'Release {{ now }}'
to-branch: develop
reviewer-ids:
- "{{ devops_guid_reviewer_1 }}"
- "33333333-F973-4BE7-B39A-A9F85B18C75E"
draft-pr: false
include-work-items: true
open-in-browser: true
auto-complete:
merge-strategy: Squash
delete-source-branch: true
transition-work-items: true
active: 'repository.branch | string.starts_with "feature/"'
- type: azure-devops-create-pr@1
project-id: "{{ project_id }}"
name: Complete feature
pr-title: 'Feature {{ repository.branch | string.replace "feature/" "" }}'
to-branch: develop
reviewer-ids:
- "{{ devops_guid_reviewer_1 }}"
draft-pr: repository.banch == "develop"
active: true
- type: azure-devops-create-pr@1
project-id: "{{ project_id }}"
to-branch: develop