🦄 Auto-updating
gr2m opened this issue · 1 comments
Here is what I would do
-
When running
node ./index.js
it currently logs the result to stdout. I would suggest to updateroutes/api.github.com/github-rest-apis-for-insomnia.json
directly, usingfs.writeFileSync()
-
Install Greenkeeper to get automatic pull requests for dependency updates, as defined in package.json
-
In your package.json, pin the version of
@octokit/routes
, so that Greenkeeper will send a pull request for every update, not only for major versions.- "@octokit/routes": "^18.6.2", + "@octokit/routes": "18.6.2",
-
Use a GitHub action that runs
node ./index.js
on push, but only when branch name starts with^greenkeeper/@octokit/routes
. -
Commit the changes
git commit routes -m "build: routes"
-
Push changes to Greenkeeper’s pull request. I’m not sure what the command will exactly look like for GitHub actions, here is what I do from Travis for reference: https://github.com/octokit/rest.js/blob/fc4f087246c57b20a2e5040a766a417913023acc/.travis.yml#L100
Let me know if that helps :)
If you like, you could also directly merge the pull request from the action, but I for one like to review these pull requests, just in case.