Most of the repository actions are part of the core of RepoM and some are part of external plugins. All these repository actions have the same base:
Properties:
type
: RepositoryAction type. Should be a fixed value used to determine the action type. (required, string)name
: Name of the action. This is shown in the UI of RepoM. (required, evaluated, string)active
: Is the action active (ie. visible) or not. (optional, evaluated, boolean, default:true
)variables
: A set of variables to be availabe within this action. (optional, list`1)
The following actions are part of the core of RepoM and can always be used in your RepositoryActions.
Textual action to display some text in the action menu.
Action specific properties:
enabled
: Show the menu as enabled (clickable) or disabled. (optional, evaluated, boolean, default:true
)
Example:
repository-actions:
actions:
- type: just-text@1
active: true
variables: []
enabled: true
name: this is some text to display
- type: just-text@1
name: 'also text'
Action menu for opening files with a given extension. If files within the repository are found matching the extension, a submenu will be created with all matched files.
Action specific properties:
extension
: The file extension to look for. This parameter can contain a combination of valid literal path and wildcard (*
and?
) characters, but it doesnt support regular expressions. For example*.sln
. (required, string)
Example:
repository-actions:
actions:
- type: associate-file@1
active: true
variables: []
name: 'Open in Visual Studio'
extension: '*.sln'
- type: associate-file@1
name: 'Open in Visual Studio'
extension: '*.sln'
Action to open the default webbrowser and go to the origin remote webinterface. When multple remotes are available a sub menu is created for each remote.
Action specific properties:
first-only
: Property specifying only a menu item for the first remote is created. (optional, evaluated, boolean)
Example:
repository-actions:
actions:
- type: browse-repository@1
active: true
variables: [] # default property but doens't add anything to this action
- type: browse-repository@1
Action to excute a command (related the the repository)
Action specific properties:
command
: The command to execute. (required, evaluated, string)arguments
: Arguments for the command. (optional, evaluated, string)
Example:
repository-actions:
actions:
- type: command@1
active: true
variables: []
name: Open in Terminal
command: wt
arguments: -d "{Repository.SafePath}"
- type: command@1
name: Open in Terminal
command: wt
arguments: -d "{Repository.SafePath}"
Action to excute an application with additional arguments. This action is almost identical to the command@1
action. When no existing executables are provided, the action will not show.
Action specific properties:
executables
: Set of possible executables. The first executable that exists will be used. The paths should absolute. (required, evaluated, string)arguments
: Arguments for the executable. (optional, evaluated, string)
When you want to specify exacly one executable, you can replace the required property Executables
with the following property:
executable
: Absolute path of the exeuctable to execute (required, string, evaluted)
Example:
repository-actions:
actions:
# all properties
- type: executable@1
active: true
variables: []
name: 'Open in Visual Studio Code'
executables:
- '%LocalAppData%/Programs/Microsoft VS Code/code.exe'
- '%ProgramW6432%/Microsoft VS Code/code.exe'
arguments: '"{Repository.SafePath}"'
# replace executables array with property executable
- type: executable@1
active: true
variables: []
name: 'Open in Visual Studio Code'
executable: '%LocalAppData%/Programs/Microsoft VS Code/code.exe'
arguments: '"{Repository.SafePath}"'
# without default values for active and variables.
- type: executable@1
name: 'Open in Visual Studio Code'
executables:
- '%LocalAppData%/Programs/Microsoft VS Code/code.exe'
- '%ProgramW6432%/Microsoft VS Code/code.exe'
arguments: '"{Repository.SafePath}"'
- type: executable@1
name: 'Open in Visual Studio Code'
executable: '%LocalAppData%/Programs/Microsoft VS Code/code.exe'
arguments: '"{Repository.SafePath}"'
Action to create a folder (sub menu) in the context menu of the repository allowing you to order actions.
Action specific properties:
items
: Menu items. (required, evaluated, list`1)is-deferred
: Menu is deferred. This will speed up visualisation. (optional, evaluated, boolean, default:false
)
Example:
repository-actions:
actions:
- type: folder@1
active: true
variables: []
name: 'My Folder 1'
items:
- type: just-text@1
name: 'text 1 in sub menu'
- type: just-text@1
name: 'text 2 in sub menu'
- type: folder@1
name: 'My Folder 2'
items:
- type: just-text@1
name: 'text 1 in sub menu'
- type: just-text@1
name: 'text 2 in sub menu'
Action to create repeated actions based on a variable.
Action specific properties:
enumerable
: The list of items to enumerate on. (required, evaluated, string)variable
: The name of the variable to access to current enumeration of the items. For each iteration, the variable{var.name}
has the value of the current iteration. (required, evaluated, string)skip
: Predicate to skip the current item. (optional, evaluated, string)actions
: List of repeated actions. (required, evaluated, ienumerable`1)
Example:
repository-actions:
variables:
- name: DTAP
value:
- key: D
url: https://develop.local
- key: T
url: https://test.local
- key: A
url: https://acceptance.local
- key: p
url: https://production.local
actions:
- type: foreach@1
enumerable: '{var.DTAP}'
variable: environment
skip: ''
actions:
- type: just-text@1
name: '{var.environment.key} - {var.environment.url}'
This action will create a menu and sub menus with all local and remote branches for an easy checkout.
This action does not have any specific properties.
Example:
repository-actions:
actions:
- type: git-checkout@1
active: true
variables: [] # default property but doens't add anything to this action
- type: git-checkout@1
Action to execute a git fetch
command.
This action does not have any specific properties.
Example:
repository-actions:
actions:
- type: git-fetch@1
active: true
variables: [] # default property but doens't add anything to this action
- type: git-fetch@1
Action to execute a git pull
command.
This action does not have any specific properties.
Example:
repository-actions:
actions:
- type: git-pull@1
active: true
variables: [] # default property but doens't add anything to this action
- type: git-pull@1
Action to execute a git push
command.
This action does not have any specific properties.
Example:
repository-actions:
actions:
- type: git-push@1
active: true
variables: [] # default property but doens't add anything to this action
- type: git-push@1
Action to ignore the current repository. This repository will be added to the list of ignored repositories and will never show in RepoM. To undo this action, clear all ignored repositories or manually edit the ignored repositories file (when RepoM is not running).
This action does not have any specific properties.
Example:
repository-actions:
actions:
- type: ignore-repository@1
active: true
variables: [] # default property but doens't add anything to this action
- type: ignore-repository@1
Action to pin (or unpin) the current repository. Pinning is not persistant and all pinned repositories will be cleared when RepoM exits. Pinning a repository allowed custom filtering, ordering and searching.
Action specific properties:
name
: Name of the action. This is shown in the UI of RepoM. When no value is provided, the name will be a default value based on the mode. (optional, evaluated, string)mode
: The pin mode[Toggle, Pin, UnPin]
. (required, pinmode)
Example:
repository-actions:
actions:
- type: pin-repository@1
active: true
variables: []
name: this is some text to display
mode: toggle
- type: pin-repository@1
mode: toggle
- type: pin-repository@1
mode: pin
- type: pin-repository@1
mode: unpin
Creates a visual separator in the action menu.
This action does not have any specific properties.
Example:
repository-actions:
actions:
- type: separator@1
active: true
variables: [] # default property but doens't add anything to this action
- type: separator@1
These actions are available though the use of plugins.
This action makes it possible to copy text to the clipboard.
Action specific properties:
text
: The text to copy to the clipboard. (required, evaluated, string)
Example:
repository-actions:
actions:
- type: clipboard-copy@1
active: true
variables: []
name: Copy to clipboard
text: ''
- type: clipboard-copy@1
name: Copy to clipboard
text: ''
See the Clipboard plugin for more information.
Action to mark a repository as favorite within SonarCloud.
Action specific properties:
project
: The SonarCloud project key. (required, evaluated, string)
Example:
repository-actions:
actions:
- type: sonarcloud-set-favorite@1
active: true
variables: []
name: Star repository on SonarCloud
project: ''
- type: sonarcloud-set-favorite@1
name: Star repository on SonarCloud
project: ''
See the SonarCloud plugin for more information.
Action menu item to create a pull request in Azure Devops.
Action specific properties:
project-id
: The azure devops project id. (required, evaluated, string)title
: Menu item title. When not provided, a title will be generated. This property will be used instead of the Name property. (optional, string)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
(optional, string)to-branch
: Name of the branch the pull request should be merged into. For instancedevelop
, ormain
. (required, string)reviewer-ids
: List of reviewer ids. The id should be a valid Azure DevOps user id (ie. GUID). (optional, list`1)draft-pr
: Boolean specifying if th PR should be marked as draft. (required, boolean, default:false
)include-work-items
: Boolean specifying if workitems should be included in the PR. The workitems will be found by using the commit messages. (required, boolean, default:true
)open-in-browser
: Boolean specifying if the Pull request should be opened in the browser after creation. (required, boolean, default:false
)auto-complete
: Auto complete options. Please take a look at the same for more information (required, repositoryactionazuredevopscreatepullrequestsautocompleteoptionsv1)
Example:
repository-actions:
actions:
# Create PR
- type: azure-devops-create-prs@1
project-id: ''
to-branch: develop
reviewer-ids:
- "GUID"
# Create PR with auto-complete enabled
- type: azure-devops-create-prs@1
project-id: ''
to-branch: develop
reviewer-ids:
- "GUID"
auto-complete:
enabled: true
merge-strategy: "Squash"
# Create PR with all settings
- type: azure-devops-create-prs@1
project-id: ''
title: 'Create PR'
# When no pr-title provided it will be generated based on convention.
# Title will be the last part of the branchname split on '/'.
# For example: feature/testBranch will result in a PR title of 'testBranch'.
pr-title: 'PR title'
to-branch: develop
reviewer-ids:
- "GUID"
draft-pr: true
include-work-items: true
open-in-browser: false
auto-complete:
enabled: true
merge-strategy: "NoFastForward" # You can choose from: "NoFastForward", "Squash", "Rebase" and "RebaseMerge"
deleteSource-branch: true
transition-work-items: true
This action results in zero or more items in the contextmenu. For each open pullrequest for the given repository, it will show an action to go to the specific PullRequest in your favorite webbrowser.
Action specific properties:
project-id
: The azure devops project id. (required, evaluated, string)repository-id
: The repository Id. If not provided, the repository id is located using the remote url. (optional, evaluated, string)show-when-empty
: When no pull requests are available, this property is used to determine if no or a message item is showed. (optional, evaluated, string, default:true
)
Example:
repository-actions:
actions:
- type: azure-devops-get-prs@1
active: true
variables: []
show-when-empty: true
repository-id: ''
project-id: ''
- type: azure-devops-get-prs@1
repository-id: ''
See the AzureDevOps plugin for more information.
Action to list heidi databases and show action menus for them.
Action specific properties:
key
: Repository key. If not provided, the repositoryRemote.Origin.Name
is used as selector. (optional, string)executable
: The absolute path of the Heidi executable. If not provided, the default value from the plugin settings is used. (optional, evaluated, string)
Example:
repository-actions:
actions:
- type: heidi-databases@1
active: true
variables: []
name: Databases
executable: ''
- type: heidi-databases@1
name: Databases
executable: ''
- type: heidi-databases@1
name: Databases
See the Heidi plugin for more information.
include _plugins.webbrowser.action
See the WebBrowser plugin for more information.
These actions are part of the Repository Actions config file described in Repository Actions.