Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@backstroke/worker

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@backstroke/worker

The Backstroke Worker eats off of a [rsmq](https://github.com/smrchy/rsmq) queue, performing a link update. In order, here's roughly what happens:

  • 2.2.0
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

Backstroke Worker

The Backstroke Worker eats off of a rsmq queue, performing a link update. In order, here's roughly what happens:

  • A new operation is pulled off the queue.
  • The link's type is checked:
    • If the type is repo:
      • Check to make sure the fork didn't opt out of Backstroke pull requests.
        • If so, return an error.
      • Create a pull request to propose the new changes.
    • If the type is fork-all:
      • Get all forks of the upstream.
      • Loop through each:
        • Check to make sure the fork didn't opt out of Backstroke pull requests.
          • If so, return an error.
        • Create a pull request to propose the new changes.
  • Add the response back into the Redis instance under the operation id, so it can be fetched by the main server.

Usage

GITHUB_TOKEN=XXX REDIS_URL=redis://XXX yarn start

Environment variables

  • GITHUB_TOKEN (required): The Github token for the user that creates pull requests. When deployed, this is a token for backstroke-bot.
  • REDIS_URL (required): A url to a redis instance with a rsmq queue inside. Takes the form of redis://user:password@host:port.
  • THROTTLE: Provide an optional delay between handling each webhook operation. This is potentially handy to keep a worker from exhausing the rate limit on a token.
  • GITHUB_BOT_USERNAME: The username of the bot user that creates pull requests (defaults to backstroke-bot). Used to grant permissions to the bot user on private repositories.

Arguments

  • --pr mock: Tell the worker not to actually make pull requests, but only log out when it is about to make a pull request. This is handy for repeated testing or for testing against repositories that you don't own. This option is off by default.

Running tests

yarn test

FAQs

Package last updated on 06 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc