Skip to content

Feature Request - automation output #36

Description

@vetsin

Would be nice to make this tool more shell script friendly, e.g. allow --json output or the like

Example current usecase:

> codeowners some/folder | rev | cut -d' ' -f1 | rev | uniq -c | sort -rn | head -n 1 | sed -E 's/^ *[0-9]+ //g'
@some.user

but we could do something like this alternatively:

> codeowners --json some/folder | jq 'group_by(.owner) | map({value: .[0].owner, count: length}) | max_by(.count) | .value'
"@some.user"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions