Skip to content

edit-owners is a tool to manage CODEOWNERS files

License

Notifications You must be signed in to change notification settings

vinsg/edit-owners

Folders and files

NameName
Last commit message
Last commit date

Latest commit

de0eee7 · Sep 24, 2022

History

33 Commits
Sep 5, 2022
Sep 5, 2022
Sep 10, 2022
Sep 5, 2022
Sep 24, 2022
Sep 5, 2022
Sep 17, 2022
Sep 24, 2022
Sep 24, 2022
Sep 7, 2022
Sep 5, 2022
Sep 5, 2022
Sep 5, 2022
Sep 5, 2022
Sep 7, 2022

Repository files navigation

Edit-Owners

Status: Alpha GitHub release (latest SemVer) License: MIT Supported platforms: Windows, MacosArm, MacosX86, Linux

Edit-owners is a command line tool to help managed the CODEOWNERS files of many GitHub repositories.

This tool is a proof of concept for Kotlin Multiplatform tech and its source code is heavily annotated. Please leave feedback or report any bugs by opening an issue on GitHub.

Table of Content

Installation

Get the proper binary for your system on the release page

Basic Usage

Personal Access Token

Authentication with GitHub is done through the use of a Personal Access Token (PAT). Token Guide

Basic usage

./edit-owners \
-t <your GitHub token> \
add -r "org/repo"

Note on Windows usage

Edit-owners currently depends on libcurl which is not bundled with the binary yet(see issue). The use of Git-bash is heavily recommended for now.

Commands

Add a specific user

Use the --user (-u) flag.

./edit-owners \
-t <your GitHub token> \
add -u "vinsg" \
-r "org/repo"

Add a user using a list of repositories in a file

Use the --file (-f) flag to pass a csv file of repositories with format "owner/firstRepo, owner/secondRepo"

./edit-owners \
-t <your GitHub token> \
add -u "vinsg" \
-f <path to csv file>

Create a file based on user ownership

Use the create-file command to create a csv file of repositories based on all the GitHub repositories containing @username in their CODEOWNERS file.

./edit-owners \
-t <your GitHub token> \
create-file -u "username"

you can use the -o (--org) flag to narrow the list to only a specific org.

./edit-owners \
-t <your GitHub token> \
create-file -u "username" -g "myOrg"

Remove a user using a list of repositories in a file

Use the --file (-f) flag to pass a csv file of repositories with format "owner/firstRepo, owner/secondRepo"

./edit-owners \
-t <your GitHub token> \
remove -u "vinsg" \
-f <path to csv file>

Tech used

  • Kotlin
  • Kotlin Multiplatform
  • Ktor
  • Clikt
  • Mordant
  • Okio
  • Serialization-kotlinx
  • Koin

Local dev

You can generate the table of content for this page using markdown-toc markdown-toc README.md

License

This project is licensed under MIT License

About

edit-owners is a tool to manage CODEOWNERS files

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages