Skip to content

Commit a3ce74d

Browse files
committed
This is a test of creating a PR using [octokit rest.js](https://github.com/octokit/rest.js/)
:octocat: 😄 ⭐
1 parent ebe9222 commit a3ce74d

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

dir2/README-2.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# GitHub Batch Updater
2+
3+
Script to help make basic additions to multiple GitHub repositories.
4+
5+
Currently this just adds a single file and opens a pull request against the default branch.
6+
7+
## Installation
8+
9+
Run `npm install` to install dependencies.
10+
11+
## Usage
12+
13+
Set the environment variable `GITHUB_TOKEN` to your GitHub personal token.
14+
15+
Run `./main.js addfile --help` to see usage information.
16+
17+
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:
18+
19+
./main.js addfile README.md --base manicstreetpreacher/github-api-test --dest dir2/README-2.md --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
20+
21+
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.

0 commit comments

Comments
 (0)