Created
October 2, 2016 22:29
-
-
Save chipoglesby/d8560717a86011d4e0493c14e00487bb to your computer and use it in GitHub Desktop.
A Google Apps Script that automatically opens a pull request on a Github Repo.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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