-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4e8b8c1
commit 0e9816a
Showing
5 changed files
with
78 additions
and
4 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,8 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: npm | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "13:00" | ||
open-pull-requests-limit: 10 |
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,19 @@ | ||
name: Node.js Package | ||
on: | ||
release: | ||
types: [created] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
# Setup .npmrc file to publish to npm | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm install | ||
- run: npm run build | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
node_modules/ | ||
.node_modules/ | ||
dist/* | ||
dist/ | ||
test-args.txt | ||
~*.docx | ||
\#*\# | ||
|
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,41 @@ | ||
# gh-org-user-sync | ||
|
||
Syncs the members of a GitHub organization to a new GitHub organization. This application supports both `github.com` along with `GitHub Enterprise Servers`. | ||
|
||
## Mandatory Environment Variable | ||
|
||
- GH_USER_SYNC_TOKEN - GitHub API token with org admin & user access privileges. | ||
|
||
## Usage | ||
|
||
```shell | ||
npm install -g gh-org-user-sync | ||
``` | ||
|
||
After installing it, run `gh-org-user-sync --help` without arguments to see list of options: | ||
|
||
```console | ||
GitHub Oranization Member Sync | ||
|
||
Syncs the members of a GitHub organization to a new GitHub organization | ||
Make sure to include environment variables for the GitHub API | ||
Token(GH_USER_SYNC_TOKEN) with org admin & user access privileges. | ||
|
||
Options | ||
|
||
-h, --help | ||
-s, --source <org_name> Source GitHub organization name (pulls users from this org) | ||
-t, --target <org_name> Target GitHub organization name (pushes users to this org) | ||
-u, --url string GitHub API url (defaults to https://api.github.com) | ||
-v, --verbose number Verbosity level (0-2) | ||
|
||
Project home: https://github.com/asheliahut/gh-org-user-sync | ||
``` | ||
|
||
## Exaplining Verbose | ||
|
||
The `verbose` option is a number to determine the verbosity level. All levels add additional details. Further details: | ||
|
||
- 0: displays only the progress bar and data is visable only as syncing occurs | ||
- 1: displays lengths of data pulled from getting users & permenant list of synced users | ||
- 2: displays full response objects |
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,14 @@ | |
"name": "gh-org-user-sync", | ||
"version": "1.0.0", | ||
"description": "Syncs the members of a GitHub organization to a new GitHub organization", | ||
"homepage": "https://github.com/asheliahut/gh-org-user-sync", | ||
"keywords": [ | ||
"github", | ||
"api", | ||
"organization", | ||
"user", | ||
"sync" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/asheliahut/gh-org-user-sync" | ||
|
@@ -14,9 +22,7 @@ | |
}, | ||
"author": "Ashley Hutson <[email protected]> (https://screwmyprivacy.com)", | ||
"license": "Unlicense", | ||
"bin": { | ||
"gh-org-user-sync": "dist/gh-org-user-sync.js" | ||
}, | ||
"bin": "dist/gh-org-user-sync.js", | ||
"pkg": { | ||
"scripts": "dist/**/*.js" | ||
}, | ||
|