Skip to content

Instantly share code, notes, and snippets.

@IronistM
Forked from chipoglesby/github.gs
Created October 3, 2016 07:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IronistM/567785c5b9880d5d812fdae9670ed47a to your computer and use it in GitHub Desktop.
Save IronistM/567785c5b9880d5d812fdae9670ed47a to your computer and use it in GitHub Desktop.
A Google Apps Script that automatically opens a pull request on a Github Repo.
function github() {
username = "xxx"
repo = "xxx"
url = "https://api.github.com/repos/"+username+"/"+repo+"/issues"
payload = {
"title": "xxx",
"body": "xxx",
"assignee": "xxx"
}
sendToGithub(url, payload)
}
function sendToGithub(url, payload) {
options = {
"method": "post",
"contentType": "application/json",
"payload": JSON.stringify(payload),
"headers": {"authorization": "Basic xxx"}
};
return UrlFetchApp.fetch(url, options)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment