Skip to content

Replace Greenkeeper with Dependabot #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
9 tasks done
gr2m opened this issue May 19, 2020 · 3 comments
Closed
9 tasks done

Replace Greenkeeper with Dependabot #16

gr2m opened this issue May 19, 2020 · 3 comments
Assignees
Labels
Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR

Comments

@gr2m
Copy link
Contributor

gr2m commented May 19, 2020

image

As Greenkeeper is phasing out and migrating its users to Snyk, we decided to migrate to Dependabot, which has been acquired by GitHub about a year ago and is increasingly becoming a built-in GitHub feature.

There are some trade-offs unfortunately:

  • Dependabot has been created with a focus on apps, not libraries. By default, Dependabot sends updates for all dependency updates, including updates that are within the range of what's defined in package.json's "dependencies" and "devDependencies". This is causing a lot of noise. Luckily, the new v2 configuration option versioning-strategy: "increase-if-necessary" makes Depedendabot send pull requests for out-of-range updates only
  • One of my favorite features of Greenkeeper is live monitoring of in-range dependency updates. It creates a branch, which triggers the CI but does not create any notifications. If CI passes, the branch is deleted again. But if it fails, Greenkeeper creates an issues, so the maintainers can pin the version of the affected dependency, in order to prevent sudden breaking changes for its dependands. See https://greenkeeper.io/docs.html#greenkeeper-step-by-step

I've talked to @feelepxyz who kindly enabled the v2 configuration on @octokit. I will add the following configuration to all Octokit JS-related repositories:

version: 2
updates:
  # create PRs for out-of-range updates
  - package-ecosystem: "npm"
    directory: "/"
    schedule:
      interval: "daily"
    versioning-strategy: "increase-if-necessary"

Todos:

  1. Uninstall Greenkeeper app
  2. Update in this repository
  3. Update all other repositories in @octokit
  • Check if README.md includes Greenkeeper badge. If it doesn't, ignore repository
  • Create pull request
    • set "maintenance" label

    • Remove Greenkeeper badge

    • .github/workflows/update-prettier.yml files:

      -- "greenkeeper/prettier-*"
      +- "dependabot/npm_and_yarn/prettier-*"
    • .github/workflows/test.yml files:

      -- "greenkeeper/**"
    • Create .github/dependabot.yml with the configuration above

@gr2m gr2m added the Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR label May 19, 2020
@gr2m gr2m self-assigned this May 19, 2020
@gr2m
Copy link
Contributor Author

gr2m commented May 19, 2020

Hmm turns out that Dependabot is sending PRs for all updates even with the versioning-strategy: "increase-if-necessary", but it only updates the lock file. I don't see how I'd be able to enable Dependabot with that setting, it's too much noise both for me and for (potential) contributors who watch the Octokit repositories :/

@gr2m
Copy link
Contributor Author

gr2m commented May 19, 2020

I'll go ahead and migrate anyway, just to see how much noise it will be. Maybe it will help to make a case to the Dependabot team to introduce features that would lower the noise for library maintainers :)

I'll use this setting now

version: 2
updates:
  - package-ecosystem: "npm"
    directory: "/"
    schedule:
      interval: "daily"
    labels:
    - "maintenance"

This was referenced May 19, 2020
@gr2m
Copy link
Contributor Author

gr2m commented May 20, 2020

All done, getting ready for the flood. For reference, here is the script I used to create all the PRs:
https://github.com/gr2m/migrate-greenkeeper-to-dependabot-cli

@gr2m gr2m closed this as completed May 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Maintenance Any dependency, housekeeping, and clean up Issue or PR
Projects
None yet
Development

No branches or pull requests

1 participant