Skip to content

Latest commit

 

History

History
63 lines (56 loc) · 1.91 KB

README.md

File metadata and controls

63 lines (56 loc) · 1.91 KB

Github pullrequest creator

Tiny scripts to create pullrequest for Github repo.

Before run this script you need:

This script can:

  • Sync the repo in local
  • Create a new branch or checkout an exist branch
  • Modify serval files in the repo
  • Commit the change and push the new branch to remote
  • Send pullrequest according fork
  • Create mutilple pullrequests
  • Wait a minute to send the next pullrequest
  • Git ignore the config and content repo with credential information

How to run the script:

  1. clone this repo and install npm packages

    npm install
  2. Modify the pr-config.json, which is created by npm install

    • count - How many pullrequest you want to create
    • modifyCount - How many files you want to edit in each pullrequest
    • period - How long (millisecond) you want to wait between two pullrequests
    {
      "user": {
          "name": "[Your GitHub username]",
          "token": "[Your GitHub token, REQUIRED if enable two facotr, IF no token, delete this line]",
          "password": "[If no token provided, enter your password here]"
      },
      "repo": {
          "owner": "[Your repo owner]",
          "name": "[Your repo name]"
      },
      "branch": {
          "prefix": "[Auto created branch's prefix]",
          "startNumber": 0
      },
      "base": {
          "owner": "[Your pr base repo's owner]",
          "branch": "[Your pr base repo's branch]"
      },
      "pr": {
          "title": "[Your pr's title]"
      },
      "count": 1,
      "modifyCount": 20,
      "modifyDir": ".",
      "modifyFilePattern": ".md",
      "period": 5000
    }
  3. Run script

    npm start