-
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.
This is a test of creating a PR using [octokit rest.js](https://githu…
- Loading branch information
Showing
3 changed files
with
48 additions
and
1 deletion.
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,24 @@ | ||
# GitHub Batch Updater | ||
|
||
Script to help make basic additions to multiple GitHub repositories. | ||
|
||
Currently this just adds a single file and opens a pull request against the default branch. | ||
|
||
## Installation | ||
|
||
Run `npm install` to install dependencies. | ||
|
||
## Usage | ||
|
||
Set the environment variable `GITHUB_TOKEN` to your GitHub personal token. | ||
|
||
Run `./main.js addfile --help` to see usage information. | ||
|
||
For example, this will open a GitHub pull request that adds the local file `README.md` to `dir2/README-2.md` in the `manicstreetpreacher/github-api-test` repository: | ||
|
||
./main.js --base manicstreetpreacher/github-api-test --branch test-new-ref \ | ||
--title 'This is a test' --body $'This is a test of creating a PR using [octokit rest.js](https://github.com/octokit/rest.js/)\n\n:octocat: :smile: :star:' --force \ | ||
--addfile README.md --destfile dir2/README-2.md \ | ||
--addfile README.md --destfile dir2/README-3.md | ||
|
||
Note this uses [Bash ANSI C-like escape sequences](http://wiki.bash-hackers.org/syntax/quoting?s[]=ansi&s[]=sequence#ansi_c_like_strings) to pass multiple lines to the body. |
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,24 @@ | ||
# GitHub Batch Updater | ||
|
||
Script to help make basic additions to multiple GitHub repositories. | ||
|
||
Currently this just adds a single file and opens a pull request against the default branch. | ||
|
||
## Installation | ||
|
||
Run `npm install` to install dependencies. | ||
|
||
## Usage | ||
|
||
Set the environment variable `GITHUB_TOKEN` to your GitHub personal token. | ||
|
||
Run `./main.js addfile --help` to see usage information. | ||
|
||
For example, this will open a GitHub pull request that adds the local file `README.md` to `dir2/README-2.md` in the `manicstreetpreacher/github-api-test` repository: | ||
|
||
./main.js --base manicstreetpreacher/github-api-test --branch test-new-ref \ | ||
--title 'This is a test' --body $'This is a test of creating a PR using [octokit rest.js](https://github.com/octokit/rest.js/)\n\n:octocat: :smile: :star:' --force \ | ||
--addfile README.md --destfile dir2/README-2.md \ | ||
--addfile README.md --destfile dir2/README-3.md | ||
|
||
Note this uses [Bash ANSI C-like escape sequences](http://wiki.bash-hackers.org/syntax/quoting?s[]=ansi&s[]=sequence#ansi_c_like_strings) to pass multiple lines to the body. |