CLI to migrate all repositories for a given owner
Greenkeeper was acquired and will stop working after June 3rd.
If you plan to migrate your repositories to GitHub's own Dependabot, then this CLI is for you.
There are a few trade-offs to consider
package.json
's "dependencies" and "devDependencies". There will be many more pull requests coming from Dependabot compared to GreenkeeperCreate a personal access token at https://github.com/settings/tokens/new?scopes=repo
GITHUB_TOKEN=... npx migrate-greenkeeper-to-dependabot --owner octokit
I've made this script for my specific needs. If you have different needs, I suggest you fork it, I'm not sure if it's worth sending pull requests for a one-of CLI, but do what yuo think is best :)
owner
For each remaining repository, it creates a pull request with the following changes
It removes the Greenkeeper badge
It updates Action workflow files. It looks for the on.push.branches
array. If it finds any string starting with greenkeeper/...
, it replaces it with dependabot/npm_and_yarn/...
It creates a .github/dependabot.yml
file with the following configuration
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
labels:
- "maintenance"
It adds a "maintenance" label on the pull request