Skip to content

Instantly share code, notes, and snippets.

@renodubois
Created April 7, 2020 19:43
Show Gist options
  • Save renodubois/1ee8a6e5e6fd2f62b5e6e23540bb9e50 to your computer and use it in GitHub Desktop.
Save renodubois/1ee8a6e5e6fd2f62b5e6e23540bb9e50 to your computer and use it in GitHub Desktop.
Simple NodeJS script to open a page to make a new GitHub PR. Lets you specify org name, repo, fork, target branch.
const exec = require('child_process').exec;
const srcBranch = "master";
const targetBranch = "staging";
const fork = "foo";
const orgName = "testOrg";
const repoName = "testRepo";
const url = `https://github.com/${orgName}/${repoName}/compare/${targetBranch}...${fork}:${srcBranch}`;
exec("open " + url);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment