Skip to content

Commit

Permalink
This is a test of creating a PR using [octokit rest.js](https://githu…
Browse files Browse the repository at this point in the history
  • Loading branch information
manics committed Sep 25, 2020
1 parent ebe9222 commit a3ce74d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions dir2/README-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 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 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

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 comments on commit a3ce74d

Please sign in to comment.