GitXplorerGitXplorer
s

alphabetize-codeowners

public
1 stars
0 forks
0 issues

Commits

List of commits on branch main.
Verified
2c70cb8a651249b96adaf06d354cc3b95e048f37

Update README.md

ssirosen committed 10 months ago
Unverified
46bd977ab278e91c9b232436c4919a6b812296a8

Add readme

ssirosen committed 2 years ago
Unverified
53b64048e9590ef939a83683319dec50eff6bcf9

Refactor to take filenames and add hook config

ssirosen committed 2 years ago
Unverified
5769f2b312c2825b59565dd3a7d9533449fb0004

Initial commit

ssirosen committed 2 years ago

README

The README file for this repository.

DEPRECATION NOTICE

This repository has been deprecated. Use https://github.com/sirosen/texthooks instead.

A newer version of alphabetize-codeowners is maintained there.

alphabetize-codeowners

For teams with lists of users attached to different paths, comparison of codeowners lines quickly becomes difficult.

Alphabetize the lists of path owners so that they are always normalized to the same form.

Usage

Use via pre-commit:

- repo: https://github.com/sirosen/alphabetize-codeowners
  rev: 0.0.1
  hooks:
    - id: alphabetize-codeowners

Use it as a python script by installing with pipx:

pipx install alphabetize-codeowners

Then run with

alphabetize-codeowners -v

Sorting and Normalization Behaviors

Sorts Owners, Not Lines

alphabetize-codeowners alphabetizes the lists of owners per path. It does not alphabetize the lines in the file or otherwise sort them.

Ignores Comments and Empty Lines

Any comment lines or empty lines should be left unmodified by the hook.

Normalizes Whitespace

On the lines which are modified, the hook will normalize the line to have no leading whitespace, and to separate codeowner names with a single space character.