Skip to content

Latest commit

 

History

History
98 lines (55 loc) · 4.57 KB

Ordering.md

File metadata and controls

98 lines (55 loc) · 4.57 KB

Ordering

The order of the repositories shown in RepoM is customizable. The default is alphabetical on the repository name.

Orderings are defined in yaml using repository-comparers and repository-scorers. You can switch at any given time between orderings using the hamburgermenu in RepoM.

Definitions

A comparer compares two repositories resulting in an order between the two. The comparison is defined by the type of comparer. It is possible to compare by repository name (assending order) or to compare repositories by the timestamp of the last action performed by RepoM.

Scorers however calculate a score over exactly one repository. It does not compare repositories. Comparing repositories by score, use the score-comparer@1.

Comparers

These comparers are available by using the corresponding plugin.

az-comparer@1

Compares two repositories by a given property alphabetically in ascending order.

Properties:

  • property: Repository property. Currently, only Name, and Location are supported. Otherwise, comparison will always result in 0. (optional)
  • weight: The weight of this comparer. The higher the weight, the higher the impact.

composition-comparer@1

Compares two repositories by a composition of comparers.

Properties:

  • comparers: List of comparers. The first comparer not resulting in 0 will be used as final result.

score-comparer@1

Compares two repositories by a repository score. The calculation of the repository score is defined in the score provider.

Properties:

  • score-provider: The score provider to calculate a score for a repository. (optional)

sum-comparer@1

Compares two repositories by the sum of the results of the comparers.

Properties:

  • comparers: A list of comparers. The sum of the results of the comparers will be used as final result.

last-opened-comparer@1

Compares two repositories by the timestamp of the last action RepoM performed on the repository.

Properties:

  • weight: The weight of this comparer. The higher the weight, the higher the impact.

Scorers

These scorers are available by using the corresponding plugin.

is-pinned-scorer@1

Repository scorer based on the pinned state of a repository.

Properties:

  • weight: The weight of this scorer. The higher the weight, the higher the impact.

tag-scorer@1

Repository scorer based on the tags of a repository.

Properties:

  • weight: The weight of this scorer. The higher the weight, the higher the impact.
  • tag: The tag to match on. If the repository has this tag, the score will return the weight, otherwise, 0. (optional)

usage-scorer@1

Repository scorer based on it's usage by RepoM. The more it's used, the higher the score.

Properties:

  • windows: Specific 'windows' to calculate the score for.
  • max-score: The maximum score a repository can get.