Skip to content

Commit

Permalink
add in build and update for npm
Browse files Browse the repository at this point in the history
  • Loading branch information
asheliahut committed Feb 18, 2022
1 parent 4e8b8c1 commit 0e9816a
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
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
19 changes: 19 additions & 0 deletions .github/workflows/node.js.yml
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 }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
node_modules/
.node_modules/
dist/*
dist/
test-args.txt
~*.docx
\#*\#
Expand Down
41 changes: 41 additions & 0 deletions README.md
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
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
},
Expand Down

0 comments on commit 0e9816a

Please sign in to comment.