/puller

puller will automatically try to create a pull request from upstream to your fork, so you can review and merge it.

Primary LanguageJavaScriptMIT LicenseMIT

puller

Build Status FOSSA Status

Coverage Status Greenkeeper badge Known Vulnerabilities

puller will automatically try to create a pull request from upstream to your fork, so you can review and merge it.

Why

This project was created out of a particular problem. I needed to use a specific library on a mobile project, however including one of its classes required me to ask a new permission which I didn't need. So I forked that library, removed the guilty source and began using it. Unfortunately I can't make a pull request upstream because I'm killing a feature.

What a bad idea! Now I'm locking myself to a potentially out-of-date version of the library. Ok, maybe other devs will need this "version" of the lib, so let's maintain it by pulling whatever commits happen upstream.

Configuration

This project was made with the serverless framework, which makes it easy to deploy.

You will need to fill out the environment variables in the serverless.yml file.
While I suggest you use a storage service for your variables like I have done with AWS's Parameter Store (ssm), here is an example setup:

environment:
  GITHUB_TOKEN: 'MY_SECRET_GITHUB_TOKEN'
  baseRepoOwner: 'Ninban'
  repoName: 'fork-me'
  baseRepoBranch: 'master'
  headRepoOwner: 'LearnFrontEnd'
  headRepoBranch: 'master'

To create a Github token, follow the documentation.

You may also want to modify the schedule to your own liking. I have made it every hour by default.

events:
  - schedule: rate(1 hour)

Deployment

sls deploy

Try it!

sls invoke -f puller -l

Development

Testing

npm run test

License

FOSSA Status