Can this create Pull Requests?
Hi. The README used to have a section about creating pull requests: https://github.com/boennemann/github-change-remote-file/blob/8f55a5a13f974ad0a2b69939d55350f2fb36db16/README.md
The sample code looked like this. Note the pr stanza:
githubChangeRemoteFile({
user: 'boennemann',
repo: 'animals',
filename: 'package.json'
transform: function (pkg) {
pkg = JSON.parse(pkg)
pkg.devDependencies.standard = semver.inc(pkg.devDependencies.standard, 'major')
return JSON.stringify(pkg)
},
token: '<github access token with sufficent rights>',
pr: {
title: 'Updated standard to latest version',
body: 'whatever'
}
}, function (err, res) {
console.log(res.html_url) // url of the pr
})
It looks like that documentation (and functionality?) were removed. Is it still possible? If not, are you using a different package now to create PRs?
Thanks!
bump :)
Maybe @gr2m knows something about this...
I don’t know about this particular library I’m afraid, I have creating an "Octokit Cookbook" in my backlog and creating a PR would probably a good candidate to start with.
@revolunet What is your use case exactly? Would you need to distinguish between creating a branch on the main repo or creating a fork first?
sorry to answer your question, I don’t think this library supports creating a pull request any longer. But you can change the files on a new branch and then create a pull request using node-github, see docs for github.pullRequests.create(): https://octokit.github.io/node-github/#api-pullRequests-create
Would you need to distinguish between creating a branch on the main repo or creating a fork first?
My use case would involve forking. 🍴
If I find a nice tool that wraps up this functionality, I will share it here.