-
Notifications
You must be signed in to change notification settings - Fork 0
Set up for an initial release #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
4c4d4cd
Set a more appropriate MVP release version
tarkatronic c2aed17
Add better installation/usage instructions
tarkatronic 3b958d6
Set up an initial CHANGELOG
tarkatronic 2556291
Move the bin folder up to the top level
tarkatronic 55d527c
Add a few more fields relevant to release
tarkatronic c6ce5bd
Set up a boilerplate npmignore
tarkatronic fea12dd
Update keywords per review suggestions
tarkatronic 879a639
Remove the redundant/unnecessary .npmignore
tarkatronic bd8d47e
Restrict to modern node versions
tarkatronic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.