-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Set a more appropriate MVP release version * Add better installation/usage instructions * Set up an initial CHANGELOG * Move the bin folder up to the top level * Add a few more fields relevant to release * Set up a boilerplate npmignore * Update keywords per review suggestions * Remove the redundant/unnecessary .npmignore * Restrict to modern node versions
- Loading branch information
1 parent
e8b6b2d
commit 1b75cd7
Showing
4 changed files
with
88 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# `orglinter` | ||
|
||
## 0.1.0 | ||
|
||
- Initial MVP release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,65 @@ | |
|
||
Lint GitHub organizations to ensure proper membership lists and configuration. | ||
|
||
## Installation | ||
|
||
`orglinter` is designed to be installed with npm or yarn, either globally: | ||
|
||
```console | ||
$ npm install -g orglinter | ||
$ orglinter my-org-file.toml | ||
``` | ||
|
||
Within your package: | ||
|
||
```console | ||
$ npm install orglinter | ||
$ npx orglinter my-org-file.toml | ||
``` | ||
|
||
Or if you would like to make contributions to `orglinter`, using `git` and `npm` | ||
for local development: | ||
|
||
```console | ||
$ git clone [email protected]:godaddy/orglinter.git | ||
$ cd orglinter | ||
$ npm install | ||
$ npm start my-org-file.toml | ||
``` | ||
|
||
## Usage | ||
|
||
A stub `.env.dist` file can be found for the convenience of users and developers | ||
at the root of this project. If you copy this file to `.env` and fill in the | ||
blanks, you should be good to go! | ||
|
||
Running the script requires a single environment variable, which you can place | ||
into a `.env` file for automatic ingestion: `GITHUB_TOKEN`. This must be a | ||
personal access token generated by an existing organization owner, with the | ||
following permissions: | ||
|
||
* `admin:org` | ||
* `read:user` | ||
|
||
Once a `GITHUB_TOKEN` is ready, the script can be run by `npm start`. | ||
|
||
By default, the tool will look for a file at `./membership.toml`. However you | ||
can also specify a different filename on the command line such as: | ||
|
||
```console | ||
$ npm start my-org-file.toml | ||
|
||
> [email protected] start | ||
> node ./src/bin/cli.js | ||
# ... | ||
``` | ||
|
||
At the time of this writing, this script will be run manually after every change | ||
to the membership file. In the future, this will become an automatic execution | ||
in the CI pipeline, and will also be run on a regular basis to ensure that | ||
undocumented memberships do not exist, and that employees who have left the | ||
company are removed from the org. | ||
|
||
## Org Specification | ||
|
||
All org data is stored in [TOML] files; one file representing one GitHub org. An | ||
|
@@ -58,39 +117,6 @@ does have the side effect that, if an internal username is connected to multiple | |
GitHub usernames, as demonstrated above, all of those GitHub usernames will be | ||
made admins of the org. | ||
|
||
## Script Execution | ||
|
||
A stub `.env.dist` file can be found for the convenience of users and developers | ||
at the root of this project. If you copy this file to `.env` and fill in the | ||
blanks, you should be good to go! | ||
|
||
Running the script requires a single environment variable, which you can place | ||
into a `.env` file for automatic ingestion: `GITHUB_TOKEN`. This must be a | ||
personal access token generated by an existing organization owner, with the | ||
following permissions: | ||
|
||
* `admin:org` | ||
* `read:user` | ||
|
||
Once a `GITHUB_TOKEN` is ready, the script can be run by `npm start`. | ||
|
||
By default, the tool will look for a file at `./membership.toml`. However you | ||
can also specify a different filename on the command line such as: | ||
|
||
```console | ||
$ npm start my-org-file.toml | ||
|
||
> [email protected] start | ||
> node ./src/bin/cli.js | ||
# ... | ||
``` | ||
|
||
At the time of this writing, this script will be run manually after every change | ||
to the membership file. In the future, this will become an automatic execution | ||
in the CI pipeline, and will also be run on a regular basis to ensure that | ||
undocumented memberships do not exist, and that employees who have left the | ||
company are removed from the org. | ||
|
||
## Credits | ||
|
||
Originally developed internally for making easier work of the management of | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters