Skip to content

Latest commit

 

History

History
124 lines (93 loc) · 4.85 KB

RepositoryActions.md

File metadata and controls

124 lines (93 loc) · 4.85 KB

Repository Actions

Repository actions are described in a yaml file. Currently version 1 has the following sections.

# file content version.
version: 1

# 'repository-specific-env-files' is an array and specifies loading specific environment files
# loaded environment variables can be used in actions.
repository-specific-env-files: []

# 'variables' is an array.
# variables can be refrerenced in actions.
variables: []

# Tags can be assigned to repositories based on predicates.
repository-tags:
  variables: []
  tags: []

# Repository actions which correspondent with the context menu of RepoM.
repository-actions:
  variables: []
  actions: []

snippet source | anchor

Repository Specific Env Files

In this section you can load custom environment (.env) files. These environment variables can be used within actions. This configuration will be evaluated and loaded every time the context menu of a repository opens. Using the when keyword, it is possible to only load environment files for specific repositories.

# array of objects.
repository-specific-env-files:

  # 'filename' is the filename to load environment variables from (required, string, evaluated).
- filename: ''

  # 'when' is a predicate when to load the file (optional, string/boolean, evaluated).
  when: ''

- filename: ''
  when: ''
- filename: ''
  when: ''

snippet source | anchor

Variables

Defined variables can be referenced within actions using the variable prefix var.. Other variable providers are available within RepoM and are explained over here. It is possible to define variables at multiple levels (ie scopes). This is the top level of defining variables.

** Could not find snippet 'RepositoryActionsV1RepositoryVariablesYaml' **

Repository Tags

This section can be used to assign tags to repositories. These tags can be used to filter, order or search repositories.

# array of objects.
repository-tags:
  # variable section for tags and has the same structure as the global variable section (optional, default empty)
  variables:

  tags:

    # 'tag' is the name of the tag (required, string, no-spaces).
  - tag: ''
  
    # 'when' is a predicate when to assign the tag to a repository (optional, string/boolean, evaluated, default true).
    when: ''

  - tag: ''
    when: ''
  - tag: ''
    when: ''

snippet source | anchor

Repository Actions

This section describes the whole context menu of the repository. Within the repository-actions it is possible to define variables at multiple levels. The actions subsection contains all the actions. Actions can be enabled or disabled based on all kind of conditions. RepoM comes with a number of actions but it is also possible to load plugins containg specific actions.

repository-actions:

  # variable section for all actions (optional, default empty)
  variables: []

  # array of actions
  actions:

    # action type, each type has its own set of properties (required, string, non-evaluated).
  - type: '' 
  
    # predicate whether or not to display this action (optional, boolean/string, evaluted, default true)
    active: '' 

    # variable section for specific action (optional, default empty)
    variables: []

snippet source | anchor

A list of currently supported actions can be found here.